|
|
@@ -11,6 +11,7 @@ const QR = require("../utils/memberqrcode.js"); |
|
|
|
const util = require("../utils/util"); |
|
|
|
const bgColor = require("../utils/bgColor.js") |
|
|
|
let app = getApp(); |
|
|
|
const updateManager = tt.getUpdateManager(); |
|
|
|
Page({ |
|
|
|
data: { |
|
|
|
userAvatarUrl: '', |
|
|
@@ -915,6 +916,27 @@ Page({ |
|
|
|
that.getCouponChannelList(that.data.businessKey) |
|
|
|
}, 1000) |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
console.log('onCheckForUpdate'); |
|
|
|
updateManager.onCheckForUpdate(res => { |
|
|
|
console.log(res, 'onCheckForUpdate'); |
|
|
|
if (res.hasUpdate) { |
|
|
|
updateManager.onUpdateReady((res) => { |
|
|
|
tt.showModal({ |
|
|
|
title: "更新提示", |
|
|
|
content: "新版本已经准备就绪,是否重新进入小程序?", |
|
|
|
success: (res) => { |
|
|
|
if (res.confirm) { |
|
|
|
// 新的版本已经下载好,应用新版本并重启 |
|
|
|
updateManager.applyUpdate(); |
|
|
|
} |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, 2500); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|