| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- // app.js
- App({
- globalData: {
- Version: "1.0.0",
- IsProduction: true,
- ShareTitle: "",
- SharePath: "pages/index/index",
- ShareImage: '../images/program_share-a01.png',
- ProgramID: 107,
- ProgramName: "",
- AppID: "wx80059777521b897c",
- serverUrl: "https://www.kylx365.com/apiData/",
- serverUrlServer: "https://www.kylx365.com/apiData/",
- serverUrlLocalhost: "http://localhost:3020/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",
- audioUrlYoudao: "https://dict.youdao.com/dictvoice?rate=10&le=auto&audio=[word]",
- 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:"",
- ocrReady: false
- },
- onLaunch: function (options) {
- var 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;
- }
- }
- })
|