home.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 GetHomeCategoryDeep() {
  9. return http.get('/api/services/wxapp/Index/GetHomeCategoryDeep') as Promise<
  10. IRestResult<WxAlbumCategoryItemDto[]>
  11. >
  12. },
  13. async GetHomeThemeDeep() {
  14. return http.get('/api/services/wxapp/Index/GetHomeThemeDeep') as Promise<
  15. IRestResult<WxAlbumCategoryItemDto[]>
  16. >
  17. },
  18. async GetHomeCarousel() {
  19. return http.get('/api/services/wxapp/Index/GetHomeCarousel') as Promise<
  20. IRestResult<WxCarouselListItemDto[]>
  21. >
  22. },
  23. async GetHomeDetail() {
  24. return http.get('/api/services/wxapp/Index/GetHomeDetail') as Promise<
  25. IRestResult<WxAlbumCategoryDetailItemDto[]>
  26. >
  27. },
  28. async GetHomeDisplay() {
  29. return http.get('/api/services/wxapp/Index/GetHomeDisplay') as Promise<
  30. IRestResult<WxDisplayListItemDto[]>
  31. >
  32. },
  33. async GetHomeActive() {
  34. return http.get('/api/services/wxapp/Index/GetHomeActive') as Promise<
  35. IRestResult<WxDisplayListItemDto[]>
  36. >
  37. },
  38. async GetHomeAlbum() {
  39. return http.get('/api/services/wxapp/Index/GetHomeAlbum') as Promise<
  40. IRestResult<WxDisplayListItemDto[]>
  41. >
  42. },
  43. async GetExtraDetail() {
  44. return http.get('/api/services/wxapp/Index/GetExtraDetail') as Promise<
  45. IRestResult<WxDisplayListItemDto[]>
  46. >
  47. },
  48. async GetActiveDetail(input: { id: number | string }) {
  49. return http.get('/api/services/wxapp/Index/GetActiveDetail', input) as Promise<
  50. IRestResult<{
  51. name: string
  52. items: {
  53. name: string
  54. image: string
  55. children: string[]
  56. }[]
  57. }>
  58. >
  59. },
  60. async GetAlbumCate(input: { id: number | string }) {
  61. return http.get('/api/services/wxapp/Index/GetAlbumCate', input) as Promise<
  62. IRestResult<{
  63. name: string
  64. items: {
  65. name: string
  66. image: string
  67. children: string[]
  68. }[]
  69. }>
  70. >
  71. },
  72. async GetExtraItemDetail(input: { id: number | string }) {
  73. return http.get('/api/services/wxapp/Index/GetActiveExtraDetail', input) as Promise<
  74. IRestResult<{
  75. title: string
  76. albums: {
  77. title: string
  78. acname: string
  79. acid: number
  80. }[]
  81. }>
  82. >
  83. },
  84. }
  85. export default HomeApi