From de497262f0755df8d84838d7af6480374916d6e2 Mon Sep 17 00:00:00 2001 From: laozt <2721205210@qq.com> Date: Wed, 18 Oct 2023 11:07:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E5=87=BA=E6=B8=85=E9=99=A4=20isGovern?= =?UTF-8?q?mentAffairsNetwork?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 13 ++++++++----- .env.production | 12 +++++++----- src/layout/components/Navbar.vue | 2 ++ src/layout/newyjLayout.vue | 2 ++ 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.env.development b/.env.development index 0712741..6683189 100644 --- a/.env.development +++ b/.env.development @@ -15,15 +15,18 @@ ENV = 'development' # VUE_APP_BASE_API = 'http://39.101.188.84:9033' # VUE_APP_BASE_API = 'http://192.168.0.106:9033' VUE_APP_BASE_API = 'http://180.108.205.123:13002' + # 统一登录-内网 -# VUE_APP_SSO_LOGIN = 'http://2.46.4.197:8090/sso-server/oauth2/sso?aid=77434376&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code' -# 统一登录-外网 -VUE_APP_SSO_LOGIN = 'http://180.108.205.123:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code' +# VUE_APP_SSO_LOGIN = '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' # 退出登录-内网 -# VUE_APP_SSO_LOGOUT ='http://2.46.4.197:8090/sso-server/oauth2/logout?aid=77434376&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F' +# VUE_APP_SSO_LOGOUT ='http://2.46.4.197:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F' + +# 统一登录-外网 +VUE_APP_SSO_LOGIN = 'http://180.108.205.123:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code' # 退出登录-外网 -VUE_APP_SSO_LOGOUT ='http://180.108.205.123:8090/sso-server/oauth2/logout?aid=77434376&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F' +VUE_APP_SSO_LOGOUT ='http://180.108.205.123:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F' + # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/.env.production b/.env.production index 014165b..c1d16e7 100644 --- a/.env.production +++ b/.env.production @@ -8,16 +8,18 @@ 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' + # 统一登录-内网 -# VUE_APP_SSO_LOGIN = 'http://2.46.4.197:8090/sso-server/oauth2/sso?aid=77434376&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code' -# 统一登录-外网 -VUE_APP_SSO_LOGIN = 'http://180.108.205.123:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code' +# VUE_APP_SSO_LOGIN = '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' # 退出登录-内网 -# VUE_APP_SSO_LOGOUT ='http://2.46.4.197:8090/sso-server/oauth2/logout?aid=77434376&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F' +# VUE_APP_SSO_LOGOUT ='http://2.46.4.197:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F' + +# 统一登录-外网 +VUE_APP_SSO_LOGIN = 'http://180.108.205.123:8090/sso-server/oauth2/sso?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F&response_type=code' # 退出登录-外网 -VUE_APP_SSO_LOGOUT ='http://180.108.205.123:8090/sso-server/oauth2/logout?aid=77434376&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F' +VUE_APP_SSO_LOGOUT ='http://180.108.205.123:8090/sso-server/oauth2/logout?aid=17847210&cbu=http%3A%2F%2F180.108.205.123%3A13001%2F' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true \ No newline at end of file diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 13e7a7f..9cdb8a1 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -125,8 +125,10 @@ export default { "isGovernmentAffairsNetwork" ); if (isGovernmentAffairsNetwork == "1") { + localStorage.removeItem("isGovernmentAffairsNetwork"); location.href = process.env.VUE_APP_SSO_LOGOUT; } else { + localStorage.removeItem("isGovernmentAffairsNetwork"); location.href = "/login?redirect=%2Findex"; } }); diff --git a/src/layout/newyjLayout.vue b/src/layout/newyjLayout.vue index 1bf4a42..b86420e 100644 --- a/src/layout/newyjLayout.vue +++ b/src/layout/newyjLayout.vue @@ -118,8 +118,10 @@ export default { ); // console.log("进入跳转政务网的登录页"); if (isGovernmentAffairsNetwork == "1") { + localStorage.removeItem("isGovernmentAffairsNetwork"); location.href = process.env.VUE_APP_SSO_LOGOUT; } else { + localStorage.removeItem("isGovernmentAffairsNetwork"); location.href = "/login?redirect=%2Findex"; } });