|
@@ -76,7 +76,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item class="text-position">
|
|
<el-form-item class="text-position">
|
|
|
<div class="page-part" v-if="loginStyle.needRememberPwd">
|
|
<div class="page-part" v-if="loginStyle.needRememberPwd">
|
|
|
- <el-checkbox v-model="checked">记住密码</el-checkbox>
|
|
|
|
|
|
|
+ <el-checkbox v-model="checked">30天免登陆</el-checkbox>
|
|
|
</div>
|
|
</div>
|
|
|
<a class="forget" id='forget' @click="goForgetPassword">忘记密码?</a>
|
|
<a class="forget" id='forget' @click="goForgetPassword">忘记密码?</a>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -378,9 +378,9 @@
|
|
|
mounted () {
|
|
mounted () {
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
this.getUrl()
|
|
this.getUrl()
|
|
|
- if (this.appId === 'mall' || this.appId === 'home') {
|
|
|
|
|
- this.getCookie()
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // if (this.appId === 'mall' || this.appId === 'home') {
|
|
|
|
|
+ // this.getCookie()
|
|
|
|
|
+ // }
|
|
|
this.validUserName()
|
|
this.validUserName()
|
|
|
if (this.$route.query.code) {
|
|
if (this.$route.query.code) {
|
|
|
this.wxEnterprise()
|
|
this.wxEnterprise()
|
|
@@ -499,6 +499,7 @@
|
|
|
param.append('appId', this.appId ? this.appId : '')
|
|
param.append('appId', this.appId ? this.appId : '')
|
|
|
param.append('returnUrl', this.returnUrl ? this.returnUrl : '')
|
|
param.append('returnUrl', this.returnUrl ? this.returnUrl : '')
|
|
|
param.append('baseUrl', this.baseUrl ? this.baseUrl : '')
|
|
param.append('baseUrl', this.baseUrl ? this.baseUrl : '')
|
|
|
|
|
+ param.append('maxage', this.checked ? 2592000 : '')
|
|
|
let config = {
|
|
let config = {
|
|
|
headers: {'Content-Type': 'multipart/form-data'}
|
|
headers: {'Content-Type': 'multipart/form-data'}
|
|
|
}
|
|
}
|
|
@@ -580,13 +581,14 @@
|
|
|
this.fastToLogin(flag)
|
|
this.fastToLogin(flag)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if (this.appId === 'mall' || this.appId === 'home') {
|
|
|
|
|
- if (this.checked) {
|
|
|
|
|
- this.setCookie(this.login.username, this.login.password, 7)
|
|
|
|
|
- } else {
|
|
|
|
|
- this.clearCookie()
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 记住密码
|
|
|
|
|
+ // if (this.appId === 'mall' || this.appId === 'home') {
|
|
|
|
|
+ // if (this.checked) {
|
|
|
|
|
+ // this.setCookie(this.login.username, this.login.password, 7)
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // this.clearCookie()
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
},
|
|
},
|
|
|
// 短信快捷登录
|
|
// 短信快捷登录
|
|
|
fastToLogin (flag) {
|
|
fastToLogin (flag) {
|
|
@@ -691,34 +693,34 @@
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
// 设置cookie
|
|
// 设置cookie
|
|
|
- setCookie (cName, cPwd, exdays) {
|
|
|
|
|
- let exdate = new Date()
|
|
|
|
|
- exdate.setTime(exdate.getTime() + 24 * 60 * 60 * 1000 * exdays)
|
|
|
|
|
- window.document.cookie = 'userName' + '=' + cName + ';path=/;expires=' + exdate.toGMTString()
|
|
|
|
|
- window.document.cookie = 'userPwd' + '=' + cPwd + ';path=/;expires=' + exdate.toGMTString()
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // setCookie (cName, cPwd, exdays) {
|
|
|
|
|
+ // let exdate = new Date()
|
|
|
|
|
+ // exdate.setTime(exdate.getTime() + 24 * 60 * 60 * 1000 * exdays)
|
|
|
|
|
+ // window.document.cookie = 'userName' + '=' + cName + ';path=/;expires=' + exdate.toGMTString()
|
|
|
|
|
+ // window.document.cookie = 'userPwd' + '=' + cPwd + ';path=/;expires=' + exdate.toGMTString()
|
|
|
|
|
+ // },
|
|
|
// 读取cookies
|
|
// 读取cookies
|
|
|
- getCookie () {
|
|
|
|
|
- if (document.cookie.length > 0) {
|
|
|
|
|
- let arr = document.cookie.split(';')
|
|
|
|
|
- for (var i = 0; i < arr.length; i++) {
|
|
|
|
|
- let arr2 = arr[i].split('=')
|
|
|
|
|
- if (arr2[0].trim() === 'userName') {
|
|
|
|
|
- this.login.username = arr2[1]
|
|
|
|
|
- }
|
|
|
|
|
- if (arr2[0].trim() === 'userPwd') {
|
|
|
|
|
- this.login.password = arr2[1]
|
|
|
|
|
- }
|
|
|
|
|
- if (this.login.username && this.login.username) {
|
|
|
|
|
- this.checked = true
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // getCookie () {
|
|
|
|
|
+ // if (document.cookie.length > 0) {
|
|
|
|
|
+ // let arr = document.cookie.split(';')
|
|
|
|
|
+ // for (var i = 0; i < arr.length; i++) {
|
|
|
|
|
+ // let arr2 = arr[i].split('=')
|
|
|
|
|
+ // if (arr2[0].trim() === 'userName') {
|
|
|
|
|
+ // this.login.username = arr2[1]
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if (arr2[0].trim() === 'userPwd') {
|
|
|
|
|
+ // this.login.password = arr2[1]
|
|
|
|
|
+ // }
|
|
|
|
|
+ // if (this.login.username && this.login.username) {
|
|
|
|
|
+ // this.checked = true
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
// 清除cookie
|
|
// 清除cookie
|
|
|
- clearCookie () {
|
|
|
|
|
- this.setCookie('', '', -1)
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ // clearCookie () {
|
|
|
|
|
+ // this.setCookie('', '', -1)
|
|
|
|
|
+ // },
|
|
|
// 获取校验码
|
|
// 获取校验码
|
|
|
getCheckCode () {
|
|
getCheckCode () {
|
|
|
this.isShowLoading = true
|
|
this.isShowLoading = true
|