消除单页面模式异常

This commit is contained in:
aixianling
2024-03-06 15:11:53 +08:00
parent 8a6b586503
commit efb18515f5
2 changed files with 22 additions and 16 deletions

View File

@@ -2,8 +2,9 @@
export default { export default {
onLaunch() { onLaunch() {
if (!wx.getUpdateManager) return if (uni.getUpdateManager) {
const updateManager = wx.getUpdateManager() const updateManager = uni.getUpdateManager()
if (updateManager) {
updateManager.onUpdateReady(() => { updateManager.onUpdateReady(() => {
this.$dialog.alert({ this.$dialog.alert({
title: '更新提示', title: '更新提示',
@@ -13,6 +14,8 @@ export default {
}).catch(() => { }).catch(() => {
}) })
}) })
}
}
}, },
} }
</script> </script>

View File

@@ -40,7 +40,10 @@ export const user = {
reject(res); reject(res);
} }
}, },
fail: () => resolve(dispatch("getCode", ++count)) fail: err => {
console.error(err)
resolve(dispatch("getCode", ++count))
}
}) })
}) })
}, },