import { delay } from 'roadhog-api-doc'; const routerConfig = [ { "path": "/dashboard", "name": "dashboard", "icon": "dashboard", "children": [ { "path": "/dashboard/home", "name": "analysis", }, { "path": "/dashboard/test", "name": "monitor" }, ] }, { "path": "/user", "name": "dashboard", "icon": "dashboard", "children": [ { "path": "/user/analysis", "name": "analysis", }, { "path": "/user/monitor", "name": "monitor" }, { "path": "/user/workplace", "name": "workplace" } ] }, ] //获取菜单信息 const getMenus = (req, res) => { res.send({ status: 'OK', data: routerConfig, msg: '' }); } const proxy = { 'GET /api/getMenus': getMenus } export default delay(proxy, 2000);