提交 9e8db8b1 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 0cf785d2
...@@ -55,7 +55,7 @@ export default { ...@@ -55,7 +55,7 @@ export default {
computed: { computed: {
// 重定向地址 // 重定向地址
nextUrl() { nextUrl() {
const nextUrl = window.sessionStorage.getItem('next_url') const nextUrl = window.localStorage.getItem('next_url')
return nextUrl ? decodeURIComponent(nextUrl) : '' return nextUrl ? decodeURIComponent(nextUrl) : ''
} }
}, },
...@@ -87,7 +87,7 @@ export default { ...@@ -87,7 +87,7 @@ export default {
} else { } else {
this.$emit('success', response) this.$emit('success', response)
} }
window.sessionStorage.clear() window.localStorage.clear()
} }
} }
} }
......
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
computed: { computed: {
// 重定向地址 // 重定向地址
nextUrl() { nextUrl() {
const nextUrl = window.sessionStorage.getItem('next_url') const nextUrl = window.localStorage.getItem('next_url')
return nextUrl ? decodeURIComponent(nextUrl) : '' return nextUrl ? decodeURIComponent(nextUrl) : ''
}, },
disabledSend() { disabledSend() {
...@@ -89,7 +89,7 @@ export default { ...@@ -89,7 +89,7 @@ export default {
} else { } else {
this.$emit('success', response) this.$emit('success', response)
} }
// window.sessionStorage.clear() // window.localStorage.clear()
}, },
// 验证码 // 验证码
sendCodeRequest() { sendCodeRequest() {
......
...@@ -5,4 +5,10 @@ const router = createRouter({ ...@@ -5,4 +5,10 @@ const router = createRouter({
routes: [{ path: '/:pathMatch(.*)', redirect: '/auth' }] routes: [{ path: '/:pathMatch(.*)', redirect: '/auth' }]
}) })
router.beforeEach((to, from, next) => {
const nextUrl = to.query.rd || to.query.service || to.query.redirect_uri || to.query.next_url
nextUrl && window.localStorage.setItem('next_url', nextUrl)
next()
})
export default router export default router
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论