projects/mes-zjl #126

Merged
juzi merged 2 commits from projects/mes-zjl into projects/mes-test 2023-11-29 10:16:00 +08:00
7 changed files with 7 additions and 106 deletions
Showing only changes of commit de65afef11 - Show all commits

View File

@ -31,9 +31,6 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
# 多租户的开关 # 多租户的开关
VUE_APP_TENANT_ENABLE = true VUE_APP_TENANT_ENABLE = true
# 验证码的开关
VUE_APP_CAPTCHA_ENABLE = true
# 文档的开关 # 文档的开关
VUE_APP_DOC_ENABLE = true VUE_APP_DOC_ENABLE = true

View File

@ -14,9 +14,6 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
# 多租户的开关 # 多租户的开关
VUE_APP_TENANT_ENABLE = true VUE_APP_TENANT_ENABLE = true
# 验证码的开关
VUE_APP_CAPTCHA_ENABLE = true
# 文档的开关 # 文档的开关
VUE_APP_DOC_ENABLE = true VUE_APP_DOC_ENABLE = true

View File

@ -28,9 +28,6 @@ VUE_APP_APP_NAME ='yudao-admin'
# 多租户的开关 # 多租户的开关
VUE_APP_TENANT_ENABLE = true VUE_APP_TENANT_ENABLE = true
# 验证码的开关
VUE_APP_CAPTCHA_ENABLE = true
# 文档的开关 # 文档的开关
VUE_APP_DOC_ENABLE = false VUE_APP_DOC_ENABLE = false

View File

@ -15,9 +15,6 @@ PUBLIC_PATH = 'http://static.yudao.iocoder.cn/'
# 多租户的开关 # 多租户的开关
VUE_APP_TENANT_ENABLE = true VUE_APP_TENANT_ENABLE = true
# 验证码的开关
VUE_APP_CAPTCHA_ENABLE = true
# 文档的开关 # 文档的开关
VUE_APP_DOC_ENABLE = false VUE_APP_DOC_ENABLE = false

View File

@ -17,9 +17,6 @@ VUE_APP_APP_NAME ='/admin-ui-vue2/'
# 多租户的开关 # 多租户的开关
VUE_APP_TENANT_ENABLE = true VUE_APP_TENANT_ENABLE = true
# 验证码的开关
VUE_APP_CAPTCHA_ENABLE = true
# 文档的开关 # 文档的开关
VUE_APP_DOC_ENABLE = true VUE_APP_DOC_ENABLE = true

View File

@ -187,19 +187,6 @@ export function getTenantEnable() {
return process.env.VUE_APP_TENANT_ENABLE || true; 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;
}
/** /**
* 获得文档是否开启 * 获得文档是否开启
*/ */

View File

@ -80,13 +80,6 @@
<!-- 表单 --> <!-- 表单 -->
<div class="form-cont"> <div class="form-cont">
<el-tabs
class="form"
v-model="loginForm.loginType"
style="float: none">
<el-tab-pane label="账号密码登录" name="uname"></el-tab-pane>
<el-tab-pane label="短信验证码登录" name="sms"></el-tab-pane>
</el-tabs>
<div style=""> <div style="">
<el-form <el-form
ref="loginForm" ref="loginForm"
@ -106,7 +99,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<!-- 账号密码登录 --> <!-- 账号密码登录 -->
<div v-if="loginForm.loginType === 'uname'"> <div>
<el-form-item prop="username"> <el-form-item prop="username">
<el-input <el-input
v-model="loginForm.username" v-model="loginForm.username"
@ -139,56 +132,6 @@
</el-checkbox> </el-checkbox>
</div> </div>
<!-- 短信验证码登录 -->
<div v-if="loginForm.loginType === 'sms'">
<el-form-item prop="mobile">
<el-input
v-model="loginForm.mobile"
type="text"
auto-complete="off"
placeholder="请输入手机号">
<!-- <svg-icon
slot="prefix"
icon-class="phone"
class="el-input__icon input-icon" /> -->
</el-input>
</el-form-item>
<el-form-item prop="mobileCode">
<el-input
v-model="loginForm.mobileCode"
type="text"
auto-complete="off"
placeholder="短信验证码"
class="sms-login-mobile-code-prefix"
@keyup.enter.native="handleLogin">
<!-- <template>
<svg-icon
slot="prefix"
icon-class="password"
class="el-input__icon input-icon" />
</template> -->
<template slot="suffix">
<span
v-if="mobileCodeTimer <= 0"
class="getMobileCode"
@click="getSmsCode"
style="
cursor: pointer;
color: #0b58ff;
font-size: calc(12 * 0.12vh);
line-height: calc(54 * 0.12vh);
padding-right: calc(10 * 0.12vh);
">
获取验证码
</span>
<span v-if="mobileCodeTimer > 0" class="getMobileCode">
{{ mobileCodeTimer }}秒后可重新获取
</span>
</template>
</el-input>
</el-form-item>
</div>
<!-- 下方的登录按钮 --> <!-- 下方的登录按钮 -->
<el-form-item <el-form-item
id="button-form-item" id="button-form-item"
@ -227,13 +170,6 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 图形验证码 -->
<Verify
ref="verify"
:captcha-type="'blockPuzzle'"
:img-size="{ width: '400px', height: '200px' }"
@success="handleLogin" />
</div> </div>
</template> </template>
@ -241,7 +177,7 @@
import { sendSmsCode, socialAuthRedirect } from '@/api/login'; import { sendSmsCode, socialAuthRedirect } from '@/api/login';
import { getTenantIdByName } from '@/api/system/tenant'; import { getTenantIdByName } from '@/api/system/tenant';
import { SystemUserSocialTypeEnum } from '@/utils/constants'; import { SystemUserSocialTypeEnum } from '@/utils/constants';
import { getCaptchaEnable, getTenantEnable } from '@/utils/ruoyi'; import { getTenantEnable } from '@/utils/ruoyi';
import { import {
getPassword, getPassword,
getRememberMe, getRememberMe,
@ -269,7 +205,7 @@ export default {
data() { data() {
return { return {
codeUrl: '', codeUrl: '',
captchaEnable: true, captchaEnable: false,
tenantEnable: true, tenantEnable: true,
mobileCodeTimer: 0, mobileCodeTimer: 0,
loginForm: { loginForm: {
@ -347,8 +283,6 @@ export default {
} }
}); });
} }
//
this.captchaEnable = getCaptchaEnable();
// //
this.redirect = this.$route.query.redirect this.redirect = this.$route.query.redirect
? decodeURIComponent(this.$route.query.redirect) ? decodeURIComponent(this.$route.query.redirect)
@ -360,15 +294,7 @@ export default {
}, },
methods: { methods: {
getCode() { getCode() {
//
if (!this.captchaEnable) {
this.handleLogin({}); this.handleLogin({});
return;
}
//
//
this.$refs.verify.show();
}, },
getCookie() { getCookie() {
const username = getUsername(); const username = getUsername();
@ -522,4 +448,7 @@ export default {
top: 22%; top: 22%;
} }
} }
.form-cont {
padding-top: 40px;
}
</style> </style>