| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- // app.js
- App({
- globalData: {
- Version: "0.1.1",
- IsProduction: true,
- //IsProduction: false,
- ShareTitle: "上海中考信息查询",
- SharePath: "pages/index/index",
- ShareImage: '../images/program_screenshot_main.png',
- ProgramID: 173,
- ProgramName: "秒过分数线",
- AppID: "wx39bc498e7fdacb6b",
- serverUrl: "https://www.kylx365.com/apiData/",
- serverUrlServer: "https://www.kylx365.com/apiData/",
- serverUrlLocalhost: "http://localhost:3020/apiData/",
- uploadImageUrl: "https://miaguo-1253256735.file.myqcloud.com/",
- IsIOS: true,
- IsAndroid: false,
- IsIPad: false,
- IsIPhoneX: false,
- IsOppo: false,
- systemInfo: null,
- userInfo: null,
- SourceID: 0,//来源ID
-
- },
- onLaunch: function (options) {
- this.getSystemInfo();
- },
- onShow: function(options) {
- if (options && options.scene) {
- this.globalData.userSource = options.scene;
- console.log("options.scene2:" + options.scene);
- }
- },
- 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;
- }
- }
- })
|