0000
This commit is contained in:
64
app.js
Normal file
64
app.js
Normal file
@@ -0,0 +1,64 @@
|
||||
var t = require("./utils/login.js");
|
||||
|
||||
// 引入
|
||||
require("./utils/xstat.js");
|
||||
|
||||
|
||||
App({
|
||||
xstatConfig: {
|
||||
appKey: wx.getAccountInfoSync().miniProgram.appId, // 自动获取 小程序appid
|
||||
debug: true, //是否打开调试模式
|
||||
// 上报地址
|
||||
LOG_URL: 'https://t-jm.v0750.com/send',
|
||||
},
|
||||
onLaunch: function(e) {
|
||||
console.log("options", e), this.globalData.options = e, t.getLogin(this, !0);
|
||||
try {
|
||||
var o = wx.getSystemInfoSync();
|
||||
this.computeNavigateBarHeight(o);
|
||||
} catch (t) {
|
||||
this.setData({
|
||||
windowHeight: 812,
|
||||
totalTopHeight: 68,
|
||||
statusBarHeight: 20,
|
||||
titleBarHeight: 48
|
||||
});
|
||||
}
|
||||
},
|
||||
onShow: function(e) {
|
||||
console.log("onshowwwwwwwoptions", e);
|
||||
var o = e.scene;
|
||||
[ 1011, 1012, 1013, 1024, 1047, 1048, 1049 ].indexOf(o) > -1 && (console.log("扫码进入的"),
|
||||
t.getDevicecode(this, e));
|
||||
},
|
||||
computeNavigateBarHeight: function(t) {
|
||||
var e = wx.getMenuButtonBoundingClientRect(), o = e.bottom + 6, i = t.windowHeight, n = e.top, a = e.height;
|
||||
i < 10 && (i = t.windowHeight, a = o - (n = t.statusBarHeight)), o < 10 && (console.log("更新"),
|
||||
o = 68, /iPhone X|MI 8|PAAM00|COR-AL00/.test(t.model) ? o = 88 : /iPhone/.test(t.model) && (o = 64));
|
||||
var s = t.windowWidth;
|
||||
this.globalData.screen_data = {
|
||||
windowWidth: s,
|
||||
windowHeight: i,
|
||||
totalTopHeight: o,
|
||||
statusBarHeight: n,
|
||||
titleBarHeight: a,
|
||||
titleWidth: e.width
|
||||
};
|
||||
},
|
||||
globalData: {
|
||||
userInfo: null,
|
||||
canGetData: !1,
|
||||
screen_data: {},
|
||||
options: {},
|
||||
route: {},
|
||||
user: {},
|
||||
isUserAuthorization: 0,
|
||||
servicetel: "",
|
||||
code: "",
|
||||
isneedUpload: !1,
|
||||
needJumpUrl: !1,
|
||||
devicecode: "",
|
||||
protocol: {},
|
||||
tips: ""
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user