import common from '../../utils/util'; import main from '../../utils/main'; import animation from '../../utils/animation'; const app = getApp(); Page({ data: { IsShowRemind:false, IsNew:0, IsShowID:false, IsShowMore:true, }, onLoad: function (options) { let that = this; that.setData({ Containnerheight: main.getWindowHeight(), UserID:app.globalData.userInfo.UserID, }); main.checkGenerating(); that.getData(that.data.UserID); }, onShow:function(e){ let that=this; if (that.data.IsNew){ setTimeout(function(){ that.getData(that.data.UserID); },1000); } }, getData:function(userID,pageID){ wx.showLoading({ title: '请稍候', }); let that=this; let url='GetYJBDCArticleList?UserID=' + userID; if (pageID) url+="&PageID="+pageID; if (that.data.IsNew==1) url+="&IsNew=1"; console.log(url); main.getData(url, function (data) { wx.hideLoading(); if (data) { if (!pageID) that.data.List=[]; app.globalData.UnReadCount=0; for(let i=0;i { if (res.confirm) { if (res.content){ that.setData({ UserID:res.content, }); that.getData(res.content); } } else{ that.setData({ IsShowID:!that.data.IsShowID, }); } } }) } }, onShareAppMessage: function () { return { title: app.globalData.ShareTitle, path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID, imageUrl: app.globalData.ShareImage, } }, })