shop.service.js 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  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. })
  16. }
  17. /* 小程序-搜索供应商列表 */
  18. GetSearchSupplierList (data = {}) {
  19. return this.AjaxService.get({
  20. url:'/commodity/search/query/shop',
  21. data,
  22. isLoading: true ,
  23. })
  24. }
  25. /* 小程序供应商个人中心 */
  26. GetHomePageData (data = {}) {
  27. return this.AjaxService.get({ url:'/user/shop/personal/data', data, isLoading: true })
  28. }
  29. /* 小程序供应商我的商品 */
  30. GetSupplierPyProduct (data = {}) {
  31. return this.AjaxService.get({
  32. url:'/commodity/shop/product/list',
  33. data,
  34. isLoading: false ,
  35. })
  36. }
  37. /* 小程序供应商操作添加删除主推商品 */
  38. SupplierSwitchFeaturedyProduct (data = {}) {
  39. return this.AjaxService.post({
  40. url:'/commodity/shop/featured/switch',
  41. data,
  42. isLoading: true ,
  43. })
  44. }
  45. /* 小程序供应商操作下架商品 */
  46. SupplierSoldOutProduct (data = {}) {
  47. return this.AjaxService.post({
  48. url:'/commodity/shop/product/offline',
  49. data,
  50. isLoading: true ,
  51. })
  52. }
  53. /* 小程序供应商我的店铺详情 */
  54. GetSupplierHomeDeatils (data = {}) {
  55. return this.AjaxService.get({
  56. url:'/user/shop/home/data',
  57. data,
  58. isLoading: true ,
  59. })
  60. }
  61. /* 小程序供应商我的店铺banner */
  62. GetSupplierHomeBanner (data = {}) {
  63. return this.AjaxService.get({
  64. url:'/user/shop/home/images',
  65. data,
  66. isLoading: true ,
  67. })
  68. }
  69. /* 小程序供应商我的店铺主推商品 */
  70. GetSupplierHomeProduct (data = {}) {
  71. return this.AjaxService.get({
  72. url:'/commodity/shop/product/main',
  73. data,
  74. isLoading: true ,
  75. })
  76. }
  77. /* 小程序供应商我的店铺全部商品 */
  78. GetSupplierHomeProductList (data = {}) {
  79. return this.AjaxService.get({
  80. url:'/commodity/search/query/product/shop',
  81. data,
  82. isLoading: false ,
  83. })
  84. }
  85. /* 发货-添加商品资质初始化查询商品 */
  86. GetSupplierLogisticsRecord (data = {}) {
  87. return this.AjaxService.get({
  88. url:'/order/shop/ship/logistics/record',
  89. data,
  90. isLoading: false ,
  91. })
  92. }
  93. /* 发货-商品资质回显 */
  94. GetSupplierQualificationData (data = {}) {
  95. return this.AjaxService.get({
  96. url:'/order/shop/qualification/list',
  97. data,
  98. isLoading: false ,
  99. })
  100. }
  101. /* 发货-保存商品资质 */
  102. GetSupplierQualificationUpdata (data = {}) {
  103. return this.AjaxService.post({
  104. url:'/order/shop/qualification/save',
  105. data,
  106. isLoading: false ,
  107. })
  108. }
  109. /* 小程序供应商我的订单 */
  110. GetSupplierMyOrderList (data = {}) {
  111. return this.AjaxService.get({
  112. url:'/order/shop/list',
  113. data,
  114. isLoading: true ,
  115. })
  116. }
  117. /* 小程序发货-权限控制 */
  118. MiniShipments (data = {}) {
  119. return this.AjaxService.get({
  120. url:'/order/shop/share/code/check',
  121. data,
  122. isLoading: true ,
  123. })
  124. }
  125. /* 小程序发货-查询供应商子订单详情 */
  126. GetShopOrderDetails (data = {}) {
  127. return this.AjaxService.get({
  128. url:'/order/shop/detail',
  129. data,
  130. isLoading: true ,
  131. })
  132. }
  133. /* 小程序发货-供应商订单详情获取订单分享码 */
  134. ShopOrderShareCode (data = {}) {
  135. return this.AjaxService.get({
  136. url:'/order/shop/share/code',
  137. data,
  138. isLoading: false ,
  139. })
  140. }
  141. /* 小程序发货-供应商订单发货商品查询 */
  142. ShopOrderShipmentsInfo (data = {}) {
  143. return this.AjaxService.get({
  144. url:'/order/shop/ship/info',
  145. data,
  146. isLoading: true ,
  147. })
  148. }
  149. /* 小程序发货-物流公司查询 */
  150. GetLogisticsCompany (data = {}) {
  151. return this.AjaxService.get({
  152. url:'/order/shop/ship/company',
  153. data,
  154. isLoading: true ,
  155. })
  156. }
  157. /* 小程序发货-查看发货记录物流信息 */
  158. GetLogisticsInfo (data = {}) {
  159. return this.AjaxService.get({
  160. url:'/order/shop/ship/logistics/info',
  161. data,
  162. isLoading: true ,
  163. })
  164. }
  165. /* 小程序发货-查看发货记录-添加物流 */
  166. ShopAddLogisticsInfo (data = {}) {
  167. return this.AjaxService.post({
  168. url:'/order/shop/ship/logistics/add',
  169. data,
  170. isLoading: true,
  171. })
  172. }
  173. /* 小程序发货-扫码获取物流公司信息 */
  174. GetExpressInformation (data = {}) {
  175. return this.AjaxService.post({
  176. url:'/order/shop/ship/logistics/scan',
  177. data,
  178. isLoading: false,
  179. })
  180. }
  181. /* 小程序发货-确认发货 */
  182. ShopAddLogistics (data = {}) {
  183. return this.AjaxService.post({
  184. url:'/order/shop/ship/delivery',
  185. data,
  186. isLoading: true ,
  187. })
  188. }
  189. /* 小程序发货-发货记录 */
  190. ShopShipmentsRecord (data = {}) {
  191. return this.AjaxService.get({
  192. url:'/order/shop/ship/delivery/record',
  193. data,
  194. isLoading: true ,
  195. })
  196. }
  197. /* 小程序发货-撤销发货 */
  198. ShopCancelShipment (data = {}) {
  199. return this.AjaxService.post({
  200. url:'/order/shop/ship/delivery/cancel',
  201. data,
  202. isLoading: true ,
  203. })
  204. }
  205. /* 一级分类 */
  206. GetPrimaryClassification (data = {}) {
  207. return this.AjaxService.get({
  208. url:'/commodity/type/first',
  209. data,
  210. isLoading: false ,
  211. })
  212. }
  213. /* 二级级分类 */
  214. GetPrimarySecondaryClassification (data = {}) {
  215. return this.AjaxService.get({
  216. url:'/supplier/secondaryClassification',
  217. data,
  218. isLoading: false ,
  219. })
  220. }
  221. /* 三级分类 */
  222. GetPrimaryThreeLevelClassification (data = {}) {
  223. return this.AjaxService.get({
  224. url:'/supplier/threeLevelClassification',
  225. data,
  226. isLoading: false ,
  227. })
  228. }
  229. /**
  230. *@供应商消息通知中心未读消息数量
  231. */
  232. getUserAuthShopMessageCount(data = {}) {
  233. return this.AjaxService.get({
  234. url: '/user/login/auth/shopMessageCount',
  235. data,
  236. isLoading: false,
  237. })
  238. }
  239. /**
  240. *@供应商消息通知列表
  241. *@param commonId:供应商shopId
  242. *@param messageType:消息类型1.交易物流2.账户通知3.服务通知4.优惠促销
  243. *@param pageNum 页码
  244. *@param pageSize 条数
  245. */
  246. getUserAuthShopMessageList(data = {}) {
  247. return this.AjaxService.get({
  248. url: '/user/login/auth/shopMessageList',
  249. data,
  250. isLoading: false,
  251. })
  252. }
  253. /**
  254. *@查询供应商未读消息数量
  255. *@param commonId:供应商clubId
  256. */
  257. getAuthShopCount(data = {}) {
  258. return this.AjaxService.get({
  259. url: '/user/login/auth/ShopCount',
  260. data,
  261. isLoading: false,
  262. })
  263. }
  264. }