refactor(dev): 调整开发环境配置并更新路由相关代码
- 修改 .env.development 文件中的 VITE_BASE_PATH 为本地地址 - 在 pathInfo.json 中添加订单管理相关页面的路径信息 - 更新 router.js 中的异步路由获取逻辑,使用 getMenuList 替代原 asyncMenu
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { asyncRouterHandle } from '@/utils/asyncRouter'
|
||||
import { emitter } from '@/utils/bus.js'
|
||||
import { asyncMenu } from '@/api/menu'
|
||||
import { asyncMenu, getMenuList } from '@/api/menu'
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, watchEffect } from 'vue'
|
||||
import pathInfo from '@/pathInfo.json'
|
||||
@@ -106,8 +106,10 @@ export const useRouterStore = defineStore('router', () => {
|
||||
children: []
|
||||
}
|
||||
]
|
||||
const asyncRouterRes = await asyncMenu()
|
||||
const asyncRouter = asyncRouterRes.data.menus
|
||||
// const asyncRouterRes = await asyncMenu()
|
||||
const asyncRouterRes = await getMenuList()
|
||||
// const asyncRouter = asyncRouterRes.data.menus
|
||||
const asyncRouter = asyncRouterRes.data
|
||||
asyncRouter &&
|
||||
asyncRouter.push({
|
||||
path: 'reload',
|
||||
|
Reference in New Issue
Block a user