提交 d22bcb6f authored 作者: lidongxu's avatar lidongxu

fix(permission): 修复:权限验证保存回跳地址_只有积木保存

上级 495cbf4d
......@@ -61,7 +61,9 @@ router.beforeEach((to, from, next) => {
if (isWhiteList(to.path)) {
next()
} else {
cache.session.set('redirect_uri', to.fullPath)
if (to.fullPath.includes('jmreport')) {
cache.session.set('redirect_uri', to.fullPath)
}
next(`/login?redirect=${to.fullPath}`)
NProgress.done()
}
......
......@@ -163,12 +163,13 @@ async function loginByType(type, data) {
data
}).then(() => {
const state = getQueryString('state')
console.log('state', state)
// 飞书回跳
if (state.includes('fs')) {
const redirectUri = cache.session.get('redirect_uri') // 未遂地址
if (redirectUri) {
cache.session.remove('redirect_uri')
router.push({ path: redirectUri || "/", query: param2Obj(redirect.value) });
router.push({ path: redirectUri || "/", query: param2Obj(redirectUri) });
} else {
router.push({ path: "/" }); // 正常飞书客户端里登录
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论