-
Notifications
You must be signed in to change notification settings - Fork 100
/
app.js
46 lines (43 loc) · 1.23 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
import WeAppRedux from './redux/index.js';
import createStore from './redux/createStore.js';
import reducer from './store/reducer.js';
import ENVIRONMENT_CONFIG from './config/envConfig.js'
import PAGE_CONFIG from './config/pageConfig.js'
const {Provider} = WeAppRedux;
const store = createStore(reducer) // redux store
App(
Provider(store)(
{
globalData: {
emitter: null,
netcallController: null,
ENVIRONMENT_CONFIG,
PAGE_CONFIG
},
onShow: function(e) {
if (e.scene == 1007 || e.scene == 1008) {
try{
this.globalData.netcall && this.globalData.netcall.destroy()
this.globalData.nim && this.globalData.nim.destroy({
done: function () {
}
})
}catch(e) {
}
}
},
onLaunch: function (e) {
let userInfo = wx.getStorageSync('userInfo')
if (userInfo) {
this.globalData.userInfo = userInfo
}
let systemInfo = wx.getSystemInfoSync()
this.globalData.videoContainerSize = {
width: systemInfo.windowWidth,
height: systemInfo.windowHeight
}
this.globalData.isPushBeCallPage = false
}
}
)
)