mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 11:10:11 +08:00
Fix re-login error (#60)
* refactor: put all session ref into one reactive store * fix relogin duplicate signal * fix: put quest data into store, fix hint reactivity * fix: duplicate after relogin * only register listener once
This commit is contained in:
1 parent
10e9d89349
commit
7d7ad154ab
10 files changed
+179
-168
No files matched your search
@@ -4,12 +4,18 @@ import { useRouter } from 'vue-router'
|
||||
import { logout } from '../utils/auth'
|
||||
import { bugReportUrl } from '../config'
|
||||
import api from '../utils/api'
|
||||
import { reset } from '../store/session'
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const handleLogout = async () => {
|
||||
await logout()
|
||||
router.push({ name: 'login' })
|
||||
try {
|
||||
await logout()
|
||||
reset()
|
||||
router.push({ name: 'login' })
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
}
|
||||
}
|
||||
|
||||
const questData = ref(null)
|
||||
|
||||
Reference in new issue
Block a user