fix(接口测试): 新建用例未使用公用环境

--bug=1009054 --user=lyh
【github#8623】接口用例测试时,如果这个用例没选择过环境,右上角上面选择了没用
https://www.tapd.cn/55049933/s/1084231

Closes #8623
This commit is contained in:
shiziyuan9527 2021-12-21 15:20:11 +08:00 committed by 刘瑞斌
parent 94f610181d
commit cf2ae41dd2
1 changed files with 2 additions and 1 deletions

View File

@ -267,7 +267,8 @@ export default {
},
getTestCase() {
return new Promise((resolve) => {
this.environment = "";
let commonUseEnvironment = this.$store.state.useEnvironment;
this.environment = commonUseEnvironment ? commonUseEnvironment : "";
this.result = this.$get("/api/testcase/findById/" + this.testCaseId, response => {
let apiCase = response.data;
if (apiCase) {