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() {
|
||||||
|
@ -607,11 +615,11 @@ export function operationConfirm(tip, success, cancel) {
|
||||||
if (tip[tip.length - 1] !== '?' && tip[tip.length - 1] !== '?') {
|
if (tip[tip.length - 1] !== '?' && tip[tip.length - 1] !== '?') {
|
||||||
tip += '?';
|
tip += '?';
|
||||||
}
|
}
|
||||||
return confirm(tip, '', {
|
return confirm(tip, '', {
|
||||||
confirmButtonText: i18n.t('commons.confirm'),
|
confirmButtonText: i18n.t('commons.confirm'),
|
||||||
cancelButtonText: i18n.t('commons.cancel'),
|
cancelButtonText: i18n.t('commons.cancel'),
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
center: false
|
center: false
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
if (success) {
|
if (success) {
|
||||||
success();
|
success();
|
||||||
|
@ -620,7 +628,7 @@ export function operationConfirm(tip, success, cancel) {
|
||||||
if (cancel) {
|
if (cancel) {
|
||||||
cancel();
|
cancel();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue