From 7674804f38c18bbe7de78dda3e0fccb826c398a0 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Thu, 18 Sep 2025 15:47:49 +0800 Subject: [PATCH] fix: update login methods retrieval to use data from authentication settings --- .../authentication/component/Setting.vue | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/ui/src/views/system-setting/authentication/component/Setting.vue b/ui/src/views/system-setting/authentication/component/Setting.vue index 570d85695..b51244c63 100644 --- a/ui/src/views/system-setting/authentication/component/Setting.vue +++ b/ui/src/views/system-setting/authentication/component/Setting.vue @@ -88,20 +88,6 @@ const form = ref({ max_attempts: 1, }) -const fetchLoginMethods = () => { - // 模拟接口返回数据 - loginMethods.value = [ - {label: '密码登录', value: 'password'}, - {label: 'LDAP', value: 'ldap'}, - {label: 'OIDC', value: 'oidc'}, - {label: 'CAS', value: 'cas'}, - {label: 'OAuth2', value: 'oauth2'}, - {label: '企业微信', value: 'wechat'}, - {label: '钉钉', value: 'dingding'}, - {label: '飞书', value: 'lark'}, - ]; -}; - const submit = async (formEl: FormInstance | undefined) => { if (!formEl) return; console.log(form) @@ -118,10 +104,10 @@ const submit = async (formEl: FormInstance | undefined) => { onMounted(() => { - fetchLoginMethods(); authApi.getLoginSetting().then((res) => { if (Object.keys(res.data).length > 0) { form.value = res.data; + loginMethods.value =res.data.auth_types } }) });