|
@@ -9,6 +9,7 @@ const Audit = () => import('@/views/audit/index')
|
|
|
const DoBusiness = () => import('@/views/doBusiness/index')
|
|
|
const Evaluate = () => import('@/views/evaluate/index')
|
|
|
const EvTwoLevelMenu = () => import('@/views/evaluate/evTwoLevelMenu')
|
|
|
+const Auth = () =>import('@/views/auth/index')
|
|
|
|
|
|
import store from '../store'
|
|
|
import { query } from '../utils/query'
|
|
@@ -24,6 +25,11 @@ const router = new Router({
|
|
|
component: Main
|
|
|
},
|
|
|
{
|
|
|
+ path: '/auth',
|
|
|
+ name: 'auth',
|
|
|
+ component: Auth
|
|
|
+ },
|
|
|
+ {
|
|
|
path: '/strategy',
|
|
|
name: 'strategy',
|
|
|
component: Strategy
|
|
@@ -79,11 +85,11 @@ router.beforeEach(async (to, from, next) => {
|
|
|
}
|
|
|
next()
|
|
|
} else {
|
|
|
+ let lastRoute = { path: to.path, params: to.params, query: to.query }
|
|
|
+ store.commit('setLastRoute', lastRoute)
|
|
|
let ssoServer = 'http://sso.sagacloud.cn'
|
|
|
- let redirectUrl = window.location.protocol + '//' + window.location.host + '/strategy'
|
|
|
+ let redirectUrl = window.location.protocol + '//' + window.location.host + '/auth'
|
|
|
window.location.href = `${ssoServer}/login?redirectUrl=${redirectUrl}`
|
|
|
- let lastRoute = { path: to.path, params: to.params, query: to.query }
|
|
|
- sessionStorage.setItem('lastRoute',JSON.stringify(lastRoute))
|
|
|
}
|
|
|
})
|
|
|
|