api_list.js 912 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import {
  2. ApiCallback
  3. } from "./request.js"
  4. export const goodsList = {
  5. path: '/goods/smart',
  6. method: 'get'
  7. }
  8. /**
  9. * Banner图
  10. *
  11. */
  12. export const getShopBanner = (params) => {
  13. const r = {
  14. path: '/ad/ad/getShopAdByAdL/0/publicshop-banner',
  15. method: 'get'
  16. }
  17. return ApiCallback(r, params)
  18. }
  19. /**
  20. * 商品列表
  21. *
  22. */
  23. export const getGoodsListApi = (params) => {
  24. const r = {
  25. path: '/goods/smart',
  26. method: 'get'
  27. }
  28. return ApiCallback(r, params)
  29. }
  30. // ApiCallback(this.dataVal.Api, {
  31. // page: this.page,
  32. // limit: this.limit
  33. // }).then(res => {
  34. // this.goodsList = this.goodsList.concat(res.list)
  35. // if (this.page >= res.totalPage) {
  36. // this.loadStatus = 'nomore'
  37. // } else {
  38. // this.loadStatus = 'loadmore'
  39. // }
  40. // }).catch(err => {
  41. // if (this.page > 1) {
  42. // this.page--;
  43. // this.loadStatus = 'loadmore'
  44. // } else {
  45. // this.page = 0;
  46. // this.loadStatus = 'nomore'
  47. // }
  48. // })