// app.js App({ globalData: { Version: "1.0.0", //IsProduction: true, ShareTitle: "语境背单词", SharePath: "pages/index/index", ShareImage: '../images/pic_07.png', ProgramID: 186, ProgramName: "语境背单词", AppID: "wx80059777521b897c", serverUrl: "https://scoreline.kylx365.com/apiData/", serverUrlServer: "https://scoreline.kylx365.com/apiData/", serverUrlLocalhost: "http://localhost:3000/apiData/", audioUrlBaidu: "https://tsn.baidu.com/text2audio?lan=zh&ctp=1&cuid=abcdxxx&tok=[token]&tex=[word]&vol=9&per=0&spd=3&pit=5", uploadImageUrl: "https://miaguo-1253256735.file.myqcloud.com/", officialAccounts:"https://mp.weixin.qq.com/s/gO9S4PrPl1Uu1iksyRuBgw", BaiduToken: "",//百度开发平台token IsIOS: true, IsAndroid: false, IsIPad: false, IsIPhoneX: false, IsOppo: false, systemInfo: null, userInfo: null, SourceID: 0,//来源ID shareTicket: null, userSource: null,//用户来源方式 Key: "kylx365_chengjie", IV: "kylx365hongliren", TempStr:"", OCRWords:[],//OCR的单词 SelectedWords:[],//选中的单词 ocrReady: false }, onLaunch: function (options) { let that=this; that.getSystemInfo(); // wx.setEnableDebug({ // enableDebug: true // }); }, getSystemInfo: function () { this.globalData.systemInfo = wx.getSystemInfoSync(); if (this.globalData.systemInfo.system.indexOf("Android") >= 0) { this.globalData.IsIOS =false; this.globalData.IsAndroid=true; } else if (this.globalData.systemInfo.system.indexOf("iOS") >= 0) { this.globalData.IsIOS = true; this.globalData.IsAndroid=false; if (this.globalData.systemInfo.model.indexOf("X") >= 0 || this.globalData.systemInfo.model.indexOf("11") >= 0 || this.globalData.systemInfo.model.indexOf("12") >= 0 || this.globalData.systemInfo.model.indexOf("13") >= 0 || this.globalData.systemInfo.model.indexOf("14") >= 0) this.globalData.IsIPhoneX=true; } if (this.globalData.systemInfo.model.indexOf("iPad")>=0){ this.globalData.IsIPad=true; } if (this.globalData.systemInfo.brand.indexOf("OPPO")>=0){ this.globalData.IsOppo=true; } } })