home.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import http from '../utils/http'
  2. const HomeApi = {
  3. async GetHomeCategory() {
  4. return http.get('/api/services/wxapp/Index/GetHomeCategory') as Promise<
  5. IRestResult<WxAlbumCategoryItemDto[]>
  6. >
  7. },
  8. async GetHomeCarousel() {
  9. return http.get('/api/services/wxapp/Index/GetHomeCarousel') as Promise<
  10. IRestResult<WxCarouselListItemDto[]>
  11. >
  12. },
  13. async GetHomeDetail() {
  14. return http.get('/api/services/wxapp/Index/GetHomeDetail') as Promise<
  15. IRestResult<WxAlbumCategoryDetailItemDto[]>
  16. >
  17. },
  18. async GetHomeDisplay() {
  19. return http.get('/api/services/wxapp/Index/GetHomeDisplay') as Promise<
  20. IRestResult<WxDisplayListItemDto[]>
  21. >
  22. },
  23. async GetHomeAlbum() {
  24. return http.get('/api/services/wxapp/Index/GetHomeAlbum') as Promise<
  25. IRestResult<WxDisplayListItemDto[]>
  26. >
  27. },
  28. async GetHomeActive() {
  29. return http.get('/api/services/wxapp/Index/GetHomeActive') as Promise<
  30. IRestResult<WxDisplayListItemDto[]>
  31. >
  32. },
  33. async GetActiveDetail(input: { id: number | string }) {
  34. return http.get('/api/services/wxapp/Index/GetActiveDetail', input) as Promise<
  35. IRestResult<{
  36. name: string
  37. items: {
  38. name: string
  39. image: string
  40. children: string[]
  41. }[]
  42. }>
  43. >
  44. },
  45. async GetAlbumDetail(input: { id: number | string }) {
  46. return http.get('/api/services/wxapp/Index/GetAlbumDetail', input) as Promise<
  47. IRestResult<{
  48. name: string
  49. items: {
  50. name: string
  51. image: string
  52. children: string[]
  53. }[]
  54. }>
  55. >
  56. },
  57. }
  58. export default HomeApi