token退出后删除
This commit is contained in:
@@ -67,7 +67,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
Quit () {
|
Quit () {
|
||||||
this.$store.dispatch('delUserInfo')
|
this.$store.dispatch('delUserInfo', '')
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
})
|
})
|
||||||
|
|||||||
BIN
static/.DS_Store
vendored
BIN
static/.DS_Store
vendored
Binary file not shown.
@@ -64,7 +64,7 @@ const request = (params) => {
|
|||||||
content: `${res[1].data.message}`,
|
content: `${res[1].data.message}`,
|
||||||
showCancel: false
|
showCancel: false
|
||||||
})
|
})
|
||||||
store.dispatch('delUserInfo')
|
store.dispatch('delUserInfo', '')
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ const actions = {
|
|||||||
},
|
},
|
||||||
delUserInfo({commit}, res) {
|
delUserInfo({commit}, res) {
|
||||||
uni.clearStorageSync('userInfo')
|
uni.clearStorageSync('userInfo')
|
||||||
|
uni.clearStorageSync('saveToken')
|
||||||
commit(types.DEL_USER_INFO, res)
|
commit(types.DEL_USER_INFO, res)
|
||||||
},
|
},
|
||||||
saveToken({commit}, res) {
|
saveToken({commit}, res) {
|
||||||
@@ -63,6 +64,7 @@ const mutations = {
|
|||||||
},
|
},
|
||||||
[types.DEL_USER_INFO] (state, res) {
|
[types.DEL_USER_INFO] (state, res) {
|
||||||
state.userInfo = res
|
state.userInfo = res
|
||||||
|
state.saveToken = res
|
||||||
},
|
},
|
||||||
[types.SAVE_TOKEN] (state, res) {
|
[types.SAVE_TOKEN] (state, res) {
|
||||||
state.saveToken = res
|
state.saveToken = res
|
||||||
|
|||||||
Reference in New Issue
Block a user