sellerGoodsClass.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import { requestApi } from '../util/network'
  2. // 获取店铺商品分类公共数据
  3. export const getCommonData =
  4. () =>
  5. requestApi(
  6. '/Sellergoodsclass/get_common_data',
  7. 'POST',
  8. {
  9. },
  10. 'seller'
  11. )
  12. // 获取店铺商品分类列表
  13. export const getGoodsClassList =
  14. () =>
  15. requestApi(
  16. '/Sellergoodsclass/index',
  17. 'POST',
  18. {
  19. },
  20. 'seller'
  21. )
  22. // 获取店铺商品分类信息
  23. export const getGoodsClassInfo =
  24. (top_class_id) =>
  25. requestApi(
  26. '/Sellergoodsclass/goods_class_edit',
  27. 'POST',
  28. {
  29. 'top_class_id': top_class_id
  30. },
  31. 'seller'
  32. )
  33. // 删除店铺商品分类
  34. export const delGoodsClass =
  35. (class_id) =>
  36. requestApi(
  37. '/Sellergoodsclass/drop_goods_class',
  38. 'POST',
  39. {
  40. 'class_id': class_id
  41. },
  42. 'seller'
  43. )
  44. // 编辑店铺商品分类
  45. export const editGoodsClass =
  46. (data) =>
  47. requestApi(
  48. '/Sellergoodsclass/goods_class_save',
  49. 'POST',
  50. {
  51. 'storegc_id': data.storegc_id,
  52. 'storegc_name': data.storegc_name,
  53. 'storegc_parent_id': data.storegc_parent_id,
  54. 'storegc_state': data.storegc_state,
  55. 'storegc_sort': data.storegc_sort
  56. },
  57. 'seller'
  58. )
  59. // 获取店铺商品分类
  60. export const getGoodsClassTree =
  61. () =>
  62. requestApi(
  63. '/Sellergoodsclass/get_tree',
  64. 'POST',
  65. {
  66. },
  67. 'seller'
  68. )