second.service.js 1.6 KB

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