|
|
@ -17,7 +17,7 @@ |
|
|
|
<!-- <img src="../assets/image/login-logo.png" width="120px;" /> --> |
|
|
|
<div class="loginTitle" >欢迎登录</div> |
|
|
|
</div> |
|
|
|
<div class="title">{{ 济菏数字运营管理平台 }}</div> |
|
|
|
<div class="title">{{ '' }}</div> |
|
|
|
<el-form-item prop="username"> |
|
|
|
<el-input |
|
|
|
v-model="loginForm.username" |
|
|
@ -101,8 +101,8 @@ export default { |
|
|
|
title: "", // 系统标题 |
|
|
|
cookiePassword: "", |
|
|
|
loginForm: { |
|
|
|
username: "admin", |
|
|
|
password: "admin123", |
|
|
|
username: "", //admin |
|
|
|
password: "", //admin123 |
|
|
|
rememberMe: false, |
|
|
|
code: "", |
|
|
|
uuid: "", |
|
|
@ -133,7 +133,7 @@ export default { |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.getCookie(); |
|
|
|
this.getCaptchaOnOffFun(); |
|
|
|
//this.getCaptchaOnOffFun(); |
|
|
|
this.title = systemConfig.title(systemConfig.systemType); |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -147,7 +147,8 @@ export default { |
|
|
|
capctchaCheckSuccess(params) { |
|
|
|
this.loginForm.code = params.captchaVerification; |
|
|
|
this.loading = true; |
|
|
|
if (this.loginForm.rememberMe) { |
|
|
|
console.log(this.loginForm.rememberMe,"======================="); |
|
|
|
if (this.loginForm.rememberMe == true) { |
|
|
|
Cookies.set("username", this.loginForm.username, { expires: 30 }); |
|
|
|
Cookies.set("password", encrypt(this.loginForm.password), { |
|
|
|
expires: 30, |
|
|
@ -171,10 +172,11 @@ export default { |
|
|
|
const username = Cookies.get("username"); |
|
|
|
const password = Cookies.get("password"); |
|
|
|
const rememberMe = Cookies.get("rememberMe"); |
|
|
|
console.log("rem",rememberMe); |
|
|
|
this.loginForm = { |
|
|
|
username: username === undefined ? this.loginForm.username : username, |
|
|
|
password: |
|
|
|
password === undefined ? this.loginForm.password : decrypt(password), |
|
|
|
password === undefined ? this.loginForm.password : decrypt(password), |
|
|
|
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe), |
|
|
|
}; |
|
|
|
}, |
|
|
@ -186,6 +188,19 @@ export default { |
|
|
|
} |
|
|
|
}); |
|
|
|
} else { |
|
|
|
|
|
|
|
if (this.loginForm.rememberMe == true) { |
|
|
|
Cookies.set("username", this.loginForm.username, { expires: 30 }); |
|
|
|
Cookies.set("password", encrypt(this.loginForm.password), { |
|
|
|
expires: 30, |
|
|
|
}); |
|
|
|
Cookies.set("rememberMe", this.loginForm.rememberMe, { expires: 30 }); |
|
|
|
} else { |
|
|
|
Cookies.remove("username"); |
|
|
|
Cookies.remove("password"); |
|
|
|
Cookies.remove("rememberMe"); |
|
|
|
} |
|
|
|
|
|
|
|
this.$store |
|
|
|
.dispatch("Login", this.loginForm) |
|
|
|
.then(() => { |
|
|
@ -249,10 +264,16 @@ export default { |
|
|
|
margin-left:68px; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deef .el-checkbox__label { |
|
|
|
color:#fff; |
|
|
|
::v-deep .el-checkbox__label { |
|
|
|
color:#fff; |
|
|
|
font-size: 18px !important; |
|
|
|
font-family: Source Han Sans CN, Source Han Sans CN; |
|
|
|
font-weight: 400; |
|
|
|
color: #FFFFFF !important; |
|
|
|
margin-bottom: 10px; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-form-item__error { |
|
|
|
position: absolute; |
|
|
|
top:75px; |
|
|
|