diff --git a/.env.production b/.env.production index 9741b85..eacea66 100644 --- a/.env.production +++ b/.env.production @@ -8,7 +8,7 @@ ENV = 'production' # VUE_APP_BASE_API = 'http://192.168.0.105:9033' # VUE_APP_BASE_API = 'http://39.101.188.84:9033' VUE_APP_BASE_API = 'http://180.108.205.123:13002' -n + # 统一登录-内网 VUE_APP_SSO_LOGIN_N = 'http://2.46.4.197:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code' diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 2ca486d..6bb5de5 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -135,10 +135,7 @@ export default { ); if (isGovernmentAffairsNetwork == "1") { localStorage.removeItem("isGovernmentAffairsNetwork"); - location.href = - window.location.hostname == "180.108.205.123" - ? process.env.VUE_APP_SSO_LOGOUT_W - : process.env.VUE_APP_SSO_LOGOUT_N; + location.href = process.env.VUE_APP_SSO_LOGOUT_N; } else { localStorage.removeItem("isGovernmentAffairsNetwork"); location.href = "/login?redirect=%2Findex"; diff --git a/src/layout/newyjLayout.vue b/src/layout/newyjLayout.vue index 7d85594..233bd20 100644 --- a/src/layout/newyjLayout.vue +++ b/src/layout/newyjLayout.vue @@ -130,10 +130,7 @@ export default { // console.log("进入跳转政务网的登录页"); if (isGovernmentAffairsNetwork == "1") { localStorage.removeItem("isGovernmentAffairsNetwork"); - location.href = - window.location.hostname == "180.108.205.123" - ? process.env.VUE_APP_SSO_LOGOUT_W - : process.env.VUE_APP_SSO_LOGOUT_N; + location.href = process.env.VUE_APP_SSO_LOGOUT_N; } else { localStorage.removeItem("isGovernmentAffairsNetwork"); location.href = "/login?redirect=%2Findex"; diff --git a/src/permission.js b/src/permission.js index 9c7cd92..fbb8e3a 100644 --- a/src/permission.js +++ b/src/permission.js @@ -82,10 +82,7 @@ router.beforeEach((to, from, next) => { }); }) .catch((err) => { - location.href = - window.location.hostname == "180.108.205.123" - ? process.env.VUE_APP_SSO_LOGIN_W - : process.env.VUE_APP_SSO_LOGIN_N; + location.href = process.env.VUE_APP_SSO_LOGIN_N; }); } else { // console.log('没code') @@ -94,10 +91,7 @@ router.beforeEach((to, from, next) => { next(); NProgress.done(); } else { - location.href = - window.location.hostname == "180.108.205.123" - ? process.env.VUE_APP_SSO_LOGIN_W - : process.env.VUE_APP_SSO_LOGIN_N; + location.href = process.env.VUE_APP_SSO_LOGIN_N; NProgress.done(); } }