menu.js 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import service from '@/utils/request'
  2. // @Summary 用户登录
  3. // @Produce application/json
  4. // @Param 可以什么都不填 调一下即可
  5. // @Router /menu/getMenu [post]
  6. export const asyncMenu = () => {
  7. return service({
  8. url: "/menu/getMenu",
  9. method: 'post',
  10. })
  11. }
  12. // @Summary 获取menu列表
  13. // @Produce application/json
  14. // @Param {
  15. // page int
  16. // pageSize int
  17. // }
  18. // @Router /menu/getMenuList [post]
  19. export const getMenuList = (data) => {
  20. return service({
  21. url: "/menu/getMenuList",
  22. method: 'post',
  23. data
  24. })
  25. }
  26. // @Summary 获取menu列表
  27. // @Produce application/json
  28. // @Param menu Object
  29. // @Router /menu/getMenuList [post]
  30. export const addBaseMenu = (data) => {
  31. return service({
  32. url: "/menu/addBaseMenu",
  33. method: 'post',
  34. data
  35. })
  36. }
  37. // @Summary 获取基础路由列表
  38. // @Produce application/json
  39. // @Param 可以什么都不填 调一下即可
  40. // @Router /menu/getBaseMenuTree [post]
  41. export const getBaseMenuTree = () => {
  42. return service({
  43. url: "/menu/getBaseMenuTree",
  44. method: 'post',
  45. })
  46. }
  47. // @Summary 添加用户menu关联关系
  48. // @Produce application/json
  49. // @Param menus Object authorityId string
  50. // @Router /menu/getMenuList [post]
  51. export const addMenuAuthority = (data) => {
  52. return service({
  53. url: "/menu/addMenuAuthority",
  54. method: 'post',
  55. data
  56. })
  57. }
  58. // @Summary 获取用户menu关联关系
  59. // @Produce application/json
  60. // @Param authorityId string
  61. // @Router /menu/getMenuAuthority [post]
  62. export const getMenuAuthority = (data) => {
  63. return service({
  64. url: "/menu/getMenuAuthority",
  65. method: 'post',
  66. data
  67. })
  68. }