From bc193f10dc1ddc9a6c28e39832ac25be81bbe129 Mon Sep 17 00:00:00 2001 From: laozt <2721205210@qq.com> Date: Wed, 18 Oct 2023 10:04:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B7=AF=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 12 ++++-- .env.production | 9 +++- src/App.vue | 23 +++++++---- src/layout/components/Navbar.vue | 2 +- src/layout/newyjLayout.vue | 5 ++- src/permission.js | 8 ++-- src/store/modules/user.js | 71 ++++++++++++++------------------ src/utils/request.js | 19 ++++++++- 8 files changed, 87 insertions(+), 62 deletions(-) diff --git a/.env.development b/.env.development index 176715a..0712741 100644 --- a/.env.development +++ b/.env.development @@ -15,11 +15,15 @@ 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_LOCATION = 'http://2.46.4.197:8090' -# 外网 -VUE_APP_LOCATION = '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=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_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://180.108.205.123:8090/sso-server/oauth2/logout?aid=77434376&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 e31be43..014165b 100644 --- a/.env.production +++ b/.env.production @@ -8,9 +8,16 @@ 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_LOCATION = '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_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://180.108.205.123:8090/sso-server/oauth2/logout?aid=77434376&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/App.vue b/src/App.vue index ed2a8e9..8036b1d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -11,15 +11,22 @@ import ThemePicker from "@/components/ThemePicker"; export default { name: "App", + destroyed() { + localStorage.removeItem("isGovernmentAffairsNetwork"); + }, components: { ThemePicker }, - metaInfo() { - return { - title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title, - titleTemplate: title => { - return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE - } - } - } + metaInfo() { + return { + title: + this.$store.state.settings.dynamicTitle && + this.$store.state.settings.title, + titleTemplate: (title) => { + return title + ? `${title} - ${process.env.VUE_APP_TITLE}` + : process.env.VUE_APP_TITLE; + }, + }; + }, };