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