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. isHost:true
  19. })
  20. }
  21. /*二手发布/品牌列表 */
  22. brandList (data = {}) {
  23. return this.AjaxService.get({ url:'/product/brandList', data, isLoading: true })
  24. }
  25. /*二手发布/提交发布 */
  26. SecondHandProduct (data = {}) {
  27. return this.AjaxService.post({
  28. url:'/commodity/second/release',
  29. data,
  30. isLoading: true ,
  31. isHost:true
  32. })
  33. }
  34. /*二手发布/浏览量 */
  35. ProductCount (data = {}) {
  36. return this.AjaxService.get({
  37. url:'/product/updateSecondHandProductCount',
  38. data,
  39. isLoading: true ,
  40. })
  41. }
  42. /**
  43. *@二手商品详情
  44. *@param productId:商品ID(数字类型,必传)
  45. */
  46. ProductDetail (data={}){//商品详情
  47. return this.AjaxService.get({
  48. url:'/commodity/second/detail',
  49. data,
  50. isLoading: true ,
  51. isHost:true
  52. })
  53. }
  54. }