Commit 83fb7f86 authored by wangxl's avatar wangxl

22

parent 87067e15
......@@ -295,6 +295,7 @@ export function changeProjType (type) {
this.$store.commit('app/clearStore')
setType(type + '')
this.$store.commit('app/setProjType', type)
let menuList = JSON.parse(window.sessionStorage.getItem('menuList'))
this.$store.commit('app/initStore', [menuList[0].id])
this.$router.push('/')
resolve(true)
......@@ -318,9 +319,6 @@ router.beforeEach(async (to, from, next) => {
} else {
const hasUser = JSON.parse(window.sessionStorage.getItem('user'))
const hasMenu = JSON.parse(window.sessionStorage.getItem('menuList'))
if (!!!hasMenu) {
await store.dispatch('user/getMenuList')
}
if (hasUser && hasMenu) {
if (to.path === '/sys') {
if (!!!hasUser.projType && hasUser.type === '3' && hasUser.roles != '4') {
......
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