shop.service.js 4.9 KB

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