fix(接口测试): 修复接口校验url的逻辑

--bug=1025475 --user=王孝刚 【接口测试】创建接口未填写路径-点击保存无提示
https://www.tapd.cn/55049933/s/1363297
This commit is contained in:
wxg0103 2023-04-17 13:37:46 +08:00 committed by fit2-zhao
parent c98f8707e5
commit 3ad28234e5
2 changed files with 2 additions and 2 deletions

View File

@ -220,7 +220,7 @@ export default {
},
data() {
let validateURL = (rule, value, callback) => {
if (!this.httpForm.path.startsWith('/')) {
if (!this.httpForm.path || !this.httpForm.path.startsWith('/')) {
callback(this.$t('api_test.definition.request.path_valid_info'));
}
callback();

View File

@ -146,7 +146,7 @@ export default {
},
data() {
let validateURL = (rule, value, callback) => {
if (!this.api.request.path.startsWith('/')) {
if (!this.api.request.path || !this.api.request.path.startsWith('/')) {
callback(this.$t('api_test.definition.request.path_valid_info'));
}
callback();