common.service.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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:'/commodity/page/floor/details',
  38. data,
  39. isLoading: false ,
  40. isHost:true
  41. })
  42. }
  43. /* 二级页楼层查看更多数据 */
  44. GePageFloorContentDetails (data = {}) {
  45. return this.AjaxService.get({
  46. url:'/commodity/page/floor/centre',
  47. data,
  48. isLoading: false ,
  49. isHost:true
  50. })
  51. }
  52. /* 首页顶部三个模块数据 */
  53. GetHomeTopDataInfo (data = {}) {
  54. return this.AjaxService.get({
  55. url:'/home/top/data',
  56. data,
  57. isLoading: false ,
  58. })
  59. }
  60. /* 获取其他服务信息 */
  61. QueryAfterSale (data = {}) {
  62. return this.AjaxService.get({
  63. url:'/home/afterSale',
  64. data,
  65. isLoading: false ,
  66. })
  67. }
  68. /* 首页金刚区分类 */
  69. GetHomeInit (data = {}) {
  70. return this.AjaxService.get({
  71. url:'/home/init',
  72. data,
  73. isLoading: false ,
  74. })
  75. }
  76. /* 首页金刚区二级分类 */
  77. GetHomeSubMenu (data = {}) {
  78. return this.AjaxService.get({
  79. url:'/home/subMenu',
  80. data,
  81. isLoading: false ,
  82. })
  83. }
  84. /* 首页楼层 */
  85. GetHomeFloorInfo (data = {}) {
  86. return this.AjaxService.get({
  87. url:'/home/floor',
  88. data,
  89. isLoading: false ,
  90. })
  91. }
  92. /* 直播专题页图片 */
  93. GetHomeLiveAdvertising (data = {}) {
  94. return this.AjaxService.get({
  95. url:'/home/live/advertising',
  96. data,
  97. isLoading: false ,
  98. })
  99. }
  100. /* 搜索热门关键词 */
  101. GetHomeHotSearchTerms (data = {}) {
  102. return this.AjaxService.get({
  103. url:'/home/hotSearchTerms',
  104. data,
  105. isLoading: false ,
  106. })
  107. }
  108. /* 二级列表楼层 */
  109. GetInstrumentPageData (data = {}) {
  110. return this.AjaxService.get({
  111. url:'/commodity/classify/product',
  112. data,
  113. isLoading: false ,
  114. isHost:true
  115. })
  116. }
  117. /* 一级分类 */
  118. GetFirstClassly (data = {}) {
  119. return this.AjaxService.get({
  120. url:'/commodity/classify',
  121. data,
  122. isLoading: false ,
  123. isHost:true
  124. })
  125. }
  126. /* 根据一级分类获取二、三级分类 */
  127. GetProductChildrenClassly (data = {}) {
  128. return this.AjaxService.get({
  129. url:'/product/bigType/classify',
  130. data,
  131. isLoading: false ,
  132. })
  133. }
  134. /* 根据一、二、三级分类ID查询单条分类 */
  135. GetProductOneClassly (data = {}) {
  136. return this.AjaxService.get({
  137. url:'/commodity/type/id',
  138. data,
  139. isLoading: false ,
  140. isHost:true
  141. })
  142. }
  143. /*活动页面获取楼层*/
  144. GetActivityFloorData (data = {}) {
  145. return this.AjaxService.get({
  146. url:'/home/activity/data',
  147. data,
  148. isLoading: false ,
  149. })
  150. }
  151. }