From a2873b52bc9c4112534bfc0dbcfa4c424b247d53 Mon Sep 17 00:00:00 2001 From: micropu <2001972@qq.com> Date: Mon, 29 Nov 2021 17:57:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91=E7=8E=AF=E5=A2=83=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=BF=AB=E9=80=9F=E9=80=89=E6=8B=A9=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/userLoginReg/Login.vue | 87 +++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/frontend/src/views/userLoginReg/Login.vue b/frontend/src/views/userLoginReg/Login.vue index 2131eaebe..06ffed8bc 100644 --- a/frontend/src/views/userLoginReg/Login.vue +++ b/frontend/src/views/userLoginReg/Login.vue @@ -102,6 +102,28 @@ >确定 + + 快速选择用户(测试功能) + + + +

快速选择用户

+ + + + + +
+
其他登录方式 @@ -132,6 +154,7 @@ import TwoStepCaptcha from '@/components/tools/TwoStepCaptcha' import { mapActions } from 'vuex' import { getSmsCaptcha, getCaptchaOpen } from '@/api/modular/system/loginManage' import Verify from '@/components/verifition/Verify' +import config from '@/config/defaultSettings' export default { components: { @@ -140,6 +163,20 @@ export default { }, data () { return { + users: [ + { + name: '超级管理员', + username: 'superAdmin', + password: '123456' + }, + { + name: '超级租户1', + username: 'zuohuaijun', + password: '123456' + } + ], + production: config.production, + QuickLoginVisible: false, customActiveKey: 'tab1', loginBtn: false, // login type: 0 email, 1 username, 2 telephone @@ -170,6 +207,26 @@ export default { this.getLocalStorageData() }, methods: { + handleUserBtnClick(user) { + const loginParams = { + account: user.username, + password: user.password + } + + this.Login(loginParams) + .then(res => this.loginSuccess(res)) + .catch(err => this.requestFailed(JSON.stringify(err))) + .finally(() => {}) + }, + QuickLogin() { + this.QuickLoginVisible = true + }, + handleOk() { + this.QuickLoginVisible = false + }, + handleCancel() { + this.QuickLoginVisible = false + }, ...mapActions(['Login', 'Logout', 'dictTypeData']), /** * 获取验证码开关 @@ -334,6 +391,36 @@ export default {