优化跳转登录逻辑,退出登录,修改收据复制错误
This commit is contained in:
@@ -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({
|
||||
|
Reference in New Issue
Block a user