fix(系统设置): 复制路由到新打开的标签页有时会跳转到个人信息页面

--bug=1017174 --user=李玉号 [系统设置]github
#18019打开的标签页无论路径输入的什么,最后都会跳转到个人信息界面
https://www.tapd.cn/55049933/s/1250021

Closes #18019
This commit is contained in:
shiziyuan9527 2022-09-22 11:55:24 +08:00 committed by 刘瑞斌
parent 1b2a5eb920
commit 4ff5503c9b
1 changed files with 16 additions and 8 deletions

View File

@ -96,11 +96,19 @@ export function hasPermissions(...permissions) {
}
export function getCurrentWorkspaceId() {
return sessionStorage.getItem(WORKSPACE_ID);
let workspaceId = sessionStorage.getItem(WORKSPACE_ID);
if (workspaceId) {
return workspaceId;
}
return getCurrentUser().lastWorkspaceId;
}
export function getCurrentProjectID() {
return sessionStorage.getItem(PROJECT_ID);
let projectId = sessionStorage.getItem(PROJECT_ID);
if (projectId) {
return projectId;
}
return getCurrentUser().lastProjectId;
}
export function getCurrentUser() {