second.service.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // 二手商品
  2. export default class SecondService {
  3. constructor(AjaxService) {
  4. Object.assign(this, { AjaxService })
  5. this.name = 'SecondService'
  6. }
  7. /**
  8. *二手商品列表
  9. *@param 二手商品分类 secondHandType 1二手仪器,2临期产品,3其他 【必传】
  10. *@param 二手仪器分类的类型 instrumentType 1轻光电、2重光电、3耗材配件【不传默认全部】
  11. *@param 搜索关键词 searchKeyword 【选传】
  12. */
  13. SeconHandProductList (data = {}) {
  14. return this.AjaxService.get({
  15. url:'/commodity/second/list',
  16. data,
  17. isLoading: true ,
  18. })
  19. }
  20. /*二手发布/品牌列表 */
  21. brandList (data = {}) {
  22. return this.AjaxService.get({ url:'/commodity/second/brands', data, isLoading: true })
  23. }
  24. /*二手发布/提交发布 */
  25. SecondHandProduct (data = {}) {
  26. return this.AjaxService.post({
  27. url:'/commodity/second/release',
  28. data,
  29. isLoading: true ,
  30. })
  31. }
  32. /*二手发布/浏览量 */
  33. ProductCount (data = {}) {
  34. return this.AjaxService.get({
  35. url:'/product/updateSecondHandProductCount',
  36. data,
  37. isLoading: true ,
  38. })
  39. }
  40. /**
  41. *@二手商品详情
  42. *@param productId:商品ID(数字类型,必传)
  43. */
  44. ProductDetail (data={}){//商品详情
  45. return this.AjaxService.get({
  46. url:'/commodity/second/detail',
  47. data,
  48. isLoading: true ,
  49. })
  50. }
  51. }