shop.service.js 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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. GetSupplierLogisticsRecord (data = {}) {
  94. return this.AjaxService.get({
  95. url:'/supplier/logisticsRecord',
  96. data,
  97. isLoading: false
  98. })
  99. }
  100. /* 发货-商品资质回显 */
  101. GetSupplierQualificationData (data = {}) {
  102. return this.AjaxService.get({
  103. url:'/supplier/qualification/data',
  104. data,
  105. isLoading: false
  106. })
  107. }
  108. /* 发货-保存商品资质 */
  109. GetSupplierQualificationUpdata (data = {}) {
  110. return this.AjaxService.post({
  111. url:'/supplier/qualification',
  112. data,
  113. isLoading: false
  114. })
  115. }
  116. /* 小程序供应商我的订单 */
  117. GetSupplierMyOrderList (data = {}) {
  118. return this.AjaxService.get({ url:'/supplier/myOrderList', data, isLoading: true })
  119. }
  120. /* 小程序发货-权限控制 */
  121. MiniShipments (data = {}) {
  122. return this.AjaxService.post({ url:'/supplier/miniShipments', data, isLoading: true })
  123. }
  124. /* 小程序发货-查询供应商子订单详情 */
  125. GetShopOrderDetails (data = {}) {
  126. return this.AjaxService.get({ url:'/supplier/shopOrderDetails', data, isLoading: true })
  127. }
  128. /* 小程序发货-绑供应商运营人员 */
  129. BindShopOperator (data = {}) {
  130. return this.AjaxService.post({ url:'/supplier/shopBindingWx', data, isLoading: true })
  131. }
  132. /* 小程序发货-供应商订单详情获取订单分享码 */
  133. ShopOrderShareCode (data = {}) {
  134. return this.AjaxService.post({ url:'/supplier/shopShareShipments', data, isLoading: false })
  135. }
  136. /* 小程序发货-供应商订单发货商品查询 */
  137. ShopOrderShipmentsInfo (data = {}) {
  138. return this.AjaxService.get({ url:'/supplier/shipmentsInfo', data, isLoading: true })
  139. }
  140. /* 小程序发货-物流公司查询 */
  141. GetLogisticsCompany (data = {}) {
  142. return this.AjaxService.get({ url:'/supplier/logisticsCompany', data, isLoading: true })
  143. }
  144. /* 小程序发货-查看发货记录物流信息 */
  145. GetLogisticsInfo (data = {}) {
  146. return this.AjaxService.get({ url:'/supplier/logisticsInfo', data, isLoading: true })
  147. }
  148. /* 小程序发货-查看发货记录-添加物流 */
  149. ShopAddLogisticsInfo (data = {}) {
  150. return this.AjaxService.post({ url:'/supplier/addLogisticsInfo', data, isLoading: true })
  151. }
  152. /* 小程序发货-扫码获取物流公司信息 */
  153. GetExpressInformation (data = {}) {
  154. return this.AjaxService.get({ url:'/supplier/scanLogistics', data, isLoading: false })
  155. }
  156. /* 小程序发货-确认发货 */
  157. ShopAddLogistics (data = {}) {
  158. return this.AjaxService.post({ url:'/supplier/addLogistics', data, isLoading: true })
  159. }
  160. /* 小程序发货-发货记录 */
  161. ShopShipmentsRecord (data = {}) {
  162. return this.AjaxService.get({ url:'/supplier/shipmentsRecord', data, isLoading: true })
  163. }
  164. /* 小程序发货-撤销发货 */
  165. ShopCancelShipment (data = {}) {
  166. return this.AjaxService.post({ url:'/supplier/cancelShipment', data, isLoading: true })
  167. }
  168. /* 一级分类 */
  169. GetPrimaryClassification (data = {}) {
  170. return this.AjaxService.get({ url:'/supplier/primaryClassification', data, isLoading: false })
  171. }
  172. /* 二级级分类 */
  173. GetPrimarySecondaryClassification (data = {}) {
  174. return this.AjaxService.get({ url:'/supplier/secondaryClassification', data, isLoading: false })
  175. }
  176. /* 三级分类 */
  177. GetPrimaryThreeLevelClassification (data = {}) {
  178. return this.AjaxService.get({ url:'/supplier/threeLevelClassification', data, isLoading: false })
  179. }
  180. }