We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 485cd1d commit a4f024aCopy full SHA for a4f024a
1 file changed
src/components/nav-bar/index.vue
@@ -63,6 +63,7 @@ import LogoutAction from '@/components/logout-action/index.vue'
63
import { useUserStore } from '@/stores/user-store'
64
import Coins from '@/components/coins/index.vue'
65
import { CoinType } from '@/types/goods-info'
66
+import { authConfig } from '@/config/request.config'
67
68
const router = useRouter()
69
const route = useRoute()
@@ -160,8 +161,7 @@ const navigateTo = (path: string) => {
160
161
}
162
163
onMounted(async () => {
- if (!localStorage.getItem('token')) {
164
- router.push('/')
+ if (!localStorage.getItem(authConfig.tokenKey)) {
165
return
166
167
0 commit comments