menu.js 890 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import { delay } from 'roadhog-api-doc';
  2. const routerConfig = [
  3. {
  4. "path": "/dashboard",
  5. "name": "dashboard",
  6. "icon": "dashboard",
  7. "children": [
  8. {
  9. "path": "/dashboard/home",
  10. "name": "analysis",
  11. },
  12. {
  13. "path": "/dashboard/test",
  14. "name": "monitor"
  15. },
  16. ]
  17. },
  18. {
  19. "path": "/user",
  20. "name": "dashboard",
  21. "icon": "dashboard",
  22. "children": [
  23. {
  24. "path": "/user/analysis",
  25. "name": "analysis",
  26. },
  27. {
  28. "path": "/user/monitor",
  29. "name": "monitor"
  30. },
  31. {
  32. "path": "/user/workplace",
  33. "name": "workplace"
  34. }
  35. ]
  36. },
  37. ]
  38. //获取菜单信息
  39. const getMenus = (req, res) => {
  40. res.send({
  41. status: 'OK',
  42. data: routerConfig,
  43. msg: ''
  44. });
  45. }
  46. const proxy = {
  47. 'GET /api/getMenus': getMenus
  48. }
  49. export default delay(proxy, 2000);