Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
前端:重新登录自动跳转到上次页面
  • Loading branch information
4linuxfun committed Feb 29, 2024
commit b009e6880a77a797576a7b4f3ceab59c89a25061
6 changes: 5 additions & 1 deletion www/src/views/Login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,12 @@
console.log('dispatch login store actions')
store.logIn(user).then(() => {
console.log('login ok,start to redirect to home')
let redirect = '/dashboard'
if (route.query.redirect) {
redirect = route.query.redirect
}
router.push({
path: '/dashboard'
path: redirect
})
})
loading.value = false
Expand Down