import common from '../../utils/util'; import main from '../../utils/main'; import animation from '../../utils/animation'; import commonBehavior from '../behaviors/commonBehavior'; const app = getApp(); Page({ behaviors: [commonBehavior], 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); }, catchTouchMove: main.catchTouchMove, onShareAppMessage: function () { return { title: app.globalData.ShareTitle, path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID, imageUrl: app.globalData.ShareImage, } }, })