fix(系统设置): 复制路由到新打开的标签页有时会跳转到个人信息页面
--bug=1017174 --user=李玉号 [系统设置]github #18019打开的标签页无论路径输入的什么,最后都会跳转到个人信息界面 https://www.tapd.cn/55049933/s/1250021 Closes #18019
This commit is contained in:
parent
1b2a5eb920
commit
4ff5503c9b
|
@ -96,11 +96,19 @@ export function hasPermissions(...permissions) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCurrentWorkspaceId() {
|
export function getCurrentWorkspaceId() {
|
||||||
return sessionStorage.getItem(WORKSPACE_ID);
|
let workspaceId = sessionStorage.getItem(WORKSPACE_ID);
|
||||||
|
if (workspaceId) {
|
||||||
|
return workspaceId;
|
||||||
|
}
|
||||||
|
return getCurrentUser().lastWorkspaceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCurrentProjectID() {
|
export function getCurrentProjectID() {
|
||||||
return sessionStorage.getItem(PROJECT_ID);
|
let projectId = sessionStorage.getItem(PROJECT_ID);
|
||||||
|
if (projectId) {
|
||||||
|
return projectId;
|
||||||
|
}
|
||||||
|
return getCurrentUser().lastProjectId;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCurrentUser() {
|
export function getCurrentUser() {
|
||||||
|
|
Loading…
Reference in New Issue