fix(项目设置): 修复项目环境创建失败的缺陷

--bug=1027765 --user=王孝刚 [项目设置]项目环境-创建环境失败
https://www.tapd.cn/55049933/s/1392740
This commit is contained in:
wxg0103 2023-07-13 11:13:31 +08:00 committed by fit2-zhao
parent c9a4138c71
commit 9f7bc0aafd
2 changed files with 4 additions and 2 deletions

View File

@ -451,7 +451,6 @@ export default {
if (socket.startsWith("${")){
let split = socket.split(":");
this.condition.domain = split[0];
return true;
}
return true;
},

View File

@ -432,6 +432,9 @@ export default {
}
},
validateSocket(socket) {
if (!socket) {
return true;
}
this.condition.socket = socket;
let urlStr = this.condition.protocol + "://" + socket;
let url = {};
@ -441,7 +444,7 @@ export default {
return true;
}
this.condition.domain = decodeURIComponent(url.hostname);
if (socket.startsWith("${")){
if (socket && socket.startsWith("${")){
let split = socket.split(":");
this.condition.domain = split[0];
}