common.service.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. GetHomeTopDataInfo (data = {}) {
  27. return this.AjaxService.get({ url:'/home/top/data', data, isLoading: false })
  28. }
  29. /* 获取其他服务信息 */
  30. QueryAfterSale (data = {}) {
  31. return this.AjaxService.get({ url:'/home/afterSale', data, isLoading: false })
  32. }
  33. /* 首页金刚区分类 */
  34. GetHomeInit (data = {}) {
  35. return this.AjaxService.get({ url:'/home/init', data, isLoading: false })
  36. }
  37. /* 首页金刚区二级分类 */
  38. GetHomeSubMenu (data = {}) {
  39. return this.AjaxService.get({ url:'/home/subMenu', data, isLoading: false })
  40. }
  41. /* 首页楼层 */
  42. GetHomeFloorInfo (data = {}) {
  43. return this.AjaxService.get({ url:'/home/floor', data, isLoading: false })
  44. }
  45. /* 一级分类 */
  46. GetFirstClassly (data = {}) {
  47. return this.AjaxService.get({ url:'/product/classify', data, isLoading: false })
  48. }
  49. /* 根据一级分类获取二、三级分类 */
  50. GetProductChildrenClassly (data = {}) {
  51. return this.AjaxService.get({ url:'/product/bigType/classify', data, isLoading: false })
  52. }
  53. }