3
0
Fork 0

fix(user): 登出逻辑完善

This commit is contained in:
woody 2025-08-25 09:48:22 +08:00
parent d6becba570
commit d795831c49
2 changed files with 3 additions and 1 deletions

View File

@ -70,6 +70,7 @@ module.exports = vm => {
// duration: 1500, // duration: 1500,
// }) // })
removeToken() removeToken()
uni.removeStorageSync('User')
// 跳转到登录 // 跳转到登录
setTimeout(() => { setTimeout(() => {
uni.reLaunch({ uni.reLaunch({

View File

@ -28,7 +28,8 @@ const actions = {
// 获取用户信息 // 获取用户信息
GetInfo({ commit, state }) { GetInfo({ commit, state }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (state.user) { const storageUser = uni.getStorageSync('User')
if (state.user && storageUser) {
resolve(state.user) resolve(state.user)
return return
} }