-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
33 lines (33 loc) · 884 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//app.js
import event from './libs/event.js'
App({
onLaunch: function() {
// 展示本地存储能力
var logs = wx.getStorageSync("logs") || [];
logs.unshift(Date.now());
wx.setStorageSync("logs", logs);
},
onShow: function(e) {
wx.getSystemInfo({
success: e => {
this.globalData.StatusBar = e.statusBarHeight;
try {
let capsule = wx.getMenuButtonBoundingClientRect();
if (capsule) {
this.globalData.DiviceInfo = e;
this.globalData.Custom = capsule;
this.globalData.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight;
} else {
this.globalData.CustomBar = e.statusBarHeight + 50;
}
} catch (e) {
console.error(e)
}
}
})
},
globalData: {
},
event: event,
DEBUG: wx.getStorageSync("debug"),
});