common.service.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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({
  12. url:'/home/classify',
  13. data,
  14. isLoading: true ,
  15. })
  16. }
  17. /* 首页初始化 */
  18. GetHomeModulesDataInfo (data = {}) {
  19. return this.AjaxService.get({
  20. url:'/home/modules',
  21. data,
  22. isLoading: false ,
  23. })
  24. }
  25. /* 首页楼层数据 */
  26. GetHomeDataInfo (data = {}) {
  27. return this.AjaxService.get({
  28. url:'/commodity/home/floor',
  29. data,
  30. isLoading: false ,
  31. isHost:true
  32. })
  33. }
  34. /* 首页楼层查看更多数据 */
  35. GetHomeFloorContentDetails (data = {}) {
  36. return this.AjaxService.get({
  37. url:'/home/floorContentDetails',
  38. data,
  39. isLoading: false ,
  40. })
  41. }
  42. /* 二级页楼层查看更多数据 */
  43. GePageFloorContentDetails (data = {}) {
  44. return this.AjaxService.get({
  45. url:'/home/pageFloorDetails',
  46. data,
  47. isLoading: false ,
  48. })
  49. }
  50. /* 首页顶部三个模块数据 */
  51. GetHomeTopDataInfo (data = {}) {
  52. return this.AjaxService.get({
  53. url:'/home/top/data',
  54. data,
  55. isLoading: false ,
  56. })
  57. }
  58. /* 获取其他服务信息 */
  59. QueryAfterSale (data = {}) {
  60. return this.AjaxService.get({
  61. url:'/home/afterSale',
  62. data,
  63. isLoading: false ,
  64. })
  65. }
  66. /* 首页金刚区分类 */
  67. GetHomeInit (data = {}) {
  68. return this.AjaxService.get({
  69. url:'/home/init',
  70. data,
  71. isLoading: false ,
  72. })
  73. }
  74. /* 首页金刚区二级分类 */
  75. GetHomeSubMenu (data = {}) {
  76. return this.AjaxService.get({
  77. url:'/home/subMenu',
  78. data,
  79. isLoading: false ,
  80. })
  81. }
  82. /* 首页楼层 */
  83. GetHomeFloorInfo (data = {}) {
  84. return this.AjaxService.get({
  85. url:'/home/floor',
  86. data,
  87. isLoading: false ,
  88. })
  89. }
  90. /* 直播专题页图片 */
  91. GetHomeLiveAdvertising (data = {}) {
  92. return this.AjaxService.get({
  93. url:'/home/live/advertising',
  94. data,
  95. isLoading: false ,
  96. })
  97. }
  98. /* 搜索热门关键词 */
  99. GetHomeHotSearchTerms (data = {}) {
  100. return this.AjaxService.get({
  101. url:'/home/hotSearchTerms',
  102. data,
  103. isLoading: false ,
  104. })
  105. }
  106. /* 二级列表楼层 */
  107. GetInstrumentPageData (data = {}) {
  108. return this.AjaxService.get({
  109. url:'/commodity/classify/product',
  110. data,
  111. isLoading: false ,
  112. isHost:true
  113. })
  114. }
  115. /* 一级分类 */
  116. GetFirstClassly (data = {}) {
  117. return this.AjaxService.get({
  118. // url:'/product/classify',
  119. url:'/commodity/classify',
  120. data,
  121. isLoading: false ,
  122. isHost:true
  123. })
  124. }
  125. /* 根据一级分类获取二、三级分类 */
  126. GetProductChildrenClassly (data = {}) {
  127. return this.AjaxService.get({
  128. url:'/product/bigType/classify',
  129. data,
  130. isLoading: false ,
  131. })
  132. }
  133. /* 根据一、二、三级分类ID查询单条分类 */
  134. GetProductOneClassly (data = {}) {
  135. return this.AjaxService.get({
  136. url:'/product/typeId/classify',
  137. data,
  138. isLoading: false ,
  139. })
  140. }
  141. }