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

回调地址修改

上级 94fd0c3b
......@@ -44,8 +44,8 @@ export default {
computed: {
// 重定向地址
nextUrl() {
const { query } = this.$route
return query.rd ? decodeURIComponent(query.rd) : ''
const nextUrl = window.sessionStorage.getItem('next_url')
return nextUrl ? decodeURIComponent(nextUrl) : ''
}
},
methods: {
......
......@@ -48,8 +48,8 @@ export default {
computed: {
// 重定向地址
nextUrl() {
const { query } = this.$route
return query.rd ? decodeURIComponent(query.rd) : ''
const nextUrl = window.sessionStorage.getItem('next_url')
return nextUrl ? decodeURIComponent(nextUrl) : ''
},
disabledSend() {
return !/^1[3-9]\d{9}$/.test(this.ruleForm.account)
......
......@@ -11,6 +11,12 @@ import Element from 'element-ui'
Vue.use(VueRouter)
const router = createRouter()
router.beforeEach((to, from, next) => {
const { rd } = to.query
rd && window.sessionStorage.setItem('next_url', rd)
next()
})
Vue.use(VueI18n)
const i18n = createI18n()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论