diff --git a/frontend/src/views/website/website/config/basic/https/index.vue b/frontend/src/views/website/website/config/basic/https/index.vue index 18d54e937..7487f7602 100644 --- a/frontend/src/views/website/website/config/basic/https/index.vue +++ b/frontend/src/views/website/website/config/basic/https/index.vue @@ -222,7 +222,16 @@ const listSSL = () => { ListSSL(sslReq).then((res) => { ssls.value = res.data || []; if (ssls.value.length > 0) { - form.websiteSSLId = ssls.value[0].id; + let exist = false; + for (const ssl of ssls.value) { + if (ssl.id === form.websiteSSLId) { + exist = true; + break; + } + } + if (!exist) { + form.websiteSSLId = ssls.value[0].id; + } changeSSl(form.websiteSSLId); } else { websiteSSL.value = {};