import common from '../../utils/util'; import main from '../../utils/main'; import animation from '../../utils/animation'; const app = getApp(); Page({ data: { IsShowRemind:false, remindAnimation: "", }, onLoad: function (options) { let that = this; that.setData({ Containnerheight: main.getWindowHeight(), Version:app.globalData.Version, }); }, onShow:function(){ app.globalData.OCRWords=[]; this.getData(); main.checkGenerating(); if (wx.getStorageSync('IsShowGuideContainer')){ this.initGuide(); } else{ this.setData({ IsShowGuideContainer:false, }) } }, goto: function (e) { let that=this; var url=e.currentTarget.dataset.url; if (url=="wordsinput"){ if (that.data.TodayCount>that.data.MaxCount){ animation.toggleRemindWithAnimation(that); return ; } } wx.navigateTo({ url: url, }); that.setData({ IsShowRemind:false, }) }, getData:function(){ let that=this; main.getData('GetYJBDCArticleList?UserID=' + app.globalData.userInfo.UserID+'&IsTodayCount=1', function (data) { if (data) { that.setData({ TodayCount:data.TodayCount, MaxCount:data.MaxCount, UnReadCount:data.UnReadCount, }); } }); }, showRemind:function(){ animation.toggleRemindWithAnimation(this); }, initGuide:function(){ let that=this; that.setData({ IsShowGuideContainer:true, }); main.showGuideContainer(that,"#txtWordsInput",0,110,"pic_ha01",396,248,-5); wx.setStorageSync('IsShowGuideContainer', true); }, closeGuideContainer:function(){ this.setData({ IsShowGuideContainer:false, }); wx.setStorageSync('IsShowGuideContainer', false); }, // 阻止示例面板的触摸事件传递到底层 catchTouchMove: function(e) { // 这个函数不需要做任何事情,只需要捕获事件防止冒泡 return false; }, onShareAppMessage: function () { return { title: app.globalData.ShareTitle, path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID, imageUrl: app.globalData.ShareImage, } }, })