|
@@ -49,7 +49,8 @@ export default {
|
|
|
if (this.code != null && this.code != "") {
|
|
|
await this.setcode(this.code);
|
|
|
} else {
|
|
|
- await this.logout();
|
|
|
+ alert(+'GOTO')
|
|
|
+ // await this.logout();
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -59,14 +60,16 @@ export default {
|
|
|
this.$store
|
|
|
.dispatch("user/dingUserInfor", model)
|
|
|
.then(async (res) => {
|
|
|
- if (res === "success") {
|
|
|
- await this.getMenu();
|
|
|
- } else {
|
|
|
- await this.logout();
|
|
|
- }
|
|
|
+ alert("s"+JSON.stringify(res) )
|
|
|
+ // if (res === "success") {
|
|
|
+ // await this.getMenu();
|
|
|
+ // } else {
|
|
|
+ // await this.logout();
|
|
|
+ // }
|
|
|
})
|
|
|
.catch(async (err) => {
|
|
|
- await this.logout();
|
|
|
+ alert(err)
|
|
|
+ // await this.logout();
|
|
|
});
|
|
|
},
|
|
|
async getMenu() {
|
|
@@ -75,22 +78,24 @@ export default {
|
|
|
.then(async (res) => {
|
|
|
console.log(res);
|
|
|
alert(res+"")
|
|
|
- if (res === "noToken") {
|
|
|
- await this.logout();
|
|
|
- } else if (res === "success") {
|
|
|
- if (
|
|
|
- this.$route.path === "/loadingPage" ||
|
|
|
- this.$route.path === "/" ||
|
|
|
- this.$route.path === "/login"
|
|
|
- ) {
|
|
|
- window.vm.$router.replace("/welcome");
|
|
|
- }
|
|
|
- } else {
|
|
|
- // await this.logout();
|
|
|
- }
|
|
|
+ // if (res === "noToken") {
|
|
|
+ // await this.logout();
|
|
|
+ // } else if (res === "success") {
|
|
|
+ // if (
|
|
|
+ // this.$route.path === "/loadingPage" ||
|
|
|
+ // this.$route.path === "/" ||
|
|
|
+ // this.$route.path === "/login"
|
|
|
+ // ) {
|
|
|
+ // window.vm.$router.replace("/welcome");
|
|
|
+ // }
|
|
|
+ // } else {
|
|
|
+ // // await this.logout();
|
|
|
+ // }
|
|
|
})
|
|
|
.catch(async (err) => {
|
|
|
- await this.logout();
|
|
|
+ alert(+'GOTO')
|
|
|
+ alert(err)
|
|
|
+ // await this.logout();
|
|
|
});
|
|
|
},
|
|
|
async logout() {
|