Skip to content

Commit 7674804

Browse files
committed
fix: update login methods retrieval to use data from authentication settings
1 parent faf2381 commit 7674804

File tree

1 file changed

+1
-15
lines changed
  • ui/src/views/system-setting/authentication/component

1 file changed

+1
-15
lines changed

ui/src/views/system-setting/authentication/component/Setting.vue

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,6 @@ const form = ref<any>({
8888
max_attempts: 1,
8989
})
9090
91-
const fetchLoginMethods = () => {
92-
// 模拟接口返回数据
93-
loginMethods.value = [
94-
{label: '密码登录', value: 'password'},
95-
{label: 'LDAP', value: 'ldap'},
96-
{label: 'OIDC', value: 'oidc'},
97-
{label: 'CAS', value: 'cas'},
98-
{label: 'OAuth2', value: 'oauth2'},
99-
{label: '企业微信', value: 'wechat'},
100-
{label: '钉钉', value: 'dingding'},
101-
{label: '飞书', value: 'lark'},
102-
];
103-
};
104-
10591
const submit = async (formEl: FormInstance | undefined) => {
10692
if (!formEl) return;
10793
console.log(form)
@@ -118,10 +104,10 @@ const submit = async (formEl: FormInstance | undefined) => {
118104
119105
120106
onMounted(() => {
121-
fetchLoginMethods();
122107
authApi.getLoginSetting().then((res) => {
123108
if (Object.keys(res.data).length > 0) {
124109
form.value = res.data;
110+
loginMethods.value =res.data.auth_types
125111
}
126112
})
127113
});

0 commit comments

Comments
 (0)