From 90db83e12e3d8e74d8d2f3786f197a2ed2e23c6f Mon Sep 17 00:00:00 2001 From: xingyu Date: Wed, 20 Jul 2022 10:00:29 +0800 Subject: [PATCH] feat: add qrcode login --- yudao-ui-admin-vue3/src/locales/en.ts | 1 + yudao-ui-admin-vue3/src/locales/zh-CN.ts | 1 + yudao-ui-admin-vue3/src/views/Login/Login.vue | 4 ++- .../src/views/Login/components/LoginForm.vue | 4 ++- .../src/views/Login/components/QrCodeForm.vue | 34 +++++++++++++++++++ .../views/Login/components/RegisterForm.vue | 10 +++--- .../src/views/Login/components/index.ts | 3 +- 7 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 yudao-ui-admin-vue3/src/views/Login/components/QrCodeForm.vue diff --git a/yudao-ui-admin-vue3/src/locales/en.ts b/yudao-ui-admin-vue3/src/locales/en.ts index 9ec9121b8..6d0cff298 100644 --- a/yudao-ui-admin-vue3/src/locales/en.ts +++ b/yudao-ui-admin-vue3/src/locales/en.ts @@ -124,6 +124,7 @@ export default { getSmsCode: 'Get SMS Code', btnMobile: 'Mobile sign in', btnQRCode: 'QR code sign in', + qrcode: 'Scan the QR code to log in', btnRegister: 'Sign up', SmsSendMsg: 'code has been sent' }, diff --git a/yudao-ui-admin-vue3/src/locales/zh-CN.ts b/yudao-ui-admin-vue3/src/locales/zh-CN.ts index 06b503006..96098d178 100644 --- a/yudao-ui-admin-vue3/src/locales/zh-CN.ts +++ b/yudao-ui-admin-vue3/src/locales/zh-CN.ts @@ -124,6 +124,7 @@ export default { getSmsCode: '获取验证码', btnMobile: '手机登录', btnQRCode: '二维码登录', + qrcode: '扫描二维码登录', btnRegister: '注册', SmsSendMsg: '验证码已发送' }, diff --git a/yudao-ui-admin-vue3/src/views/Login/Login.vue b/yudao-ui-admin-vue3/src/views/Login/Login.vue index f81180002..e4638876f 100644 --- a/yudao-ui-admin-vue3/src/views/Login/Login.vue +++ b/yudao-ui-admin-vue3/src/views/Login/Login.vue @@ -1,5 +1,5 @@ + + diff --git a/yudao-ui-admin-vue3/src/views/Login/components/RegisterForm.vue b/yudao-ui-admin-vue3/src/views/Login/components/RegisterForm.vue index 13820962d..1424a9c9d 100644 --- a/yudao-ui-admin-vue3/src/views/Login/components/RegisterForm.vue +++ b/yudao-ui-admin-vue3/src/views/Login/components/RegisterForm.vue @@ -121,20 +121,20 @@ const loginRegister = async () => { diff --git a/yudao-ui-admin-vue3/src/views/Login/components/index.ts b/yudao-ui-admin-vue3/src/views/Login/components/index.ts index 2ac13ca18..903b17233 100644 --- a/yudao-ui-admin-vue3/src/views/Login/components/index.ts +++ b/yudao-ui-admin-vue3/src/views/Login/components/index.ts @@ -2,5 +2,6 @@ import LoginForm from './LoginForm.vue' import MobileForm from './MobileForm.vue' import LoginFormTitle from './LoginFormTitle.vue' import RegisterForm from './RegisterForm.vue' +import QrCodeForm from './QrCodeForm.vue' -export { LoginForm, MobileForm, LoginFormTitle, RegisterForm } +export { LoginForm, MobileForm, LoginFormTitle, RegisterForm, QrCodeForm }