消除单页面模式异常
This commit is contained in:
25
src/App.vue
25
src/App.vue
@@ -2,17 +2,20 @@
|
||||
|
||||
export default {
|
||||
onLaunch() {
|
||||
if (!wx.getUpdateManager) return
|
||||
const updateManager = wx.getUpdateManager()
|
||||
updateManager.onUpdateReady(() => {
|
||||
this.$dialog.alert({
|
||||
title: '更新提示',
|
||||
content: '新版本已经准备好,点击确认按钮重启应用!'
|
||||
}).then(() => {
|
||||
updateManager.applyUpdate()
|
||||
}).catch(() => {
|
||||
})
|
||||
})
|
||||
if (uni.getUpdateManager) {
|
||||
const updateManager = uni.getUpdateManager()
|
||||
if (updateManager) {
|
||||
updateManager.onUpdateReady(() => {
|
||||
this.$dialog.alert({
|
||||
title: '更新提示',
|
||||
content: '新版本已经准备好,点击确认按钮重启应用!'
|
||||
}).then(() => {
|
||||
updateManager.applyUpdate()
|
||||
}).catch(() => {
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user