[update 飞书单点登录] 解决流程办理完go(-1)会跳转中转路由
This commit is contained in:
+5
-1
@@ -37,7 +37,11 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
} else if (to.query.code && to.query.state === 'feishu') {
|
} else if (to.query.code && to.query.state === 'feishu') {
|
||||||
// 如果没有登录,state是飞书,并且有code,就请求飞书单点登录
|
// 如果没有登录,state是飞书,并且有code,就请求飞书单点登录
|
||||||
await store.dispatch('FeiShuLogin', to.query.code).catch((e) => {
|
await store.dispatch('FeiShuLogin', to.query.code).catch((e) => {
|
||||||
this.$message.warn(e.message)
|
// 从飞书跳转进来,正常提示,系统内跳转进来不提示(解决用了replace,但是go(-1)还会跳转回来)
|
||||||
|
if (from.path === '/') {
|
||||||
|
Vue.prototype.$message.warning(e.message, 3)
|
||||||
|
}
|
||||||
|
next({ path: '/user/login', replace: true })
|
||||||
})
|
})
|
||||||
} else if (to.query.code) {
|
} else if (to.query.code) {
|
||||||
// 研发大前台单点登录
|
// 研发大前台单点登录
|
||||||
|
|||||||
Reference in New Issue
Block a user