【update】-token过期 退出登录的时候 不调用接口

This commit is contained in:
fengchenchen
2023-08-23 18:23:53 +08:00
parent 6b677aba4b
commit 9289bce141
5 changed files with 25 additions and 6 deletions
+19
View File
@@ -185,6 +185,25 @@ const user = {
})
})
},
// 登出 不调用接口
LogoutNotRequest({ commit, state }) {
return new Promise((resolve) => {
commit('SET_TOKEN', '')
commit('SET_PERMISSIONLIST', [])
Vue.ls.remove(ACCESS_TOKEN)
Vue.ls.remove(USER_INFO)
Vue.ls.remove(USER_NAME)
Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
Vue.ls.remove(CACHE_INCLUDED_ROUTES)
if (process.env.VUE_APP_SSO == 'true') {
let sevice = 'http://' + window.location.host + '/'
let serviceUrl = encodeURIComponent(sevice)
window.location.href = process.env.VUE_APP_CAS_BASE_URL + '/logout?service=' + serviceUrl
}
resolve()
})
},
// 第三方登录
ThirdLogin({ commit }, param) {
return new Promise((resolve, reject) => {