diff --git a/frontend/src/views/website/website/config/basic/limit-conn/index.vue b/frontend/src/views/website/website/config/basic/limit-conn/index.vue index 6de665640..898089312 100644 --- a/frontend/src/views/website/website/config/basic/limit-conn/index.vue +++ b/frontend/src/views/website/website/config/basic/limit-conn/index.vue @@ -7,6 +7,7 @@ + { loading.value = true; GetNginxConfig(scopeReq) .then((res) => { - ruleKey.value = limitRules[0].key; + ruleKey.value = 'current'; if (res.data) { enable.value = res.data.enable; if (res.data.enable == false) { @@ -102,14 +103,14 @@ const search = (scopeReq: Website.NginxScopeReq) => { } for (const param of res.data.params) { if (param.name === 'limit_conn') { - if (param.params[0] === 'perserver') { + if (param.params[0] === 'perserver' && param.params[1]) { form.perserver = Number(param.params[1].match(/\d+/g)); } - if (param.params[0] === 'perip') { + if (param.params[0] === 'perip' && param.params[1]) { form.perip = Number(param.params[1].match(/\d+/g)); } } - if (param.name === 'limit_rate') { + if (param.name === 'limit_rate' && param.params[0]) { form.rate = Number(param.params[0].match(/\d+/g)); } } diff --git a/frontend/src/views/website/website/config/basic/site-folder/index.vue b/frontend/src/views/website/website/config/basic/site-folder/index.vue index 25beb716d..e454ece6d 100644 --- a/frontend/src/views/website/website/config/basic/site-folder/index.vue +++ b/frontend/src/views/website/website/config/basic/site-folder/index.vue @@ -163,6 +163,7 @@ const getDirs = async () => { loading.value = true; await GetFilesList(dirReq) .then((res) => { + dirs.value = []; const items = res.data.items || []; for (const item of items) { dirs.value.push(item.name);