| | |
| | | // return acc; |
| | | // }, {}); |
| | | const userInfo = JSON.parse(Cookies.get('userInfo')) |
| | | if(userInfo.identity === 0 || userInfo.identity === 1 ) { |
| | | if(userInfo.identity === 0 ) { |
| | | sidebarRouters.value = menu.adminMenu |
| | | Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | }else if(userInfo.identity === 1) { |
| | | sidebarRouters.value = menu.agencyMenu |
| | | Cookies.set('routers',JSON.stringify(sidebarRouters.value)) |
| | | } |
| | | let path = "" |
| | | if(sidebarRouters.value[0].children && sidebarRouters.value[0].children.length > 0){ |
| | | path = sidebarRouters.value[0].path + '/'+ sidebarRouters.value[0].children[0].path |
| | | }else { |
| | | path = sidebarRouters.value[0].path |
| | | } |
| | | |
| | | router.push({ |
| | | path: sidebarRouters.value[0].path |
| | | path: path |
| | | }) |
| | | // router.push({ path: redirect.value || "/", query: otherQueryParams }); |
| | | }).catch(() => { |