fix(接口测试): 接口首页不同协议的用例跳转

--user=郭雨琦
--bug=1014073
【接口测试】首页-过去7天测试计划失败用例TOP10,非HTTP的接口也会跳到HTTP页面
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001014073
This commit is contained in:
guoyuqi 2022-06-15 17:24:04 +08:00 committed by 刘瑞斌
parent b7458472c8
commit dac8d7c0ec
1 changed files with 3 additions and 3 deletions

View File

@ -87,7 +87,7 @@ export default {
} else { } else {
this.$get('/api/definition/get/' + apiCase.apiDefinitionId, (response) => { this.$get('/api/definition/get/' + apiCase.apiDefinitionId, (response) => {
let api = response.data; let api = response.data;
if (api) { if (!api) {
this.$message.error(this.$t('api_test.home_page.api_details_card.title') + this.$t('commons.not_exist')) this.$message.error(this.$t('api_test.home_page.api_details_card.title') + this.$t('commons.not_exist'))
} else { } else {
if (param.protocol === 'dubbo://') { if (param.protocol === 'dubbo://') {
@ -97,8 +97,8 @@ export default {
name: 'ApiDefinition', name: 'ApiDefinition',
params: { params: {
redirectID: getUUID(), redirectID: getUUID(),
dataType: "api", dataType: "apiTestCase",
dataSelectRange: 'edit:' + param.id, dataSelectRange: 'single:' + param.id,
projectId: getCurrentProjectID(), projectId: getCurrentProjectID(),
type: api.protocol, type: api.protocol,
workspaceId: getCurrentWorkspaceId(), workspaceId: getCurrentWorkspaceId(),