fix(接口测试): 修复TCP、SQL接口定义- TEST页面,右上角选择环境后没有自动带入的缺陷

--bug=1010115 --user=王孝刚 【接口测试】TCP、SQL接口定义- TEST页面,右上角选择环境后没有自动带入
https://www.tapd.cn/55049933/s/1104767
This commit is contained in:
wxg0103 2022-02-17 10:02:38 +08:00 committed by xiaomeinvG
parent 9c0bfaa912
commit d0bdd8fce1
2 changed files with 6 additions and 0 deletions

View File

@ -218,6 +218,9 @@
this.environments.forEach(environment => {
parseEnvironment(environment);
});
if (!this.request.environmentId) {
this.request.environmentId = this.$store.state.useEnvironment;
}
let hasEnvironment = false;
for (let i in this.environments) {
if (this.environments[i].id === this.request.environmentId) {

View File

@ -323,6 +323,9 @@ export default {
//
this.api = JSON.parse(JSON.stringify(this.apiData));
this.api.protocol = this.currentProtocol;
if (!this.api.environmentId) {
this.api.environmentId = this.$store.state.useEnvironment;
}
this.currentRequest = this.api.request;
this.runLoading = false;
this.getResult();