shop.service.js 8.0 KB

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