| | |
| | | import { asyncRoutes, commonRoutes } from '@/router' |
| | | import { asyncRoutes, asyncRoutesCloud, commonRoutes } from '@/router' |
| | | import Layout from '@/layout' |
| | | import { getCookie } from '@/utils/auth' |
| | | |
| | |
| | | let newRoutes |
| | | if (getCookie('cloud')) { |
| | | const arr = menu.map(i => i.code) |
| | | newRoutes = asyncRoutes.filter(i => { |
| | | newRoutes = asyncRoutesCloud.filter(i => { |
| | | if (arr.includes(i.code)) { |
| | | return i |
| | | } |
| | | }) |
| | | newRoutes.push({ path: '*', redirect: '/404', hidden: true }) |
| | | } else { |
| | | newRoutes = getAsyncRoutes(asyncRoutes, menu) |
| | | } |