Commit ffe7165b authored by 张伯涛's avatar 张伯涛

修改

parent 20cf2398
...@@ -31,7 +31,7 @@ router.beforeEach((to, from, next) => { ...@@ -31,7 +31,7 @@ router.beforeEach((to, from, next) => {
store.dispatch('GenerateRoutes', res).then((routers) => { store.dispatch('GenerateRoutes', res).then((routers) => {
// 判断用户是否有路由 // 判断用户是否有路由
if (routers.accessedRoutes && routers.accessedRoutes.length > 0 && routers.getRouters && routers.getRouters.length > 0) { if (routers.accessedRoutes && routers.accessedRoutes.length > 0 && routers.getRouters && routers.getRouters.length > 0) {
console.log('routers', routers) console.log('routersaaaaaaaaaaaaa', routers)
if (routers.accessedRoutes[0].path === '/entry') { if (routers.accessedRoutes[0].path === '/entry') {
router.addRoutes(routers.accessedRoutes) // 动态添加可访问路由表 router.addRoutes(routers.accessedRoutes) // 动态添加可访问路由表
next({ path: '/Home', replace: true }) // hack方法 确保addRoutes已完成 next({ path: '/Home', replace: true }) // hack方法 确保addRoutes已完成
......
...@@ -149,7 +149,7 @@ export default { ...@@ -149,7 +149,7 @@ export default {
// this.$router.push({ path: `http://main.court.com${this.redirect || "/"}` }); // this.$router.push({ path: `http://main.court.com${this.redirect || "/"}` });
this.loading = false this.loading = false
// this.$router.push('/welcome') // this.$router.push('/welcome')
this.$router.push('/Home') this.$router.push('/productionInfo/Station')
this.$store.commit('SET_NAME', res.data.user.username) this.$store.commit('SET_NAME', res.data.user.username)
}) })
.catch(() => { .catch(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment