common.service.js 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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: '/commodity/home/init',
  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. * @首页专区详情
  43. * @param: Int zoneId 专区ID
  44. * @param: Int userId 用户ID
  45. * @param: Int typeSort 分类类型 1产品,2仪器,3耗材配件
  46. * @param: Int source 来源 1 WWW 2小程序
  47. * @param: Int pageNum 页码
  48. * @param: Int pageSize 条数
  49. */
  50. getZoneSecond(data = {}) {
  51. return this.AjaxService.get({
  52. url: '/commodity/zone/second',
  53. data,
  54. isLoading: true,
  55. })
  56. }
  57. /* 二级页楼层查看更多数据 */
  58. GePageFloorContentDetails(data = {}) {
  59. return this.AjaxService.get({
  60. url: '/commodity/page/floor/centre',
  61. data,
  62. isLoading: false,
  63. })
  64. }
  65. /* 首页顶部三个模块数据 */
  66. GetHomeTopDataInfo(data = {}) {
  67. return this.AjaxService.get({
  68. url: '/commodity/home/sidebar',
  69. data,
  70. isLoading: false,
  71. })
  72. }
  73. /* 获取其他服务信息 */
  74. QueryAfterSale(data = {}) {
  75. return this.AjaxService.get({
  76. url: '/commodity/home/sale/tips',
  77. data,
  78. isLoading: false,
  79. })
  80. }
  81. /* 首页金刚区分类 */
  82. // GetHomeInit (data = {}) {
  83. // return this.AjaxService.get({
  84. // url:'/home/init',
  85. // data,
  86. // isLoading: false ,
  87. // })
  88. // }
  89. GetHomeInit(data = {}) {
  90. return this.AjaxService.get({
  91. url: '/commodity/home/init',
  92. data,
  93. isLoading: false,
  94. })
  95. }
  96. /* 首页金刚区二级分类 */
  97. GetHomeSubMenu(data = {}) {
  98. return this.AjaxService.get({
  99. url: '/home/subMenu',
  100. data,
  101. isLoading: false,
  102. })
  103. }
  104. /* 首页楼层 */
  105. GetHomeFloorInfo(data = {}) {
  106. return this.AjaxService.get({
  107. url: '/home/floor',
  108. data,
  109. isLoading: false,
  110. })
  111. }
  112. /* 直播专题页图片 */
  113. GetHomeLiveAdvertising(data = {}) {
  114. return this.AjaxService.get({
  115. url: '/commodity/home/sidebar',
  116. data,
  117. isLoading: false,
  118. })
  119. }
  120. /* 搜索热门关键词 */
  121. GetHomeHotSearchTerms(data = {}) {
  122. return this.AjaxService.get({
  123. url: '/commodity/search/query/hot/keyword',
  124. data,
  125. isLoading: false,
  126. })
  127. }
  128. /* 二级列表楼层 */
  129. GetInstrumentPageData(data = {}) {
  130. return this.AjaxService.get({
  131. url: '/commodity/classify/product',
  132. data,
  133. isLoading: false,
  134. })
  135. }
  136. /* 一级分类 */
  137. GetFirstClassly(data = {}) {
  138. return this.AjaxService.get({
  139. url: '/commodity/classify',
  140. data,
  141. isLoading: false,
  142. })
  143. }
  144. /* 根据一级分类获取二、三级分类 */
  145. GetProductChildrenClassly(data = {}) {
  146. return this.AjaxService.get({
  147. url: '/product/bigType/classify',
  148. data,
  149. isLoading: false,
  150. })
  151. }
  152. /* 根据一、二、三级分类ID查询单条分类 */
  153. GetProductOneClassly(data = {}) {
  154. return this.AjaxService.get({
  155. url: '/commodity/type/id',
  156. data,
  157. isLoading: false,
  158. })
  159. }
  160. /*活动页面获取楼层*/
  161. GetActivityFloorData(data = {}) {
  162. return this.AjaxService.get({
  163. url: '/commodity/page/beauty',
  164. data,
  165. isLoading: false,
  166. })
  167. }
  168. /*采美公告列表*/
  169. GetNewsList(data = {}) {
  170. return this.AjaxService.get({
  171. url: '/commodity/home/title',
  172. data,
  173. isLoading: true,
  174. })
  175. }
  176. /*采美公告详情 Id */
  177. GetNewsCapacity(data = {}) {
  178. return this.AjaxService.get({
  179. url: '/commodity/home/capacity',
  180. data,
  181. isLoading: true,
  182. })
  183. }
  184. /* 新品橱窗推荐商品 */
  185. GetHomeRecommend(data = {}) {
  186. return this.AjaxService.get({
  187. url: '/commodity/home/recommend',
  188. data,
  189. isLoading: true,
  190. })
  191. }
  192. /* 新品橱窗商品列表 */
  193. GetHomeNewFloorList(data = {}) {
  194. return this.AjaxService.get({
  195. url: '/commodity/home/NewFloorList',
  196. data,
  197. isLoading: false,
  198. })
  199. }
  200. /* 获取新品橱窗商品品牌列表 */
  201. GetHomeNewBrandNames(data = {}) {
  202. return this.AjaxService.get({
  203. url: '/commodity/home/BrandName',
  204. data,
  205. isLoading: false,
  206. })
  207. }
  208. /* 获取自由页数据 */
  209. GetPageFree(data = {}) {
  210. return this.AjaxService.get({
  211. url: '/commodity/home/free',
  212. data,
  213. isLoading: true,
  214. })
  215. }
  216. }