common.service.js 784 B

1234567891011121314151617181920212223242526
  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. GetHomeRecommendInfo (data = {}) {
  19. return this.AjaxService.get({ url:'/home/recommend', data, isLoading: false })
  20. }
  21. /* 获取其他服务信息 */
  22. QueryAfterSale (data = {}) {
  23. return this.AjaxService.get({ url:'/home/afterSale', data, isLoading: false })
  24. }
  25. }