diff --git a/config/index.js b/config/index.js index 2fa46e4..9167af9 100644 --- a/config/index.js +++ b/config/index.js @@ -114,7 +114,7 @@ }, // Various Dev Server settings - host: "192.168.30.144", // can be overwritten by process.env.HOST + host: "0.0.0.0", // can be overwritten by process.env.HOST port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: true, errorOverlay: true, diff --git a/config/index.js b/config/index.js index 2fa46e4..9167af9 100644 --- a/config/index.js +++ b/config/index.js @@ -114,7 +114,7 @@ }, // Various Dev Server settings - host: "192.168.30.144", // can be overwritten by process.env.HOST + host: "0.0.0.0", // can be overwritten by process.env.HOST port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: true, errorOverlay: true, diff --git a/src/components/index.vue b/src/components/index.vue index 268ef5a..b423ddd 100644 --- a/src/components/index.vue +++ b/src/components/index.vue @@ -469,8 +469,9 @@ } }, ZhuXIao() { - this.$router.push({ path: "/Login" }); + // this.$router.push({ path: "/Login" }); sessionStorage.clear(); + location.reload(); }, // 初始化验证 initRules() { diff --git a/config/index.js b/config/index.js index 2fa46e4..9167af9 100644 --- a/config/index.js +++ b/config/index.js @@ -114,7 +114,7 @@ }, // Various Dev Server settings - host: "192.168.30.144", // can be overwritten by process.env.HOST + host: "0.0.0.0", // can be overwritten by process.env.HOST port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: true, errorOverlay: true, diff --git a/src/components/index.vue b/src/components/index.vue index 268ef5a..b423ddd 100644 --- a/src/components/index.vue +++ b/src/components/index.vue @@ -469,8 +469,9 @@ } }, ZhuXIao() { - this.$router.push({ path: "/Login" }); + // this.$router.push({ path: "/Login" }); sessionStorage.clear(); + location.reload(); }, // 初始化验证 initRules() { diff --git a/src/components/login.vue b/src/components/login.vue index b626137..24710ee 100644 --- a/src/components/login.vue +++ b/src/components/login.vue @@ -128,8 +128,6 @@ localStorage.setItem("USERNO", response.data.data.login); localStorage.setItem("USERName", response.data.data.realName); localStorage.setItem("token", response.data.data.token); - this.$store.dispatch("common/getAllPlatSite") - // 获取权限 this.$http .post(this.nozzle.menuGetCurrentUserMenu) diff --git a/config/index.js b/config/index.js index 2fa46e4..9167af9 100644 --- a/config/index.js +++ b/config/index.js @@ -114,7 +114,7 @@ }, // Various Dev Server settings - host: "192.168.30.144", // can be overwritten by process.env.HOST + host: "0.0.0.0", // can be overwritten by process.env.HOST port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined autoOpenBrowser: true, errorOverlay: true, diff --git a/src/components/index.vue b/src/components/index.vue index 268ef5a..b423ddd 100644 --- a/src/components/index.vue +++ b/src/components/index.vue @@ -469,8 +469,9 @@ } }, ZhuXIao() { - this.$router.push({ path: "/Login" }); + // this.$router.push({ path: "/Login" }); sessionStorage.clear(); + location.reload(); }, // 初始化验证 initRules() { diff --git a/src/components/login.vue b/src/components/login.vue index b626137..24710ee 100644 --- a/src/components/login.vue +++ b/src/components/login.vue @@ -128,8 +128,6 @@ localStorage.setItem("USERNO", response.data.data.login); localStorage.setItem("USERName", response.data.data.realName); localStorage.setItem("token", response.data.data.token); - this.$store.dispatch("common/getAllPlatSite") - // 获取权限 this.$http .post(this.nozzle.menuGetCurrentUserMenu) diff --git a/src/router/index.js b/src/router/index.js index 7fc8196..13640f9 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -288,6 +288,7 @@ if (to.name === "login") { next(); } else if (JSON.parse(getSession("logins")) === "true") { + next(); if (!store.state.common.allDept.length) { store .dispatch("common/getAllDept") @@ -302,14 +303,13 @@ next("/Login"); }); } - next(); } else { - message({ - data: { - code: 1, - msg: "请先登录在进行操作!" - } - }); + // message({ + // data: { + // code: 1, + // msg: "请先登录在进行操作!" + // } + // }); next(`/Login`); } });