style:cas
Showing
1 changed file
with
2 additions
and
2 deletions
| 1 | /* | 1 | /* |
| 2 | * @Description: 项目权限 | 2 | * @Description: 项目权限 |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-06-02 10:31:05 | 4 | * @LastEditTime: 2023-06-02 10:44:17 |
| 5 | */ | 5 | */ |
| 6 | import Vue from 'vue' | 6 | import Vue from 'vue' |
| 7 | import axios from 'axios' | 7 | import axios from 'axios' |
| ... | @@ -22,7 +22,7 @@ router.beforeEach(async (to, from, next) => { | ... | @@ -22,7 +22,7 @@ router.beforeEach(async (to, from, next) => { |
| 22 | let hasAddDict = store.state.dict.addDict | 22 | let hasAddDict = store.state.dict.addDict |
| 23 | let hasAddRoute = store.state.permission.addRoutes | 23 | let hasAddRoute = store.state.permission.addRoutes |
| 24 | // cas操作 | 24 | // cas操作 |
| 25 | const token = localStorage.getItem("token") | 25 | const token = localStorage.getItem("token") || Cookies.get('token'); |
| 26 | if (to.path === '/login') { | 26 | if (to.path === '/login') { |
| 27 | if (token) { | 27 | if (token) { |
| 28 | next('/') | 28 | next('/') | ... | ... |
-
Please register or sign in to post a comment