af-mobile-client-vue3 1.1.24 → 1.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/router/guards.ts +4 -1
package/package.json
CHANGED
package/src/router/guards.ts
CHANGED
|
@@ -22,14 +22,17 @@ const loginIgnore = {
|
|
|
22
22
|
* @param next
|
|
23
23
|
*/
|
|
24
24
|
function loginGuard(to, from, next?) {
|
|
25
|
+
console.log('登录守卫==to', to)
|
|
26
|
+
console.log('登录守卫==from', from)
|
|
25
27
|
if (!loginIgnore.includes(to) && !useUserStore().getToken()) {
|
|
26
28
|
showToast({
|
|
27
|
-
message: '
|
|
29
|
+
message: '登录状态已失效,请重新登录!',
|
|
28
30
|
position: 'bottom',
|
|
29
31
|
})
|
|
30
32
|
next({ path: '/login' })
|
|
31
33
|
}
|
|
32
34
|
else {
|
|
35
|
+
console.log('跳过了', useUserStore().getToken())
|
|
33
36
|
if (to.path === '/login' && useUserStore().getToken())
|
|
34
37
|
next({ path: '/' })
|
|
35
38
|
|