app.js里
onLaunch: function(){
this.updateManager()
},
// 检测新版本
updateManager() {
const updateManager = wx.getUpdateManager()
updateManager.onUpdateReady(function () {
wx.showModal({
title: ‘更新提示’,
content: ‘新版本已经准备好,是否重启应用?’,
success(res) {
if (res.confirm) {
updateManager.applyUpdate()
}
}
})
})
},
小程序更新版本updateManager
猜你喜欢
转载自blog.csdn.net/xiaoma19941027/article/details/106734707
今日推荐
周排行