| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- //app.js
- App({
- onLaunch: function (options) {
- this.getSystemInfo();
- if (options && options.scene) {
- console.log("scene:" + options.scene);
- this.globalData.userSource = options.scene;
- }
- if (options && options.shareTicket) {
- this.globalData.shareTicket = options.shareTicket;
- }
- },
- 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("iPad") >= 0) {
- this.globalData.IsIPad = true;
- }
- },
- globalData: {
- version: "1.1.11",
- IsProduction: true,
- ProgramID: 105,
- AppID: "wx1fef080f74481cbd",
- ProgramName: "数学计算题",
- ShareTitle: "认真练习,告别粗心",
- SharePath: "pages/index/index",
- ShareImage: '../../pages/images/programsystem_screenshot_pic01.png',
- fileUrl: "https://math-1253256735.file.myqcloud.com/",
- 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=4&spd=6&pit=5",
- uploadImageUrl: "https://miaguo-1253256735.file.myqcloud.com/",
- Key: "kylx365_chengjie",
- IV: "kylx365hongliren",
-
- systemInfo: null,
- userInfo: null,
- SourceID: 0,//来源ID
- DayNumber: 0,//使用天数
- BaiduToken: "",//百度开发平台token
- IsShow: 0,
- NewUserNumberMax: 6,//邀请新用户最大值
- IsSaveCustom: false,//是否保存了定制
- IsRefresh: false,
- IsIOS: true,
- IsAndroid: false,
- IsIPad: false,
- }
- })
|