sellerInviter.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. import { requestApi } from '../util/network'
  2. // 检索可选取的分销商品
  3. export const searchGoodsList =
  4. (goods_name,params) =>
  5. requestApi(
  6. '/Sellerinviter/search_goods',
  7. 'POST',
  8. {
  9. 'goods_name': goods_name,
  10. 'page': params.page,
  11. 'per_page': params.per_page,
  12. 'client_type': 'wap'
  13. },
  14. 'seller'
  15. )
  16. // 获取分销商品列表
  17. export const getInviterGoodsList =
  18. (params) =>
  19. requestApi(
  20. '/Sellerinviter/goods_list',
  21. 'POST',
  22. {
  23. 'page': params.page,
  24. 'per_page': params.per_page,
  25. },
  26. 'seller'
  27. )
  28. // 新增分销商品
  29. export const addInviterGoods =
  30. (data) =>
  31. requestApi(
  32. '/Sellerinviter/goods_add',
  33. 'POST',
  34. {
  35. 'inviter_goods_commonid': data.goods_commonid,
  36. 'inviter_ratio': data.inviter_ratio,
  37. },
  38. 'seller'
  39. )
  40. // 编辑分销商品
  41. export const editInviterGoods =
  42. (data) =>
  43. requestApi(
  44. '/Sellerinviter/goods_edit',
  45. 'POST',
  46. {
  47. 'inviter_goods_commonid': data.goods_commonid,
  48. 'inviter_ratio': data.inviter_ratio,
  49. 'client_type': 'wap'
  50. },
  51. 'seller'
  52. )
  53. // 获取单个分销商品
  54. export const getInviterGoodsInfo =
  55. (goods_commonid) =>
  56. requestApi(
  57. '/Sellerinviter/goods_info',
  58. 'POST',
  59. {
  60. 'goods_commonid': goods_commonid,
  61. 'client_type': 'wap'
  62. },
  63. 'seller'
  64. )
  65. // 删除分销商品
  66. export const delInviterGoods =
  67. (goods_commonid) =>
  68. requestApi(
  69. '/Sellerinviter/goods_del',
  70. 'POST',
  71. {
  72. 'goods_commonid': goods_commonid,
  73. 'client_type': 'wap'
  74. },
  75. 'seller'
  76. )
  77. // 获取店铺分销业绩
  78. export const getInviterOrderList =
  79. (params) =>
  80. requestApi(
  81. '/Sellerinviter/order_list',
  82. 'POST',
  83. {
  84. 'page': params.page,
  85. 'per_page': params.per_page,
  86. 'client_type': 'wap'
  87. },
  88. 'seller'
  89. )