shop.service.js 4.6 KB

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