import common from '../../utils/util'; import main from '../../utils/main'; import commonBehavior from '../behaviors/commonBehavior'; const COUNT_MAX=10; const app = getApp(); Page({ behaviors: [commonBehavior], data: { IsShowAlert:false, Count:0, CountMax:COUNT_MAX, Words:[], IsShowExample:false, }, onLoad: function (options) { let that = this; that.setData({ Containnerheight: main.getWindowHeight(), }); main.checkGenerating(); }, onShow:function(e){ let that = this; let words=app.globalData.OCRWords; that.data.Words=[]; let list=app.globalData.SelectedWords; let count=0; for(let i=0;ithis.data.CountMax){ wx.showToast({ title: '本次最多'+this.data.CountMax+"个", icon:"none" }); list[index].CSS=""; } else{ this.setData({ Words:list, Count:count, IsShowAlert:false, }); } }, goto: function (e) { let that=this; var url=e.currentTarget.dataset.url; wx.navigateTo({ url: url, }); }, clearInput: function (e) { let that=this; let list=this.data.Words; for(let i=0;i