消除单页面模式异常

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

View File

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