common.service.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. /**
  2. * 这是所有模块公用业务逻辑的服务
  3. */
  4. export default class CommonService {
  5. constructor(AjaxService) {
  6. Object.assign(this, { AjaxService })
  7. this.name = 'CommonService'
  8. }
  9. /* 首页初始化 */
  10. mallOrganizeHome(data = {}) {
  11. return this.AjaxService.get({
  12. url: '/commodity/MallOrganize/mall/init',
  13. data,
  14. isLoading: false,
  15. })
  16. }
  17. /* 楼层商品 floorId 楼层Id*/
  18. mallOrganizeProducts(data = {}) {
  19. return this.AjaxService.get({
  20. url: '/commodity/MallOrganize/mall/organizeProducts',
  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. })
  32. }
  33. /* 首页楼层查看更多数据 */
  34. GetHomeFloorContentDetails(data = {}) {
  35. return this.AjaxService.get({
  36. url: '/commodity/page/floor/details',
  37. data,
  38. isLoading: false,
  39. })
  40. }
  41. /* 二级页楼层查看更多数据 */
  42. GePageFloorContentDetails(data = {}) {
  43. return this.AjaxService.get({
  44. url: '/commodity/page/floor/centre',
  45. data,
  46. isLoading: false,
  47. })
  48. }
  49. /* 首页顶部三个模块数据 */
  50. GetHomeTopDataInfo(data = {}) {
  51. return this.AjaxService.get({
  52. url: '/commodity/home/sidebar',
  53. data,
  54. isLoading: false,
  55. })
  56. }
  57. /* 获取其他服务信息 */
  58. QueryAfterSale(data = {}) {
  59. return this.AjaxService.get({
  60. url: '/commodity/home/sale/tips',
  61. data,
  62. isLoading: false,
  63. })
  64. }
  65. /* 首页金刚区分类 */
  66. // GetHomeInit (data = {}) {
  67. // return this.AjaxService.get({
  68. // url:'/home/init',
  69. // data,
  70. // isLoading: false ,
  71. // })
  72. // }
  73. GetHomeInit(data = {}) {
  74. return this.AjaxService.get({
  75. url: '/commodity/home/init',
  76. data,
  77. isLoading: false,
  78. })
  79. }
  80. /* 首页金刚区二级分类 */
  81. GetHomeSubMenu(data = {}) {
  82. return this.AjaxService.get({
  83. url: '/home/subMenu',
  84. data,
  85. isLoading: false,
  86. })
  87. }
  88. /* 首页楼层 */
  89. GetHomeFloorInfo(data = {}) {
  90. return this.AjaxService.get({
  91. url: '/home/floor',
  92. data,
  93. isLoading: false,
  94. })
  95. }
  96. /* 直播专题页图片 */
  97. GetHomeLiveAdvertising(data = {}) {
  98. return this.AjaxService.get({
  99. url: '/commodity/home/sidebar',
  100. data,
  101. isLoading: false,
  102. })
  103. }
  104. /* 搜索热门关键词 */
  105. GetHomeHotSearchTerms(data = {}) {
  106. return this.AjaxService.get({
  107. url: '/commodity/search/query/hot/keyword',
  108. data,
  109. isLoading: false,
  110. })
  111. }
  112. /* 二级列表楼层 */
  113. GetInstrumentPageData(data = {}) {
  114. return this.AjaxService.get({
  115. url: '/commodity/classify/product',
  116. data,
  117. isLoading: false,
  118. })
  119. }
  120. /* 一级分类 */
  121. GetFirstClassly(data = {}) {
  122. return this.AjaxService.get({
  123. url: '/commodity/classify',
  124. data,
  125. isLoading: false,
  126. })
  127. }
  128. /* 根据一级分类获取二、三级分类 */
  129. GetProductChildrenClassly(data = {}) {
  130. return this.AjaxService.get({
  131. url: '/product/bigType/classify',
  132. data,
  133. isLoading: false,
  134. })
  135. }
  136. /* 根据一、二、三级分类ID查询单条分类 */
  137. GetProductOneClassly(data = {}) {
  138. return this.AjaxService.get({
  139. url: '/commodity/type/id',
  140. data,
  141. isLoading: false,
  142. })
  143. }
  144. /*活动页面获取楼层*/
  145. GetActivityFloorData(data = {}) {
  146. return this.AjaxService.get({
  147. url: '/commodity/page/beauty',
  148. data,
  149. isLoading: false,
  150. })
  151. }
  152. /*采美公告列表*/
  153. GetNewsList(data = {}) {
  154. return this.AjaxService.get({
  155. url: '/commodity/home/title',
  156. data,
  157. isLoading: true,
  158. })
  159. }
  160. /*采美公告详情 Id */
  161. GetNewsCapacity(data = {}) {
  162. return this.AjaxService.get({
  163. url: '/commodity/home/capacity',
  164. data,
  165. isLoading: true,
  166. })
  167. }
  168. /* 新品橱窗推荐商品 */
  169. GetHomeRecommend(data = {}) {
  170. return this.AjaxService.get({
  171. url: '/commodity/home/recommend',
  172. data,
  173. isLoading: true,
  174. })
  175. }
  176. /* 新品橱窗商品列表 */
  177. GetHomeNewFloorList(data = {}) {
  178. return this.AjaxService.get({
  179. url: '/commodity/home/NewFloorList',
  180. data,
  181. isLoading: false,
  182. })
  183. }
  184. /* 获取新品橱窗商品品牌列表 */
  185. GetHomeNewBrandNames(data = {}) {
  186. return this.AjaxService.get({
  187. url: '/commodity/home/BrandName',
  188. data,
  189. isLoading: false,
  190. })
  191. }
  192. /* 获取自由页数据 */
  193. GetPageFree(data = {}) {
  194. return this.AjaxService.get({
  195. url: '/commodity/home/free',
  196. data,
  197. isLoading: true,
  198. })
  199. }
  200. }