提交 93ef6ae4 authored 作者: haodaking's avatar haodaking

fix: 修复登录跳转错误的问题

上级 f6e6f0b3
......@@ -62,7 +62,7 @@ export default {
computed: {
// 重定向地址
nextUrl() {
const nextUrl = window.localStorage.getItem('next_url')
const nextUrl = window.sessionStorage.getItem('next_url')
return nextUrl ? decodeURIComponent(nextUrl) : ''
}
},
......@@ -94,7 +94,7 @@ export default {
} else {
this.$emit('success', response)
}
// window.sessionStorage.clear()
window.sessionStorage.clear()
}
}
}
......
......@@ -61,7 +61,7 @@ export default {
computed: {
// 重定向地址
nextUrl() {
const nextUrl = window.localStorage.getItem('next_url')
const nextUrl = window.sessionStorage.getItem('next_url')
return nextUrl ? decodeURIComponent(nextUrl) : ''
},
disabledSend() {
......
......@@ -13,7 +13,7 @@ Vue.use(VueRouter)
const router = createRouter()
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)
nextUrl && window.sessionStorage.setItem('next_url', nextUrl)
next()
})
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论