sellse.service.js 7.1 KB

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