sellse.service.js 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  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. data,
  95. isLoading: true
  96. })
  97. }
  98. /**
  99. *@协销下机构订单列表
  100. *@param clubID 机构ID
  101. *@param pageNum 页码
  102. *@param pageSize 条数
  103. */
  104. GetSellerClubOrderList(data = {}) {
  105. return this.AjaxService.get({
  106. url: '/seller/clubOrder',
  107. data,
  108. isLoading: true
  109. })
  110. }
  111. /**
  112. *@协销帮机构下单组合商品搜索
  113. *@param clubUserId 机构的userID
  114. *@param pageNum 页码
  115. *@param pageSize 条数
  116. *@param searchWord 搜索关键词
  117. */
  118. GetCombinationProduct(data = {}) {
  119. return this.AjaxService.get({
  120. url: '/seller/combinationProduct/search',
  121. data,
  122. isLoading: true
  123. })
  124. }
  125. /**
  126. *@协销-二手下单商品列表
  127. *@param 二手商品分类 secondHandType 1二手仪器,2临期产品,3其他 【必传】
  128. *@param 二手仪器分类的类型 instrumentType 1轻光电、2重光电、3耗材配件【不传默认全部】
  129. *@param 搜索关键词 searchKeyword 【选传】
  130. */
  131. GetOrderSecondHandProductList(data = {}) {
  132. return this.AjaxService.get({
  133. url: '/product/getOrderSecondHandProductList',
  134. data,
  135. isLoading: true
  136. })
  137. }
  138. /**
  139. *@协销-二手去结算接口
  140. *@param productId:商品ID(数字类型,必传)
  141. *@param clubId:机构会所ID(同之前)
  142. *@param serviceProviderId:协销ID(同之前)
  143. *@param productCount:二手购买数量
  144. */
  145. GetSettlementBySencondProduct(data = {}) {
  146. return this.AjaxService.post({
  147. url: '/seller/settlementBySencondProduct',
  148. data,
  149. isLoading: true
  150. })
  151. }
  152. /**
  153. *@组合商品加入购物车
  154. *@param clubId 会所的ID
  155. *@param serviceProviderId 协销ID
  156. */
  157. ShoppingCartBatchAddCart(data = {}) {
  158. return this.AjaxService.post({
  159. url: '/seller/batchAddCart',
  160. data,
  161. isLoading: true
  162. })
  163. }
  164. /**
  165. *@协销帮机构下单获取购物车数量
  166. *@param clubId 会所的ID
  167. *@param serviceProviderId 协销ID
  168. */
  169. GetSellerProductNum(data = {}) {
  170. return this.AjaxService.get({
  171. url: '/seller/productNum',
  172. data,
  173. isLoading: false
  174. })
  175. }
  176. }