projects/mes-test #133

Merged
gtz217 merged 281 commits from projects/mes-test into projects/mes 2023-11-30 09:11:34 +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_CAPTCHA_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_CAPTCHA_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_CAPTCHA_ENABLE = true
# 文档的开关
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_CAPTCHA_ENABLE = true
# 文档的开关
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_CAPTCHA_ENABLE = true
# 文档的开关
VUE_APP_DOC_ENABLE = true

View File

@ -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;
}
/**
* 获得文档是否开启
*/

View File

@ -80,13 +80,6 @@
<!-- 表单 -->
<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="">
<el-form
ref="loginForm"
@ -106,7 +99,7 @@
</el-input>
</el-form-item>
<!-- 账号密码登录 -->
<div v-if="loginForm.loginType === 'uname'">
<div>
<el-form-item prop="username">
<el-input
v-model="loginForm.username"
@ -139,56 +132,6 @@
</el-checkbox>
</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
id="button-form-item"
@ -227,13 +170,6 @@
</div>
</div>
</div>
<!-- 图形验证码 -->
<Verify
ref="verify"
:captcha-type="'blockPuzzle'"
:img-size="{ width: '400px', height: '200px' }"
@success="handleLogin" />
</div>
</template>
@ -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();
},
getCookie() {
const username = getUsername();
@ -522,4 +448,7 @@ export default {
top: 22%;
}
}
.form-cont {
padding-top: 40px;
}
</style>