import { Request, Response } from 'express'; const getMenus = (req: Request, res: Response) => { const result = { code: 0, success: true, data: { routes: [ { "path": "/welcome", "key": "", "name": "welcome", "icon": "HomeOutlined", "access": "", "component": "Welcome", "title": "首页", "routes": [] }, // { // "path": "/device", // "key": "", // "name": "device", // "icon": "DesktopOutlined", // "access": "", // "component": "", // "title": "设备管理", // "routes": [ // { // "path": "/device/device-list", // "key": "12", // "name": "device-list", // "icon": "", // "access": "", // "component": "Device/DeviceList", // "title": "设备列表", // "routes": [] // }, // { // "path": "/device/device-category-list", // "key": "13", // "name": "device-category-list", // "icon": "", // "access": "", // "component": "Device/DeviceCategoryList", // "title": "设备类别", // "routes": [] // }, // { // "path": "/device/device-group-list", // "key": "14", // "name": "device-group-list", // "icon": "", // "access": "", // "component": "Device/DeviceGroupList", // "title": "设备组", // "routes": [] // } // ] // }, // { // "path": "/alarm", // "key": "", // "name": "alarm", // "icon": "WarningOutlined", // "access": "", // "component": "", // "title": "告警管理", // "routes": [ // { // "path": "/alarm/alarm-list", // "key": "50", // "name": "alarm-list", // "icon": "", // "access": "", // "component": "Alarm/AlarmList", // "title": "告警列表", // "routes": [] // }, // { // "path": "/alarm/alarm-setting", // "key": "51", // "name": "alarm-setting", // "icon": "", // "access": "", // "component": "Alarm/AlarmSetting", // "title": "告警设置", // "routes": [] // }, // { // "path": "/alarm/alarm-ways", // "key": "55", // "name": "alarm-ways", // "icon": "", // "access": "", // "component": "Alarm/AlarmWays", // "title": "告警方式", // "routes": [] // } // ] // }, { "path": "/alarm/alarm-list", "key": "", "name": "alarm-list", "icon": "WarningOutlined", "access": "", "component": "Hidden", "title": "告警列表", "routes": [] }, { "path": "alarm_rules", "key": "", "name": "alarm_rules", "icon": "OrderedListOutlined", "access": "", "component": "Hidden", "title": "告警规则", "routes": [] }, { "path": "interfaceManage", "key": "", "name": "interfaceManage", "icon": "BranchesOutlined", "access": "", "component": "Hidden", "title": "接口管理", "routes": [] } ] }, msg: "获取成功" } return res.json(result); }; export default { 'POST /api/mock/getMenus': getMenus, };