From d2019ca19d477789502eeeea4eb8eb626984f6a3 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Tue, 21 Jun 2022 09:35:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=87=E6=8D=A2=E7=BA=BF=E4=B8=8A=E7=99=BB?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/components/tools/UserMenu.vue | 6 +++--- jero-web/src/permission.js | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/jero-web/src/components/tools/UserMenu.vue b/jero-web/src/components/tools/UserMenu.vue index a52b3a8c9..d36ba82c2 100644 --- a/jero-web/src/components/tools/UserMenu.vue +++ b/jero-web/src/components/tools/UserMenu.vue @@ -223,13 +223,13 @@ return that.Logout({}).then(() => { // update-begin author:wangshuai date:20200601 for: 退出登录跳转登录页面 // TODO 在部署线上时注掉以下代码 - that.$router.push({ path: '/user/login' }) + // that.$router.push({ path: '/user/login' }) // window.location.href = 'https://signin-test.nio.com/logout?client_id=100679&redirect_uri=' + // encodeURIComponent('http://localhost:3000/dashboard/analysis') + '&response_type=code' //本地 // TODO 在部署线上时解开以下代码 - // window.location.href = 'https://signin.nio.com/logout?client_id=100679&redirect_uri=' + - // encodeURIComponent('http://grp.nioint.com/dashboard/analysis') + '&response_type=code' //线上 + window.location.href = 'https://signin.nio.com/logout?client_id=100679&redirect_uri=' + + encodeURIComponent('http://grp.nioint.com/dashboard/analysis') + '&response_type=code' //线上 localStorage.removeItem('language') // update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面 diff --git a/jero-web/src/permission.js b/jero-web/src/permission.js index 653f3352a..a2f25c93e 100644 --- a/jero-web/src/permission.js +++ b/jero-web/src/permission.js @@ -14,10 +14,10 @@ NProgress.configure({ showSpinner: false }) // NProgress Configuration // TODO 线上部署在conmponetns/tools/UserMenu.vue的退出登录时需解开代码以及注释代码 // TODO 在部署线上时注掉以下代码 -const whiteList = ['/user/login', '/user/register', '/user/register-result', '/user/alteration'] +// const whiteList = ['/user/login', '/user/register', '/user/register-result', '/user/alteration'] // TODO 在部署线上时解开一下代码 -// const whiteList = [] +const whiteList = [] // no redirect whitelist @@ -96,7 +96,7 @@ router.beforeEach((to, from, next) => { // query: { redirect: to.fullPath } store.dispatch('Logout').then(() => { // TODO 在部署线上时注掉此代码 - next({ path: '/user/login', query: { redirect: to.fullPath } }) + // next({ path: '/user/login', query: { redirect: to.fullPath } }) let fullPath = '' if (to.fullPath == '/') { @@ -109,8 +109,8 @@ router.beforeEach((to, from, next) => { // + encodeURIComponent('http://localhost:3000' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //本地 // TODO 在部署线上时解开此代码 - // window.location.href = 'https://signin.nio.com/oauth2/authorize?client_id=100679&redirect_uri=' - // + encodeURIComponent('http://grp.nioint.com' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //线上 + window.location.href = 'https://signin.nio.com/oauth2/authorize?client_id=100679&redirect_uri=' + + encodeURIComponent('http://grp.nioint.com' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //线上 }) }) } else { @@ -123,7 +123,7 @@ router.beforeEach((to, from, next) => { next() } else { // TODO 在部署线上时注掉此代码 - next({ path: '/user/login', query: { redirect: to.fullPath } }) + // next({ path: '/user/login', query: { redirect: to.fullPath } }) let fullPath = '' if (to.fullPath == '/') { @@ -135,8 +135,8 @@ router.beforeEach((to, from, next) => { // window.location.href = 'https://signin-test.nio.com/oauth2/authorize?client_id=100679&redirect_uri=' // + encodeURIComponent('http://localhost:3000' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //本地 // TODO 在部署线上时解开此代码 - // window.location.href = 'https://signin.nio.com/oauth2/authorize?client_id=100679&redirect_uri=' - // + encodeURIComponent('http://grp.nioint.com' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //线上 + window.location.href = 'https://signin.nio.com/oauth2/authorize?client_id=100679&redirect_uri=' + + encodeURIComponent('http://grp.nioint.com' + fullPath) + '&response_type=code&state=' + JSON.stringify(to.query) //线上 NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it }