From d33ac0f0e827e1cbbc8a0f2230c0144e8c4a5e50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=9C=84?= Date: Wed, 15 Nov 2023 12:08:02 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=8D=95=E7=82=B9=E7=99=BB=E5=BD=95-?= =?UTF-8?q?=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 3 ++- .env.development | 3 ++- .env.production | 3 ++- .env.test | 3 ++- src/components/tools/UserMenu.vue | 2 +- src/store/modules/user.js | 3 ++- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.env b/.env index 618b96bd..34d0c8e4 100644 --- a/.env +++ b/.env @@ -3,4 +3,5 @@ VUE_APP_PLATFORM_NAME=JeroBoot 企业级快速开发平台 VUE_APP_SSO=false VUE_TAG_FLAG=0 VUE_APP_LOGIN_PAGE='/user/login' -VUE_APP_CURRENT_SYSTEM='inner' \ No newline at end of file +VUE_APP_CURRENT_SYSTEM='inner' +VUE_APP_LOGOUT_PAGE='/user/login' \ No newline at end of file diff --git a/.env.development b/.env.development index 8f73c839..22f25c7d 100644 --- a/.env.development +++ b/.env.development @@ -1,4 +1,5 @@ NODE_ENV=development VUE_APP_TAG_FLAG=0 VUE_APP_LOGIN_PAGE='/user/login' -VUE_APP_CURRENT_SYSTEM='inner' \ No newline at end of file +VUE_APP_CURRENT_SYSTEM='inner' +VUE_APP_LOGOUT_PAGE='/user/login' \ No newline at end of file diff --git a/.env.production b/.env.production index 924469b6..f738f6c0 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,5 @@ NODE_ENV=production VUE_APP_TAG_FLAG=1 VUE_APP_LOGIN_PAGE='https://iam-uat.sinotruk.com:7011/idp/oauth2/authorize?redirect_uri=http://laws-test.sinotruk.com/dashboard/analysis&state=123&client_id=SRMS&response_type=code' -VUE_APP_CURRENT_SYSTEM='IAM' \ No newline at end of file +VUE_APP_CURRENT_SYSTEM='IAM' +VUE_APP_LOGOUT_PAGE='https://iam-uat.sinotruk.com:7011/idp/profile/OAUTH2/Redirect/GLO?redirctToUrl=http://laws-test.sinotruk.com/dashboard/analysis&redirectToLogin=true&entityId=SRMS' \ No newline at end of file diff --git a/.env.test b/.env.test index a4f3781b..4932919f 100644 --- a/.env.test +++ b/.env.test @@ -4,4 +4,5 @@ VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas VUE_APP_ONLINE_BASE_URL=http://fileview.jero.com/onlinePreview VUE_APP_TAG_FLAG=1 VUE_APP_LOGIN_PAGE='/user/login' -VUE_APP_CURRENT_SYSTEM='inner' \ No newline at end of file +VUE_APP_CURRENT_SYSTEM='inner' +VUE_APP_LOGOUT_PAGE='/user/login' \ No newline at end of file diff --git a/src/components/tools/UserMenu.vue b/src/components/tools/UserMenu.vue index a520193d..d337756b 100644 --- a/src/components/tools/UserMenu.vue +++ b/src/components/tools/UserMenu.vue @@ -215,7 +215,7 @@ export default { content: '真的要注销登录吗 ?', onOk () { return that.Logout({}).then(() => { - window.location.replace(process.env.VUE_APP_LOGIN_PAGE) + window.location.replace(process.env.VUE_APP_LOGOUT_PAGE) }).catch(err => { that.$message.warning({ title: '错误', diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 3c7a58ba..e9eb0bd9 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -176,8 +176,9 @@ const user = { const sevice = 'http://' + window.location.host + '/' const serviceUrl = encodeURIComponent(sevice) window.location.href = process.env.VUE_APP_CAS_BASE_URL + '/logout?service=' + serviceUrl + } else { + window.location.replace(process.env.VUE_APP_LOGOUT_PAGE) } - window.location.replace(process.env.VUE_APP_LOGIN_PAGE) resolve() }).catch(() => { resolve()