shop.service.js 4.8 KB

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