|
@@ -1,6 +1,31 @@
|
|
<template>
|
|
<template>
|
|
- <div class="login shoue">
|
|
|
|
- <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
|
|
|
|
|
+
|
|
|
|
+ <div :class="showe == true? 'login shoue' : 'login-formyi shoue'" >
|
|
|
|
+ <div class="login-form login-formba" v-if="!showe" style="height: 330px;">
|
|
|
|
+ <img src="../assets/images/pic_htgl_dl_logo_yj.png" alt="" style="margin-left: 50%; transform: translateX(-50%);">
|
|
|
|
+ <h3 class="title" style="margin-bottom: 40px;">登录</h3>
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="valhpos"
|
|
|
|
+ type="password"
|
|
|
|
+ auto-complete="off"
|
|
|
|
+ placeholder="密码"
|
|
|
|
+ show-password
|
|
|
|
+ @keyup.enter.native="handleLogin"
|
|
|
|
+ >
|
|
|
|
+ <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
|
|
|
+ </el-input>
|
|
|
|
+ <el-button
|
|
|
|
+ :loading="loading"
|
|
|
|
+ size="medium"
|
|
|
|
+ type="primary"
|
|
|
|
+ style="width:100%;background-color: #46A5D6; border-color: #46A5D6; margin-top: 40px; margin-bottom: 20px;"
|
|
|
|
+ @click.native.prevent="handleLogindt"
|
|
|
|
+ >
|
|
|
|
+ <span v-if="!loading">登 录</span>
|
|
|
|
+ <span v-else>登 录 中...</span>
|
|
|
|
+ </el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <el-form v-if="showe" ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
|
<img src="../assets/images/pic_htgl_dl_logo.png" alt="" style="margin-left: 50%; transform: translateX(-50%);">
|
|
<img src="../assets/images/pic_htgl_dl_logo.png" alt="" style="margin-left: 50%; transform: translateX(-50%);">
|
|
<h3 class="title">登录</h3>
|
|
<h3 class="title">登录</h3>
|
|
<el-form-item prop="username">
|
|
<el-form-item prop="username">
|
|
@@ -59,15 +84,11 @@
|
|
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
- <!-- 底部 -->
|
|
|
|
- <!-- <div class="el-login-footer">
|
|
|
|
- <span>Copyright © 2018-2025 ruoyi.vip All Rights Reserved.</span>
|
|
|
|
- </div> -->
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getCodeImg } from "@/api/login"
|
|
|
|
|
|
+import { getCodeImg,checkDynamicPassword } from "@/api/login"
|
|
import Cookies from "js-cookie"
|
|
import Cookies from "js-cookie"
|
|
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
|
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
|
|
|
|
|
@@ -98,7 +119,9 @@ export default {
|
|
captchaEnabled: false,
|
|
captchaEnabled: false,
|
|
// 注册开关
|
|
// 注册开关
|
|
register: true,
|
|
register: true,
|
|
- redirect: undefined
|
|
|
|
|
|
+ redirect: undefined,
|
|
|
|
+ showe:false,
|
|
|
|
+ valhpos:null
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -110,10 +133,27 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.getCode()
|
|
|
|
- this.getCookie()
|
|
|
|
|
|
+ this.showe = false
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ // 动态密码
|
|
|
|
+ handleLogindt(){
|
|
|
|
+ if(this.valhpos == null || this.valhpos == ''){
|
|
|
|
+ this.$message.error('请先输入密码');
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ checkDynamicPassword(this.valhpos).then(res => {
|
|
|
|
+
|
|
|
|
+ // this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
|
|
|
|
+ // if (this.captchaEnabled) {
|
|
|
|
+ // this.codeUrl = "data:image/gif;base64," + res.img
|
|
|
|
+ // this.loginForm.uuid = res.uuid
|
|
|
|
+ // }
|
|
|
|
+ this.showe = true
|
|
|
|
+ this.getCode()
|
|
|
|
+ this.getCookie()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
getCode() {
|
|
getCode() {
|
|
getCodeImg().then(res => {
|
|
getCodeImg().then(res => {
|
|
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
|
|
this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled
|
|
@@ -223,6 +263,15 @@ export default {
|
|
margin-bottom: 32px;
|
|
margin-bottom: 32px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.login-formyi{
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ height: 100%;
|
|
|
|
+ background-image: url("../assets/images/pic_htgl_bgs.png");
|
|
|
|
+ background-size: cover;
|
|
|
|
+ position: relative;
|
|
|
|
+}
|
|
.login-tip {
|
|
.login-tip {
|
|
font-size: 13px;
|
|
font-size: 13px;
|
|
text-align: center;
|
|
text-align: center;
|
|
@@ -252,4 +301,7 @@ export default {
|
|
.login-code-img {
|
|
.login-code-img {
|
|
height: 38px;
|
|
height: 38px;
|
|
}
|
|
}
|
|
|
|
+.login-formba{
|
|
|
|
+ background-image: url("../assets/images/pic_htgl_srbg_yj.png");
|
|
|
|
+}
|
|
</style>
|
|
</style>
|