perf: 手动切换账号提示“项目不存在或不在成员列表内”的情况
This commit is contained in:
parent
ae80939d2e
commit
5324861f16
@ -578,7 +578,7 @@ export default {
|
||||
title: '退出登录',
|
||||
content: '你确定要登出系统?',
|
||||
onOk: () => {
|
||||
this.$store.dispatch("logout")
|
||||
this.$store.dispatch("logout", false)
|
||||
}
|
||||
});
|
||||
return;
|
||||
|
8
resources/assets/js/store/actions.js
vendored
8
resources/assets/js/store/actions.js
vendored
@ -367,10 +367,14 @@ export default {
|
||||
* 登出(打开登录页面)
|
||||
* @param state
|
||||
* @param dispatch
|
||||
* @param appendFrom
|
||||
*/
|
||||
logout({state, dispatch}) {
|
||||
logout({state, dispatch}, appendFrom = true) {
|
||||
dispatch("handleClearCache", {}).then(() => {
|
||||
const from = ["/", "/login"].includes(window.location.pathname) ? "" : encodeURIComponent(window.location.href);
|
||||
let from = ["/", "/login"].includes(window.location.pathname) ? "" : encodeURIComponent(window.location.href);
|
||||
if (appendFrom === false) {
|
||||
from = null;
|
||||
}
|
||||
$A.goForward({name: 'login', query: from ? {from: from} : {}}, true);
|
||||
});
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user