shop.service.js 4.9 KB

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