|
|
@@ -297,7 +297,7 @@ export default {
|
|
|
...this.params
|
|
|
})
|
|
|
.then(res => {
|
|
|
- this.loginBack(res.data);
|
|
|
+ this.loginBack(res.data, false);
|
|
|
})
|
|
|
.catch(() => {
|
|
|
this.full_Login = false;
|
|
|
@@ -327,16 +327,18 @@ export default {
|
|
|
/**
|
|
|
* 微信登入—返回数据
|
|
|
*/
|
|
|
- loginBack({ url, user_account }) {
|
|
|
- localStorage.setItem(
|
|
|
- "user_account",
|
|
|
- JSON.stringify({
|
|
|
- value: user_account,
|
|
|
- expires: 10 * 24 * 60 * 1000, // 10天
|
|
|
- startTime: new Date().getTime()
|
|
|
- })
|
|
|
- );
|
|
|
- // window.location.replace(url);
|
|
|
+ loginBack({ url, user_account }, isSet = true) {
|
|
|
+ isSet &&
|
|
|
+ localStorage.setItem(
|
|
|
+ "user_account",
|
|
|
+ JSON.stringify({
|
|
|
+ value: user_account,
|
|
|
+ expires: 10 * 24 * 60 * 1000, // 10天
|
|
|
+ startTime: new Date().getTime()
|
|
|
+ })
|
|
|
+ );
|
|
|
+ url += "&user_account=" + user_account;
|
|
|
+ window.location.replace(url);
|
|
|
},
|
|
|
login() {
|
|
|
this.$refs.loginForm.validate(valid => {
|