shop.service.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /**
  2. * 这是与购物有关的业务逻辑的服务
  3. */
  4. export default class ShopService {
  5. constructor(AjaxService) {
  6. Object.assign(this, { AjaxService })
  7. this.name = 'ShopService'
  8. }
  9. /* 小程序-供应商注册第一步 */
  10. SupplierAppletsRegistered (data = {}) {
  11. return this.AjaxService.post({ url:'/supplier/appletsRegistered', data, isLoading: true })
  12. }
  13. /* 小程序-搜索供应商列表 */
  14. GetSearchSupplierList (data = {}) {
  15. return this.AjaxService.get({ url:'/search/query/supplier', data, isLoading: true })
  16. }
  17. /* 小程序供应商个人中心 */
  18. GetHomePageData (data = {}) {
  19. return this.AjaxService.get({ url:'/supplier/homePageData', data, isLoading: true })
  20. }
  21. /* 小程序供应商我的商品 */
  22. GetSupplierPyProduct (data = {}) {
  23. return this.AjaxService.get({ url:'/supplier/myProduct', data, isLoading: true })
  24. }
  25. /* 小程序供应商操作添加删除主推商品 */
  26. SupplierSwitchFeaturedyProduct (data = {}) {
  27. return this.AjaxService.post({ url:'/supplier/switchFeatured', data, isLoading: true })
  28. }
  29. /* 小程序供应商操作下架商品 */
  30. SupplierSoldOutProduct (data = {}) {
  31. return this.AjaxService.post({ url:'/supplier/soldOut', data, isLoading: true })
  32. }
  33. /* 小程序供应商我的店铺详情 */
  34. GetSupplierHomeDeatils (data = {}) {
  35. return this.AjaxService.get({ url:'/supplier/home/detail', data, isLoading: true })
  36. }
  37. /* 小程序供应商我的店铺banner */
  38. GetSupplierHomeBanner (data = {}) {
  39. return this.AjaxService.get({ url:'/supplier/home/images', data, isLoading: true })
  40. }
  41. /* 小程序供应商我的店铺主推商品 */
  42. GetSupplierHomeProduct (data = {}) {
  43. return this.AjaxService.get({ url:'/supplier/home/products', data, isLoading: true })
  44. }
  45. /* 小程序供应商我的店铺全部商品 */
  46. GetSupplierHomeProductList (data = {}) {
  47. return this.AjaxService.get({ url:'/search/query/product/supplier', data, isLoading: false })
  48. }
  49. /* 小程序供应商我的订单 */
  50. GetSupplierMyOrderList (data = {}) {
  51. return this.AjaxService.get({ url:'/supplier/myOrderList', data, isLoading: true })
  52. }
  53. /* 小程序发货-权限控制 */
  54. MiniShipments (data = {}) {
  55. return this.AjaxService.post({ url:'/supplier/miniShipments', data, isLoading: true })
  56. }
  57. /* 小程序发货-查询供应商子订单详情 */
  58. GetShopOrderDetails (data = {}) {
  59. return this.AjaxService.get({ url:'/supplier/shopOrderDetails', data, isLoading: true })
  60. }
  61. /* 小程序发货-绑供应商运营人员 */
  62. BindShopOperator (data = {}) {
  63. return this.AjaxService.post({ url:'/supplier/shopBindingWx', data, isLoading: true })
  64. }
  65. /* 小程序发货-供应商订单详情获取订单分享码 */
  66. ShopOrderShareCode (data = {}) {
  67. return this.AjaxService.post({ url:'/supplier/shopShareShipments', data, isLoading: false })
  68. }
  69. /* 小程序发货-供应商订单发货商品查询 */
  70. ShopOrderShipmentsInfo (data = {}) {
  71. return this.AjaxService.get({ url:'/supplier/shipmentsInfo', data, isLoading: true })
  72. }
  73. /* 小程序发货-物流公司查询 */
  74. GetLogisticsCompany (data = {}) {
  75. return this.AjaxService.get({ url:'/supplier/logisticsCompany', data, isLoading: true })
  76. }
  77. /* 小程序发货-查看发货记录物流信息 */
  78. GetLogisticsInfo (data = {}) {
  79. return this.AjaxService.get({ url:'/supplier/logisticsInfo', data, isLoading: true })
  80. }
  81. /* 小程序发货-查看发货记录-添加物流 */
  82. ShopAddLogisticsInfo (data = {}) {
  83. return this.AjaxService.post({ url:'/supplier/addLogisticsInfo', data, isLoading: true })
  84. }
  85. /* 小程序发货-扫码获取物流公司信息 */
  86. GetExpressInformation (data = {}) {
  87. return this.AjaxService.get({ url:'/supplier/scanLogistics', data, isLoading: false })
  88. }
  89. /* 小程序发货-确认发货 */
  90. ShopAddLogistics (data = {}) {
  91. return this.AjaxService.post({ url:'/supplier/addLogistics', data, isLoading: true })
  92. }
  93. /* 小程序发货-发货记录 */
  94. ShopShipmentsRecord (data = {}) {
  95. return this.AjaxService.get({ url:'/supplier/shipmentsRecord', data, isLoading: true })
  96. }
  97. /* 小程序发货-撤销发货 */
  98. ShopCancelShipment (data = {}) {
  99. return this.AjaxService.post({ url:'/supplier/cancelShipment', data, isLoading: true })
  100. }
  101. /* 一级分类 */
  102. GetPrimaryClassification (data = {}) {
  103. return this.AjaxService.get({ url:'/supplier/primaryClassification', data, isLoading: false })
  104. }
  105. /* 二级级分类 */
  106. GetPrimarySecondaryClassification (data = {}) {
  107. return this.AjaxService.get({ url:'/supplier/secondaryClassification', data, isLoading: false })
  108. }
  109. /* 三级分类 */
  110. GetPrimaryThreeLevelClassification (data = {}) {
  111. return this.AjaxService.get({ url:'/supplier/threeLevelClassification', data, isLoading: false })
  112. }
  113. }