sellse.service.js 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. /**
  2. * explain: 这是协销用户业务的服务
  3. * Author: zhjy
  4. * Time: 2020-09-24
  5. */
  6. export default class SellerService {
  7. constructor(AjaxService) {
  8. Object.assign(this, { AjaxService })
  9. this.name = 'SellerService'
  10. }
  11. /**
  12. *@协销登录
  13. *@param mobile 手机号
  14. *@param password 密码
  15. */
  16. SellerLogin (data={}){
  17. return this.AjaxService.post({
  18. url:'/user/login/seller',
  19. data,
  20. isLoading: true ,
  21. })
  22. }
  23. /**
  24. *@协销账户中心
  25. *@param userID 协销ID
  26. */
  27. GetSellerHome (data = {}) {
  28. return this.AjaxService.get({ url:'/user/seller/home', data, isLoading: true })
  29. }
  30. /**
  31. *@协销拉机构上线(资料填写)
  32. *@param userID 协销ID
  33. */
  34. SellerClubTemporary (data={}){
  35. return this.AjaxService.post({
  36. url:'/user/register/club/temporary',
  37. data,
  38. isLoading: true ,
  39. })
  40. }
  41. /**
  42. *@协销拉机构上线
  43. *@param userID 协销ID
  44. */
  45. SellerClubRegister (data={}){
  46. return this.AjaxService.post({
  47. url:'/user/register/club/online',
  48. data,
  49. isLoading: true ,
  50. })
  51. }
  52. /**
  53. *@协销拉机构上线检测手机号和邮箱
  54. *@param mobileOrEmail 手机号和邮箱
  55. */
  56. SellerClubCheck (data={}){
  57. return this.AjaxService.get({
  58. url:'/user/register/check',
  59. data,
  60. isLoading: true,
  61. })
  62. }
  63. /**
  64. *@协销机构列表
  65. *@param name 机构名字关键字(搜索用)
  66. *@param pageNum 页码
  67. *@param pageSize 条数
  68. *@param spId 协销ID
  69. *@param status 机构状态
  70. */
  71. GetSellerClubList (data = {}) {
  72. return this.AjaxService.get({
  73. url:'/user/seller/club/list',
  74. data,
  75. isLoading: true ,
  76. })
  77. }
  78. /**
  79. *@协销机构列表
  80. *@param serviceProviderId 协销ID
  81. *@param pageNum 页码
  82. *@param pageSize 条数
  83. */
  84. GetOrderCount (data = {}) {
  85. return this.AjaxService.get({
  86. url:'/order/seller/count',
  87. data,
  88. isLoading: true ,
  89. })
  90. }
  91. /**
  92. *@协销机构列表
  93. *@param name 机构名字关键字(搜索用)
  94. *@param pageNum 页码
  95. *@param pageSize 条数
  96. */
  97. GetFindAllClubList (data = {}) {
  98. return this.AjaxService.get({
  99. url:'/user/seller/club/all',
  100. data,
  101. isLoading: true ,
  102. })
  103. }
  104. /**
  105. *@协销订单列表(搜索订单)
  106. *@param listType 订单类型
  107. *@param orderNo 订单号
  108. *@param pageNum 页码
  109. *@param pageSize 条数
  110. *@param serviceProviderId 协销ID
  111. */
  112. GetSellerOrderList (data = {}) {
  113. return this.AjaxService.get({
  114. url:'/order/seller/list',
  115. data,
  116. isLoading: true ,
  117. })
  118. }
  119. /**
  120. *@协销下机构订单列表
  121. *@param clubID 机构ID
  122. *@param pageNum 页码
  123. *@param pageSize 条数
  124. */
  125. GetSellerClubOrderList (data = {}) {
  126. return this.AjaxService.get({
  127. url:'/order/seller/list/club',
  128. data,
  129. isLoading: true ,
  130. })
  131. }
  132. /**
  133. *@协销-关键词搜索订单
  134. *@param userId:商品ID(数字类型,必传)
  135. *@param pageNum:机构会所ID(同之前)
  136. *@param pageSize:协销ID(同之前)
  137. */
  138. getSellerOrderList (data={}){
  139. return this.AjaxService.get({
  140. url:'/order/seller/search',
  141. data,
  142. isLoading: true ,
  143. })
  144. }
  145. // 协销订单列表/再来一单
  146. SellerCreateOrderAgain (data = {}) {
  147. return this.AjaxService.post({
  148. url:'/order/seller/cart/again',
  149. data,
  150. isLoading: true ,
  151. })
  152. }
  153. /**
  154. *@协销-二手下单商品列表
  155. *@param 二手商品分类 secondHandType 1二手仪器,2临期产品,3其他 【必传】
  156. *@param 二手仪器分类的类型 instrumentType 1轻光电、2重光电、3耗材配件【不传默认全部】
  157. *@param 搜索关键词 searchKeyword 【选传】
  158. */
  159. GetOrderSecondHandProductList (data = {}) {
  160. return this.AjaxService.get({
  161. url:'/commodity/second/order/products',
  162. data,
  163. isLoading: true ,
  164. })
  165. }
  166. /**
  167. *@协销-二手去结算接口
  168. *@param productId:商品ID(数字类型,必传)
  169. *@param clubId:机构会所ID(同之前)
  170. *@param serviceProviderId:协销ID(同之前)
  171. *@param productCount:二手购买数量
  172. */
  173. GetSettlementBySencondProduct (data = {}) {
  174. return this.AjaxService.get({
  175. url:'/order/seller/second/settlement',
  176. data,
  177. isLoading: true ,
  178. })
  179. }
  180. /**
  181. *@协销-二手商品推荐
  182. *@param productId:商品ID(数字类型,必传)
  183. */
  184. ProductRecommend (data={}){//相关推荐
  185. return this.AjaxService.get({ url:'/commodity/second/recommend', data, isLoading: true })
  186. }
  187. /*协销下单购物车->api*/
  188. /**
  189. *@单一商品加入购物车
  190. *@param clubId 会所的ID
  191. *@param serviceProviderId 协销ID
  192. */
  193. ShoppingCartAddCart (data = {}) {
  194. return this.AjaxService.post({
  195. url:'/order/seller/cart/add',
  196. data,
  197. isLoading: true ,
  198. })
  199. }
  200. /**
  201. *@组合商品加入购物车
  202. *@param clubId 会所的ID
  203. *@param serviceProviderId 协销ID
  204. */
  205. ShoppingCartBatchAddCart (data = {}) {
  206. return this.AjaxService.post({
  207. url:'/order/seller/cart/add',
  208. data,
  209. isLoading: true ,
  210. })
  211. }
  212. /**
  213. *@协销帮机构下单获取购物车数量
  214. *@param clubId 会所的ID
  215. *@param serviceProviderId 协销ID
  216. */
  217. GetSellerProductNum (data = {}) {
  218. return this.AjaxService.get({
  219. url:'/order/seller/cart/count',
  220. data,
  221. isLoading: false ,
  222. })
  223. }
  224. /**
  225. *@协销帮机构下单购物车商品加减数量
  226. *@param clubId 机构的clubId
  227. *@param serviceProviderId 协销ID
  228. */
  229. SellerAddProductNum (data = {}) {
  230. return this.AjaxService.post({
  231. url:'/order/seller/cart/update',
  232. data,
  233. isLoading: true ,
  234. })
  235. }
  236. /**
  237. *@协销帮机构下单购物车删除商品
  238. *@param sellerCartIds 购物车ID
  239. */
  240. DeleteSellerCart (data = {}) {
  241. return this.AjaxService.post({
  242. url:'/order/seller/cart/delete',
  243. data,
  244. isLoading: true ,
  245. })
  246. }
  247. /**
  248. *@协销帮机构下单获取购物车列表
  249. *@param clubId 会所的ID
  250. *@param serviceProviderId 协销ID
  251. */
  252. GetSellerShoppingInfo (data = {}) {
  253. return this.AjaxService.get({
  254. url:'/order/seller/cart/list',
  255. data,
  256. isLoading: false ,
  257. })
  258. }
  259. /*协销下单订单->api*/
  260. /**
  261. *@协销帮机构下单去结算初始化
  262. *@param clubId 机构ID
  263. *@param serviceProviderId 协销ID
  264. *@param productIds 商品ID
  265. */
  266. SellerSettlement (data = {}) {
  267. return this.AjaxService.get({
  268. url:'/order/seller/cart/settlement',
  269. data,
  270. isLoading: true ,
  271. })
  272. }
  273. /**
  274. *@协销下定金商品订单初始化
  275. *@param productIds 商品ID
  276. */
  277. SellerProductRechargeGoods (data = {}) {
  278. return this.AjaxService.get({
  279. url:'/commodity/recharge/details',
  280. data,
  281. isLoading: true ,
  282. })
  283. }
  284. /**
  285. *@协销帮机构下定金商品订单提交
  286. *@param productIds 商品ID
  287. */
  288. SellerSubmitRechargeOrder (data = {}) {
  289. return this.AjaxService.post({
  290. url:'/order/submit/recharge',
  291. data,
  292. isLoading: true,
  293. })
  294. }
  295. /**
  296. *@协销帮机构下单提交订单
  297. */
  298. SellerCreateOrderSubmit (data = {}) {
  299. return this.AjaxService.post({
  300. url:'/order/submit/generate',
  301. data,
  302. isLoading: true ,
  303. })
  304. }
  305. // 协销购物车清空失效列表
  306. SellerCartdelete (data = {}) {
  307. return this.AjaxService.post({ url:'/seller/deleteSellerCart', data, isLoading: true })
  308. }
  309. }