From de65afef11e4112688344646f83830f56129e5ea Mon Sep 17 00:00:00 2001 From: juzi <819872918@qq.com> Date: Wed, 29 Nov 2023 10:12:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E9=A1=B5=E5=8E=BB=E6=8E=89?= =?UTF-8?q?=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.dev | 3 -- .env.front | 3 -- .env.prod | 3 -- .env.stage | 3 -- .env.static | 3 -- src/utils/ruoyi.js | 13 ------- src/views/login.vue | 85 ++++----------------------------------------- 7 files changed, 7 insertions(+), 106 deletions(-) diff --git a/.env.dev b/.env.dev index 3497fe49..1da25e71 100644 --- a/.env.dev +++ b/.env.dev @@ -31,9 +31,6 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true # 多租户的开关 VUE_APP_TENANT_ENABLE = true -# 验证码的开关 -VUE_APP_CAPTCHA_ENABLE = true - # 文档的开关 VUE_APP_DOC_ENABLE = true diff --git a/.env.front b/.env.front index 743152e3..d1645075 100644 --- a/.env.front +++ b/.env.front @@ -14,9 +14,6 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true # 多租户的开关 VUE_APP_TENANT_ENABLE = true -# 验证码的开关 -VUE_APP_CAPTCHA_ENABLE = true - # 文档的开关 VUE_APP_DOC_ENABLE = true diff --git a/.env.prod b/.env.prod index 4fa71c08..8526c196 100644 --- a/.env.prod +++ b/.env.prod @@ -28,9 +28,6 @@ VUE_APP_APP_NAME ='yudao-admin' # 多租户的开关 VUE_APP_TENANT_ENABLE = true -# 验证码的开关 -VUE_APP_CAPTCHA_ENABLE = true - # 文档的开关 VUE_APP_DOC_ENABLE = false diff --git a/.env.stage b/.env.stage index b25d7a96..763cc8b5 100644 --- a/.env.stage +++ b/.env.stage @@ -15,9 +15,6 @@ PUBLIC_PATH = 'http://static.yudao.iocoder.cn/' # 多租户的开关 VUE_APP_TENANT_ENABLE = true -# 验证码的开关 -VUE_APP_CAPTCHA_ENABLE = true - # 文档的开关 VUE_APP_DOC_ENABLE = false diff --git a/.env.static b/.env.static index 35e7a28e..bdb29f8f 100644 --- a/.env.static +++ b/.env.static @@ -17,9 +17,6 @@ VUE_APP_APP_NAME ='/admin-ui-vue2/' # 多租户的开关 VUE_APP_TENANT_ENABLE = true -# 验证码的开关 -VUE_APP_CAPTCHA_ENABLE = true - # 文档的开关 VUE_APP_DOC_ENABLE = true diff --git a/src/utils/ruoyi.js b/src/utils/ruoyi.js index fd5d1095..3b4e5256 100644 --- a/src/utils/ruoyi.js +++ b/src/utils/ruoyi.js @@ -187,19 +187,6 @@ export function getTenantEnable() { return process.env.VUE_APP_TENANT_ENABLE || true; } -/** - * 获得验证码功能是否开启 - */ -export function getCaptchaEnable() { - if (process.env.VUE_APP_CAPTCHA_ENABLE === "true") { - return true; - } - if (process.env.VUE_APP_CAPTCHA_ENABLE === "false") { - return false; - } - return process.env.VUE_APP_CAPTCHA_ENABLE || true; -} - /** * 获得文档是否开启 */ diff --git a/src/views/login.vue b/src/views/login.vue index 2f229f11..4434c6eb 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -80,13 +80,6 @@
- - - -
-
+
- -
- - - - - - - - -
-
- - -
@@ -241,7 +177,7 @@ import { sendSmsCode, socialAuthRedirect } from '@/api/login'; import { getTenantIdByName } from '@/api/system/tenant'; import { SystemUserSocialTypeEnum } from '@/utils/constants'; -import { getCaptchaEnable, getTenantEnable } from '@/utils/ruoyi'; +import { getTenantEnable } from '@/utils/ruoyi'; import { getPassword, getRememberMe, @@ -269,7 +205,7 @@ export default { data() { return { codeUrl: '', - captchaEnable: true, + captchaEnable: false, tenantEnable: true, mobileCodeTimer: 0, loginForm: { @@ -347,8 +283,6 @@ export default { } }); } - // 验证码开关 - this.captchaEnable = getCaptchaEnable(); // 重定向地址 this.redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) @@ -360,15 +294,7 @@ export default { }, methods: { getCode() { - // 情况一,未开启:则直接登录 - if (!this.captchaEnable) { - this.handleLogin({}); - return; - } - - // 情况二,已开启:则展示验证码;只有完成验证码的情况,才进行登录 - // 弹出验证码 - this.$refs.verify.show(); + this.handleLogin({}); }, getCookie() { const username = getUsername(); @@ -522,4 +448,7 @@ export default { top: 22%; } } +.form-cont { + padding-top: 40px; +} -- 2.45.2