| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- import common from '../../utils/util';
- import main from '../../utils/main';
- import constant from '../../utils/constant';
- const app = getApp();
- Page({
- data: {
- ImagePath: app.globalData.uploadImageUrl,
- IsShow:-1,
- },
- onLoad: function (options) {
- var that = this;
- that.setData({
- ArticleList:app.globalData.ArticleList,
- IsShow:app.globalData.userInfo.IsShow,
- });
- var id=options.ID;
- var arr=[];
- var title="";
- for(var i=0;i<that.data.ArticleList.length;i++){
- if (id==that.data.ArticleList[i].ID){
- arr=that.data.ArticleList[i].Content;
- title=that.data.ArticleList[i].TitleShort;
- break;
- }
- }
- that.setData({
- Containnerheight: main.getWindowHeight(),
- ImageArr:arr,
- ArticleID:options.ID,
- Title:title,
- });
- },
- showImage: function (e) {
- var image = e.currentTarget.dataset.url;
- image=this.data.ImagePath+"web/_ScoreLine/"+image;
- wx.previewImage({
- current: image,
- urls: [image]
- });
- },
- goto: function (e) {
- var url=e.currentTarget.dataset.url;
- wx.navigateTo({
- url: url,
- });
- },
- redirectTo: function (e) {
- var url=e.currentTarget.dataset.url;
- wx.redirectTo({
- url: url,
- });
- },
- reLaunch: function (e) {
- wx.reLaunch({
- url: 'default',
- })
- },
- onShareTimeline: function () {
- return this.onShareAppMessage();
- },
- adLoad() {
- console.log('原生模板广告加载成功')
- },
- adError(err) {
- console.error('原生模板广告加载失败', err)
- },
- adClose() {
- console.log('原生模板广告关闭')
- },
- onShareAppMessage: function () {
- return {
- title: this.data.Title,
- path: app.globalData.SharePath + '?type=docs&ID='+this.data.ArticleID+'&UserID=' + app.globalData.userInfo.UserID,
- }
- },
- })
|