优化跳转登录逻辑,退出登录,修改收据复制错误

This commit is contained in:
2024-06-19 17:17:30 +08:00
parent 4963d4f8a6
commit 31870c0222
4 changed files with 27 additions and 15 deletions

View File

@@ -79,15 +79,22 @@ Page({
})
},
async logout() {
const { code, message } = await logout()
if (code !== OK) {
alertInfo(message)
return;
}
wx.clearStorageSync()
wx.switchTab({
url: '/pages/home/index',
})
Dialog.alert({
title: '提示',
message: '确认退出登录?',
showCancelButton: true,
}).then(async () => {
const { code, message } = await logout()
if (code !== OK) {
alertInfo(message)
return;
}
wx.clearStorageSync()
wx.switchTab({
url: '/pages/home/index',
})
});
},
bindTenement() {
wx.navigateTo({