diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 4f2fdc4..4d4a105 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -138,7 +138,10 @@ export default { }) .then(() => { this.$store.dispatch("LogOut").then(() => { - location.href = "/demo/suzhouyingjiPC/"; + location.href = + process.env.NODE_ENV === "production" + ? "/demo/suzhouyingjiPC/" + : "/"; }); }) .catch(() => {}); diff --git a/src/layout/newyjLayout.vue b/src/layout/newyjLayout.vue index e1a3b1a..b61014f 100644 --- a/src/layout/newyjLayout.vue +++ b/src/layout/newyjLayout.vue @@ -78,12 +78,11 @@ export default { dept: (state) => state.user.dept, username: (state) => state.user.name, roles: (state) => state.user.roles, - newRouter:(state) => state.user.newRouter, - new1:(state) => state.user.new1, + newRouter: (state) => state.user.newRouter, + new1: (state) => state.user.new1, }), }, - created() { - }, + created() {}, watch: { $route: { handler(n, o) { @@ -111,7 +110,10 @@ export default { }) .then(() => { this.$store.dispatch("LogOut").then(() => { - location.href = "/demo/suzhouyingjiPC/"; + location.href = + process.env.NODE_ENV === "production" + ? "/demo/suzhouyingjiPC/" + : "/"; }); }) .catch(() => {}); diff --git a/src/views/login.vue b/src/views/login.vue index 5a0bcaf..93b7198 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -5,6 +5,7 @@