diff --git a/src/locales/lang/en/sys.ts b/src/locales/lang/en/sys.ts index 13bb6c9..4fb919b 100644 --- a/src/locales/lang/en/sys.ts +++ b/src/locales/lang/en/sys.ts @@ -94,6 +94,7 @@ export default { // 占位符 accountPlaceholder: 'Please input username', passwordPlaceholder: 'Please input password', + identityProviderPlaceholder: 'Please select identity provider', smsPlaceholder: 'Please input sms code', mobilePlaceholder: 'Please input mobile', policyPlaceholder: 'Register after checking', diff --git a/src/locales/lang/zh-CN/sys.ts b/src/locales/lang/zh-CN/sys.ts index 24e0236..f5d9f63 100644 --- a/src/locales/lang/zh-CN/sys.ts +++ b/src/locales/lang/zh-CN/sys.ts @@ -89,6 +89,7 @@ export default { // 占位符 accountPlaceholder: '请输入账号', passwordPlaceholder: '请输入密码', + identityProviderPlaceholder: '请选择身份提供商', smsPlaceholder: '请输入验证码', mobilePlaceholder: '请输入手机号码', policyPlaceholder: '勾选后才能注册', diff --git a/src/views/system/ssoLogin/kics/index.vue b/src/views/system/ssoLogin/kics/index.vue index 3209275..bc7041a 100644 --- a/src/views/system/ssoLogin/kics/index.vue +++ b/src/views/system/ssoLogin/kics/index.vue @@ -47,19 +47,41 @@ /> +
+ + + + +
-
+
+
@@ -84,6 +106,10 @@ import { useDesign } from '/@/hooks/web/useDesign'; import { useAppInject } from '/@/hooks/web/useAppInject'; import { useRouter } from 'vue-router'; + import { ApiSelect } from '/@/components/Form'; + import { getDataByDictType } from '/@/api/platform/system/controller/dictdata'; + import {LoginStateEnum} from '/@/views/core/login/useLogin'; + import {Button, Checkbox} from 'ant-design-vue'; const { currentRoute, replace } = useRouter(); const { params, query } = unref(currentRoute); @@ -97,6 +123,8 @@ const formData = reactive({ username: '', password: '', + identityProvider: undefined, + tenantId: '1510456530575347712', }); const loginRef = ref(); const loginLoading = ref(false); @@ -111,11 +139,17 @@ createMessage.warn(t('sys.login.passwordPlaceholder')); return; } + if (!formData.identityProvider) { + createMessage.warn(t('sys.login.identityProviderPlaceholder')); + return; + } try { loginLoading.value = true; await userStore.login({ password: formData.password, username: formData.username, + identityProvider: formData.identityProvider, + tenantId: formData.tenantId, goHome: false, clientId: 'kics', performPostLoginAction: false @@ -202,6 +236,16 @@ margin-left: 5px; } } + + .other-login-ways { + color: rgba(0,0,0,.5); + text-align: center; + margin-top: 20px; + span { + padding: 5px; + } + } +