Merge branch 'dev'
Showing
1 changed file
with
3 additions
and
8 deletions
| 1 | /* | 1 | /* |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-06-26 10:18:09 | 4 | * @LastEditTime: 2023-06-26 11:11:23 |
| 5 | */ | 5 | */ |
| 6 | import Vue from 'vue' | 6 | import Vue from 'vue' |
| 7 | import axios from 'axios' | 7 | import axios from 'axios' |
| ... | @@ -65,12 +65,7 @@ router.beforeEach(async (to, from, next) => { | ... | @@ -65,12 +65,7 @@ router.beforeEach(async (to, from, next) => { |
| 65 | ...accessRoutes, | 65 | ...accessRoutes, |
| 66 | { path: "*", redirect: "/404", hidden: true } | 66 | { path: "*", redirect: "/404", hidden: true } |
| 67 | ]); | 67 | ]); |
| 68 | const routeTo = Cookies.get("routerTo"); | 68 | next(path) |
| 69 | if (routeTo && routeTo !== "/") { | ||
| 70 | next({ ...to, replace: true }); | ||
| 71 | } else { | ||
| 72 | next(path) | ||
| 73 | } | ||
| 74 | } | 69 | } |
| 75 | } | 70 | } |
| 76 | if (window._config.casEnable === true) { | 71 | if (window._config.casEnable === true) { |
| ... | @@ -110,13 +105,13 @@ router.beforeEach(async (to, from, next) => { | ... | @@ -110,13 +105,13 @@ router.beforeEach(async (to, from, next) => { |
| 110 | window.location.href = window._config.services.management + `/management/cas/status?loginUrl=${window._config.baseUrl}/sjsb/&hash=/login` | 105 | window.location.href = window._config.services.management + `/management/cas/status?loginUrl=${window._config.baseUrl}/sjsb/&hash=/login` |
| 111 | } | 106 | } |
| 112 | } else { | 107 | } else { |
| 108 | permission() | ||
| 113 | if (to.path === '/login') { | 109 | if (to.path === '/login') { |
| 114 | const redirectUrl = getUrlParam('redirectUrl'); | 110 | const redirectUrl = getUrlParam('redirectUrl'); |
| 115 | if (redirectUrl && redirectUrl !== '') { | 111 | if (redirectUrl && redirectUrl !== '') { |
| 116 | window.location.href = redirectUrl | 112 | window.location.href = redirectUrl |
| 117 | return | 113 | return |
| 118 | } else { | 114 | } else { |
| 119 | permission() | ||
| 120 | next('/'); | 115 | next('/'); |
| 121 | return | 116 | return |
| 122 | } | 117 | } | ... | ... |
-
Please register or sign in to post a comment