页面出现"can not find variable loadFail"的错误
页面加载的时候出现"can not find variable loadFail"的错误,我检查了我的代码,代码中并没有定义loadFail这样的字段,那么微信又是怎么调用到这个字段的呢? 下面是我reader页面onReady方法中的代码: [代码]onReady: [代码][代码]function[代码][代码]() {[代码][代码] [代码][代码]let self = [代码][代码]this[代码][代码] [代码][代码]// 判断是否需要显示提示[代码][代码] [代码][代码]let showReaderTips = wx.getStorageSync([代码][代码]'show_reader_tips'[代码][代码])[代码][代码] [代码][代码]if[代码] [代码](showReaderTips || showReaderTips === [代码][代码]''[代码][代码]) {[代码][代码] [代码][代码]self.setData({ showReaderTips: [代码][代码]true[代码] [代码]})[代码][代码] [代码][代码]} [代码][代码]else[代码] [代码]{[代码][代码] [代码][代码]self.setData({ showReaderTips: [代码][代码]false[代码] [代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]//读取用户设置[代码][代码] [代码][代码]let localSetting = wx.getStorageSync([代码][代码]'userinfo'[代码][代码]) || {}[代码][代码] [代码][代码]if[代码] [代码](localSetting && localSetting.setting) {[代码][代码] [代码][代码]let userSetting = localSetting.setting[代码][代码] [代码][代码]self.setData({[代码][代码] [代码][代码]'allSliderValue.bright'[代码][代码]: userSetting.reader.bright || self.data.allSliderValue.bright,[代码][代码] [代码][代码]'allSliderValue.font'[代码][代码]: userSetting.reader.fontSize || self.data.allSliderValue.font,[代码][代码] [代码][代码]colorStyle: self.transColorStyle(userSetting.reader.mode) || self.data.colorStyle,[代码][代码] [代码][代码]currentFontFamily: userSetting.reader.fontFamily || self.data.currentFontFamily[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]// 设置背景色[代码][代码] [代码][代码]wx.setNavigationBarColor({[代码][代码] [代码][代码]frontColor: self.data.colorStyle.styleNum == 4 ? [代码][代码]'#ffffff'[代码] [代码]: [代码][代码]'#000000'[代码][代码],[代码][代码] [代码][代码]backgroundColor: self.data.colorStyle.control_bg,[代码][代码] [代码][代码]animation: {[代码][代码] [代码][代码]duration: 0,[代码][代码] [代码][代码]timingFunc: [代码][代码]'easeIn'[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码]下面是警告的截图: [图片] [图片]