|
@@ -50,7 +50,7 @@
|
|
this.$store.commit("updateLogin", true);
|
|
this.$store.commit("updateLogin", true);
|
|
localStorage.userInfo = JSON.stringify(user);
|
|
localStorage.userInfo = JSON.stringify(user);
|
|
|
|
|
|
- this.$router.push("/index");
|
|
|
|
|
|
+ this.$router.push("/index").catch(err => { console.log(err, '错误1')});
|
|
//强制刷新,避免index页面中的mounted不执行
|
|
//强制刷新,避免index页面中的mounted不执行
|
|
window.location.reload();
|
|
window.location.reload();
|
|
} else {
|
|
} else {
|
|
@@ -61,7 +61,7 @@
|
|
},
|
|
},
|
|
|
|
|
|
jumpTo() {
|
|
jumpTo() {
|
|
- this.$router.push("/register");
|
|
|
|
|
|
+ this.$router.push("/register").catch(err => { console.log(err, '错误2')});
|
|
},
|
|
},
|
|
|
|
|
|
loginByCode(code, corpId) {
|
|
loginByCode(code, corpId) {
|
|
@@ -72,7 +72,7 @@
|
|
this.$store.commit("updateLogin", true);
|
|
this.$store.commit("updateLogin", true);
|
|
localStorage.userInfo = JSON.stringify(user);
|
|
localStorage.userInfo = JSON.stringify(user);
|
|
|
|
|
|
- this.$router.push("/index");
|
|
|
|
|
|
+ this.$router.push("/index").catch(err => { console.log(err, '错误3')});
|
|
//强制刷新,避免index页面中的mounted不执行
|
|
//强制刷新,避免index页面中的mounted不执行
|
|
// window.location.reload();
|
|
// window.location.reload();
|
|
} else {
|
|
} else {
|
|
@@ -187,7 +187,7 @@
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
if (localStorage.userInfo != null) {
|
|
if (localStorage.userInfo != null) {
|
|
- this.$router.push("/index");
|
|
|
|
|
|
+ this.$router.push("/index").catch(err => { console.log(err, '错误4')});
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -198,7 +198,7 @@
|
|
this.isWX = true;
|
|
this.isWX = true;
|
|
}
|
|
}
|
|
if (localStorage.userInfo != null) {
|
|
if (localStorage.userInfo != null) {
|
|
- this.$router.push("/index");
|
|
|
|
|
|
+ this.$router.push("/index").catch(err => { console.log(err, '错误5')});
|
|
} else {
|
|
} else {
|
|
if (this.isCorpWX || this.isWX) {
|
|
if (this.isCorpWX || this.isWX) {
|
|
let href = window.location.href;
|
|
let href = window.location.href;
|