fix(接口定义): 修复项目设置,在接口定义不生效的缺陷

--bug=1017700 --user=王孝刚 【项目设置】项目设置-应用管理-接口测试,接口快捷添加按钮设置没生效
https://www.tapd.cn/55049933/s/1257318
--bug=1017697 --user=王孝刚
【接口测试】开启接口场景自定义ID后,创建场景没有自定义ID字段 https://www.tapd.cn/55049933/s/1257334
This commit is contained in:
wxg0103 2022-10-10 16:05:27 +08:00 committed by 刘瑞斌
parent 3e6b55cc17
commit 0925f0e2de
2 changed files with 7 additions and 2 deletions

View File

@ -17,6 +17,11 @@ export function getMaintainer() {getAll
} }
export function getProjectConfig(projectId, type) { export function getProjectConfig(projectId, type) {
let url = '/project_application/get/config/' + projectId + type;
return get(url);
}
export function getProjectApplicationConfig(projectId, type) {
let url = '/project_application/get/' + projectId + type; let url = '/project_application/get/' + projectId + type;
return get(url); return get(url);
} }

View File

@ -79,7 +79,7 @@
import {generateShareInfoWithExpired,getShareRedirectUrl} from "@/api/share"; import {generateShareInfoWithExpired,getShareRedirectUrl} from "@/api/share";
import {getCurrentProjectID, getCurrentWorkspaceId} from "metersphere-frontend/src/utils/token"; import {getCurrentProjectID, getCurrentWorkspaceId} from "metersphere-frontend/src/utils/token";
import MsTag from "metersphere-frontend/src/components/MsTag"; import MsTag from "metersphere-frontend/src/components/MsTag";
import {getProjectConfig} from "@/api/project"; import {getProjectApplicationConfig} from "@/api/project";
import {apiTestReRun} from "@/api/xpack"; import {apiTestReRun} from "@/api/xpack";
import {getUUID} from "metersphere-frontend/src/utils"; import {getUUID} from "metersphere-frontend/src/utils";
@ -186,7 +186,7 @@ export default {
}); });
}, },
getProjectApplication() { getProjectApplication() {
getProjectConfig(getCurrentProjectID(), "/API_SHARE_REPORT_TIME").then(res => { getProjectApplicationConfig(getCurrentProjectID(), "/API_SHARE_REPORT_TIME").then(res => {
if (res.data && res.data.typeValue) { if (res.data && res.data.typeValue) {
let quantity = res.data.typeValue.substring(0, res.data.typeValue.length - 1); let quantity = res.data.typeValue.substring(0, res.data.typeValue.length - 1);
let unit = res.data.typeValue.substring(res.data.typeValue.length - 1); let unit = res.data.typeValue.substring(res.data.typeValue.length - 1);