You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
858 B
26 lines
858 B
//app.js
|
|
App({
|
|
evn: 1, // 0: 开发版本;1:测试版本;2:生产版本
|
|
tmplIds: ['AFoM5TOfsgERsfcetNSB0UlmEixnLF1ySXr54Bqno2M', 'lOQ8Gvyy_dTk68bYGpRVnVA0M7DsYYrV81Gd39GUPBA'],
|
|
version: '2.3.1',
|
|
xAppId: '503258978847953926',
|
|
userInfo: null,
|
|
//----------------------------------------------globalData--------------------------------------
|
|
globalData: {
|
|
token: null,
|
|
agenting: 1,
|
|
keyboardHeight: 0,
|
|
isIos: false
|
|
},
|
|
onShow: function(){
|
|
const updateManager = wx.getUpdateManager()
|
|
updateManager.onCheckForUpdate(function (res) {
|
|
// 请求完新版本信息的回调
|
|
// console.log('updateManager>>>' + res.hasUpdate)
|
|
})
|
|
updateManager.onUpdateReady(function () {
|
|
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
|
updateManager.applyUpdate()
|
|
})
|
|
}
|
|
})
|