menu.js 573 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import Mock from 'mockjs'
  2. const data = Mock.mock({
  3. 'menus':[
  4. {
  5. path: '/product',
  6. component: 'layout',
  7. children: [
  8. {
  9. path: 'index',
  10. name: 'product',
  11. component: 'views/product/index',
  12. meta:{title: 'Product',icon: 'form'}
  13. }
  14. ]
  15. },
  16. { path: '*', redirect: '/404', hidden: true }
  17. ]
  18. })
  19. export default [
  20. {
  21. url:'/menu/list',
  22. type:'get',
  23. response: config =>{
  24. return {
  25. code:20000,
  26. data:{
  27. menus:data.menus
  28. }
  29. }
  30. }
  31. }
  32. ]