fix: 修改退出登录后的跳转逻辑,改为跳转到首页
This commit is contained in:
parent
a3d7f3002c
commit
ae35d60f12
@ -312,24 +312,19 @@
|
||||
},
|
||||
// 退出登录
|
||||
logout() {
|
||||
if (!this.isLoggedIn) return
|
||||
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要退出登录吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
// 清除登录状态
|
||||
// 清除本地存储的用户信息
|
||||
uni.removeStorageSync('token')
|
||||
uni.removeStorageSync('userInfo')
|
||||
this.isLoggedIn = false
|
||||
this.userInfo = null
|
||||
this.barInfo = null
|
||||
this.myScanData = null
|
||||
uni.removeStorageSync('barInfo')
|
||||
|
||||
// 跳转到登录页
|
||||
// 跳转到首页
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/chooseLogin'
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user