sellse.service.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. /**
  2. * explain: 这是协销用户业务的服务
  3. * Author: zhjy
  4. * Time: 2020-09-24
  5. */
  6. export default class SellerService {
  7. constructor(AjaxService) {
  8. Object.assign(this, {
  9. AjaxService
  10. })
  11. this.name = 'SellerService'
  12. }
  13. /**
  14. *@下单商品列表
  15. *@param organizeId 组织id
  16. *@param pageNum 页码
  17. *@param pageSize 每页显示多少
  18. *@param productName 商品名称
  19. */
  20. GoodList(data = {}) {
  21. return this.AjaxService.get({
  22. url: '/product/list',
  23. data,
  24. isLoading: true
  25. })
  26. }
  27. /**
  28. *@下单商品列表
  29. *@param userId 用户id
  30. */
  31. CartQuantity(data = {}) {
  32. return this.AjaxService.get({
  33. url: '/shopping/quantity',
  34. data,
  35. isLoading: true
  36. })
  37. }
  38. /**
  39. *@协销登录
  40. *@param mobile 手机号
  41. *@param password 密码
  42. */
  43. SellerLogin(data = {}) {
  44. return this.AjaxService.post({
  45. url: '/seller/login',
  46. data,
  47. isLoading: true
  48. })
  49. }
  50. /**
  51. *@协销账户中心
  52. *@param userID 协销ID
  53. */
  54. GetSellerHome(data = {}) {
  55. return this.AjaxService.get({
  56. url: '/seller/home',
  57. data,
  58. isLoading: true
  59. })
  60. }
  61. /**
  62. *@协销拉机构上线
  63. *@param userID 协销ID
  64. */
  65. SellerClubRegister(data = {}) {
  66. return this.AjaxService.post({
  67. url: '/seller/club/register',
  68. data,
  69. isLoading: true
  70. })
  71. }
  72. /**
  73. *@协销拉机构上线检测手机号和邮箱
  74. *@param mobileOrEmail 手机号和邮箱
  75. */
  76. SellerClubCheck(data = {}) {
  77. return this.AjaxService.post({
  78. url: '/seller/club/check',
  79. data,
  80. isLoading: true
  81. })
  82. }
  83. /**
  84. *@协销机构列表
  85. *@param name 机构名字关键字(搜索用)
  86. *@param pageNum 页码
  87. *@param pageSize 条数
  88. *@param spId 协销ID
  89. *@param status 机构状态
  90. */
  91. GetSellerClubList(data = {}) {
  92. return this.AjaxService.get({
  93. // url: '/product/clubList',
  94. url: '/product/storeList',
  95. data,
  96. isLoading: true
  97. })
  98. }
  99. /**
  100. *@协销下机构订单列表
  101. *@param clubID 机构ID
  102. *@param pageNum 页码
  103. *@param pageSize 条数
  104. */
  105. GetSellerClubOrderList(data = {}) {
  106. return this.AjaxService.get({
  107. url: '/seller/clubOrder',
  108. data,
  109. isLoading: true
  110. })
  111. }
  112. /**
  113. *@协销帮机构下单组合商品搜索
  114. *@param clubUserId 机构的userID
  115. *@param pageNum 页码
  116. *@param pageSize 条数
  117. *@param searchWord 搜索关键词
  118. */
  119. GetCombinationProduct(data = {}) {
  120. return this.AjaxService.get({
  121. url: '/seller/combinationProduct/search',
  122. data,
  123. isLoading: true
  124. })
  125. }
  126. /**
  127. *@协销-二手下单商品列表
  128. *@param 二手商品分类 secondHandType 1二手仪器,2临期产品,3其他 【必传】
  129. *@param 二手仪器分类的类型 instrumentType 1轻光电、2重光电、3耗材配件【不传默认全部】
  130. *@param 搜索关键词 searchKeyword 【选传】
  131. */
  132. GetOrderSecondHandProductList(data = {}) {
  133. return this.AjaxService.get({
  134. url: '/product/getOrderSecondHandProductList',
  135. data,
  136. isLoading: true
  137. })
  138. }
  139. /**
  140. *@协销-二手去结算接口
  141. *@param productId:商品ID(数字类型,必传)
  142. *@param clubId:机构会所ID(同之前)
  143. *@param serviceProviderId:协销ID(同之前)
  144. *@param productCount:二手购买数量
  145. */
  146. GetSettlementBySencondProduct(data = {}) {
  147. return this.AjaxService.post({
  148. url: '/seller/settlementBySencondProduct',
  149. data,
  150. isLoading: true
  151. })
  152. }
  153. /**
  154. *@组合商品加入购物车
  155. *@param clubId 会所的ID
  156. *@param serviceProviderId 协销ID
  157. */
  158. ShoppingCartBatchAddCart(data = {}) {
  159. return this.AjaxService.post({
  160. url: '/seller/batchAddCart',
  161. data,
  162. isLoading: true
  163. })
  164. }
  165. /**
  166. *@协销帮机构下单获取购物车数量
  167. *@param clubId 会所的ID
  168. *@param serviceProviderId 协销ID
  169. */
  170. GetSellerProductNum(data = {}) {
  171. return this.AjaxService.get({
  172. url: '/seller/productNum',
  173. data,
  174. isLoading: false
  175. })
  176. }
  177. }