loulijun2021
2023-05-06 24a3cbbc31b8fbff1c6a3c9b9e4360dc82a05f4e
src/store/modules/permission.js
@@ -1,4 +1,4 @@
import { asyncRoutes, commonRoutes } from '@/router'
import { asyncRoutes, asyncRoutesCloud, commonRoutes } from '@/router'
import Layout from '@/layout'
import { getCookie } from '@/utils/auth'
@@ -103,11 +103,12 @@
      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)
      }