etaMenuApi.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* ETA菜单配置api */
  2. import http from "@/api/http.js"
  3. export const menuConfigInterface = {
  4. /**
  5. * 获取商家菜单列表
  6. * @param {String} Keyword 关键词
  7. * @returns
  8. */
  9. getMenuList:params=>{
  10. return http.get('/eta_business/menu/list',params)
  11. },
  12. /**
  13. * 新增菜单
  14. * @param {Number} ParentId 父级id,一级菜单填0
  15. * @param {String} MenuType 菜单类型 0菜单 1按钮 2字段
  16. * @param {String} Name 菜单名称
  17. * @param {String} IconPath 菜单图标地址
  18. * @param {Number} Sort 排序
  19. * @param {String} Path 路由地址 etaMenuConfig 不加斜杠
  20. * @param {String} Component 组件路径,目前跟路由地址是一样的值
  21. * @param {Number} Hidden 0显示 1隐藏
  22. * @param {String} ButtonCode 按钮唯一标识,类型为按钮字段时必填
  23. * @returns
  24. */
  25. addMenu:params=>{
  26. return http.post('/eta_business/menu/add',params)
  27. },
  28. /**
  29. * 编辑菜单
  30. * @param {Number} MenuId 菜单ID 其他参数同上
  31. * @returns
  32. */
  33. editMenu:params=>{
  34. return http.post('/eta_business/menu/edit',params)
  35. },
  36. /**
  37. * 删除菜单
  38. * @param {Number} MenuId
  39. * @returns
  40. */
  41. removeMenu:params=>{
  42. return http.post('/eta_business/menu/remove',params)
  43. },
  44. /**
  45. * 获取菜单icon列表
  46. * @returns
  47. */
  48. getMenuIconList:params=>{
  49. return http.get('/eta_business/menu/icon/list',params)
  50. },
  51. /**
  52. * 新增icon
  53. * @returns
  54. */
  55. addMenuIcon:params=>{
  56. return http.post('/eta_business/menu/icon/add',params)
  57. },
  58. }