fix(接口测试): 接口定义跨空间跳转失败
--bug=1011493 --user=郭雨琦 【接口测试】跨工作空间引用接口定义,跳转报错 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001011493
This commit is contained in:
parent
af4b298296
commit
c8d9429e02
|
@ -418,16 +418,24 @@ export default {
|
|||
},
|
||||
},
|
||||
created() {
|
||||
let workspaceId = this.$route.params.workspaceId;
|
||||
if (workspaceId) {
|
||||
sessionStorage.setItem(WORKSPACE_ID, workspaceId);
|
||||
}else {
|
||||
if(this.$route.query.workspaceId){
|
||||
sessionStorage.setItem(WORKSPACE_ID, this.$route.query.workspaceId);
|
||||
workspaceId = this.$route.query.workspaceId;
|
||||
sessionStorage.setItem(WORKSPACE_ID, workspaceId);
|
||||
}
|
||||
}
|
||||
let projectId = this.$route.params.projectId;
|
||||
if (projectId) {
|
||||
sessionStorage.setItem(PROJECT_ID, projectId);
|
||||
}
|
||||
}else {
|
||||
if (this.$route.query.projectId) {
|
||||
projectId = this.$route.query.projectId;
|
||||
sessionStorage.setItem(PROJECT_ID, this.$route.query.projectId);
|
||||
}
|
||||
}
|
||||
this.getEnv();
|
||||
// 通知过来的数据跳转到编辑
|
||||
if (this.$route.query.caseId) {
|
||||
|
|
|
@ -35,7 +35,7 @@ export default {
|
|||
|
||||
},
|
||||
{
|
||||
path: "definition/:redirectID?/:dataType?/:dataSelectRange?/:projectId?/:type?",
|
||||
path: "definition/:redirectID?/:dataType?/:dataSelectRange?/:projectId?/:type?/:workspaceId?",
|
||||
name: "ApiDefinition",
|
||||
component: () => import('@/business/components/api/definition/ApiDefinition'),
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue