fix(接口测试): 修复自定义请求编辑问题

This commit is contained in:
fit2-zhao 2022-02-17 13:21:11 +08:00 committed by 刘瑞斌
parent 159dc356d3
commit ffe8babd9c
1 changed files with 10 additions and 12 deletions

View File

@ -69,18 +69,16 @@ export default {
},
urlChange() {
this.isUrl = false;
if (this.isCustomizeReq) {
this.request.path = this.request.url;
}
if (!this.request.url || this.request.url.indexOf('?') === -1) return;
let url = this.getURL(this.addProtocol(this.request.url));
if (url) {
let paramUrl = this.request.url.substr(this.request.url.indexOf("?") + 1);
if (paramUrl && this.isUrl) {
this.request.url = decodeURIComponent(this.request.url.substr(0, this.request.url.indexOf("?")));
}
if (this.isCustomizeReq) {
this.request.path = this.request.url;
if (this.request.isRefEnvironment) {
this.pathChange();
} else {
if (!this.request.url || this.request.url.indexOf('?') === -1) return;
let url = this.getURL(this.addProtocol(this.request.url));
if (url) {
let paramUrl = this.request.url.substr(this.request.url.indexOf("?") + 1);
if (paramUrl && this.isUrl) {
this.request.url = decodeURIComponent(this.request.url.substr(0, this.request.url.indexOf("?")));
}
}
}
},