feat : 测试sso单点登录之后的重定向路径4

This commit is contained in:
clay
2024-04-29 11:49:46 +08:00
parent 929228974a
commit 2bb86ced15
4 changed files with 246 additions and 225 deletions

View File

@@ -15,7 +15,14 @@ const init = () => {
})
if (authStore.casToken(tokenValue)) {
loading.close()
router.push('/')
const toView = sessionStorage.getItem('toView')
console.log(toView, 'toView');
if (toView) {
let parse = JSON.parse(toView);
window.location.href = window.location.origin + parse.path + parse.query
} else {
router.push('/')
}
}
}
init()