|
@@ -23,7 +23,6 @@ App({
|
|
|
that.globalData.menuWidth = menuButtonInfo.width;
|
|
|
wx.setStorageSync('height', that.globalData.navBarHeight)
|
|
|
this.getPersonRights()//获取用户权益
|
|
|
- this.checkVersion()//检查小程序版本
|
|
|
|
|
|
//静态图片地址
|
|
|
var Path = {
|
|
@@ -67,33 +66,5 @@ App({
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- checkVersion(){
|
|
|
- const updateManager = wx.getUpdateManager()
|
|
|
- updateManager.onCheckForUpdate(function (res) {
|
|
|
- // 请求完新版本信息的回调
|
|
|
- if (res.hasUpdate) {
|
|
|
- // 有新版本
|
|
|
- updateManager.onUpdateReady(function () {
|
|
|
- wx.showModal({
|
|
|
- title: '更新提示',
|
|
|
- content: '新版本已经准备好,是否立即重启应用?',
|
|
|
- success: function (res) {
|
|
|
- if (res.confirm) {
|
|
|
- // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
|
|
- updateManager.applyUpdate()
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
-
|
|
|
- updateManager.onUpdateFailed(function () {
|
|
|
- // 新版本下载失败
|
|
|
- wx.showModal({
|
|
|
- title: '更新提示',
|
|
|
- content: '新版本下载失败,请您删除当前小程序,到微信 “发现-小程序” 页,重新搜索打开呦~',
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+
|
|
|
})
|