commission.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import request from '@/sheep/request';
  2. export default {
  3. // 分销商详情
  4. agent: () =>
  5. request({
  6. url: 'commission/agent',
  7. method: 'GET',
  8. custom: {
  9. showLoading: false,
  10. showError: false,
  11. },
  12. }),
  13. // 分销表单
  14. form: () =>
  15. request({
  16. url: 'commission/agent/form',
  17. method: 'GET',
  18. }),
  19. // 申请分销商
  20. apply: (data) =>
  21. request({
  22. url: 'commission/agent/apply',
  23. method: 'POST',
  24. data,
  25. custom: {
  26. showSuccess: true,
  27. },
  28. }),
  29. // 分销动态
  30. log: (params) =>
  31. request({
  32. url: 'commission/log',
  33. method: 'GET',
  34. params,
  35. }),
  36. // 分销订单
  37. order: (params) =>
  38. request({
  39. url: '/app-api/trade/brokerage-record/page',
  40. method: 'GET',
  41. params,
  42. }),
  43. // 分销商品
  44. goods: (params) =>
  45. request({
  46. url: '/app-api/product/spu/page',
  47. method: 'GET',
  48. params,
  49. }),
  50. // 我的团队
  51. team: (params) =>
  52. request({
  53. url: '/app-api/trade/brokerage-user/child-summary-page',
  54. method: 'GET',
  55. params,
  56. }),
  57. // 佣金转余额
  58. transfer: (data) =>
  59. request({
  60. url: 'commission/agent/transfer',
  61. method: 'POST',
  62. data,
  63. }),
  64. getSummary: (data) =>
  65. request({
  66. url: '/app-api/trade/brokerage-user/get-summary',
  67. method: 'GET',
  68. }),
  69. getBrokerageRankNumber: (params) =>
  70. request({
  71. url: '/app-api/trade/brokerage-user/get-rank-by-price',
  72. method: 'GET',
  73. params
  74. }),
  75. getBrokerageRankList: (params) =>
  76. request({
  77. url: '/app-api/trade/brokerage-user/rank-page-by-price',
  78. method: 'GET',
  79. params
  80. }),
  81. getRanklist: (params) =>
  82. request({
  83. url: '/app-api/trade/brokerage-user/rank-page-by-user-count',
  84. method: 'GET',
  85. params
  86. }),
  87. };