common.service.js 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /**
  2. * 这是所有模块公用业务逻辑的服务
  3. */
  4. export default class CommonService {
  5. constructor(AjaxService) {
  6. Object.assign(this, { AjaxService })
  7. this.name = 'CommonService'
  8. }
  9. /* 首页导航模块商品列表 */
  10. GetHomeClassify (data = {}) {
  11. return this.AjaxService.get({ url:'/home/classify', data, isLoading: true })
  12. }
  13. /* 首页初始化 */
  14. GetHomeModulesDataInfo (data = {}) {
  15. return this.AjaxService.get({ url:'/home/modules', data, isLoading: false })
  16. }
  17. /* 首页楼层数据 */
  18. GetHomeDataInfo (data = {}) {
  19. return this.AjaxService.get({ url:'/home/data', data, isLoading: false })
  20. }
  21. /* 首页楼层查看更多数据 */
  22. GetHomeFloorContentDetails (data = {}) {
  23. return this.AjaxService.get({ url:'/home/floorContentDetails', data, isLoading: false })
  24. }
  25. /* 二级页楼层查看更多数据 */
  26. GePageFloorContentDetails (data = {}) {
  27. return this.AjaxService.get({ url:'/home/pageFloorDetails', data, isLoading: false })
  28. }
  29. /* 首页顶部三个模块数据 */
  30. GetHomeTopDataInfo (data = {}) {
  31. return this.AjaxService.get({ url:'/home/top/data', data, isLoading: false })
  32. }
  33. /* 获取其他服务信息 */
  34. QueryAfterSale (data = {}) {
  35. return this.AjaxService.get({ url:'/home/afterSale', data, isLoading: false })
  36. }
  37. /* 首页金刚区分类 */
  38. GetHomeInit (data = {}) {
  39. return this.AjaxService.get({ url:'/home/init', data, isLoading: false })
  40. }
  41. /* 首页金刚区二级分类 */
  42. GetHomeSubMenu (data = {}) {
  43. return this.AjaxService.get({ url:'/home/subMenu', data, isLoading: false })
  44. }
  45. /* 首页楼层 */
  46. GetHomeFloorInfo (data = {}) {
  47. return this.AjaxService.get({ url:'/home/floor', data, isLoading: false })
  48. }
  49. /* 直播专题页图片 */
  50. GetHomeLiveAdvertising (data = {}) {
  51. return this.AjaxService.get({ url:'/home/live/advertising', data, isLoading: false })
  52. }
  53. /* 搜索热门关键词 */
  54. GetHomeHotSearchTerms (data = {}) {
  55. return this.AjaxService.get({ url:'/home/hotSearchTerms', data, isLoading: false })
  56. }
  57. /* 二级列表楼层 */
  58. GetInstrumentPageData (data = {}) {
  59. return this.AjaxService.get({ url:'/home/instrumentData', data, isLoading: false })
  60. }
  61. /* 一级分类 */
  62. GetFirstClassly (data = {}) {
  63. return this.AjaxService.get({ url:'/product/classify', data, isLoading: false })
  64. }
  65. /* 根据一级分类获取二、三级分类 */
  66. GetProductChildrenClassly (data = {}) {
  67. return this.AjaxService.get({ url:'/product/bigType/classify', data, isLoading: false })
  68. }
  69. /* 根据一、二、三级分类ID查询单条分类 */
  70. GetProductOneClassly (data = {}) {
  71. return this.AjaxService.get({ url:'/product/typeId/classify', data, isLoading: false })
  72. }
  73. }