| | |
| | | export const CarouselApi = { |
| | | // 分页查询轮播图 |
| | | getCarousels: async (page = 0, size = 10, title) => { |
| | | const data = await graphqlRequest(GET_CAROUSELS, { page, size, title }) |
| | | return data.carousels |
| | | const result = await graphqlRequest(GET_CAROUSELS, { page, size, title }) |
| | | return result.data.carousels |
| | | }, |
| | | |
| | | // 根据ID查询轮播图 |
| | | getCarousel: async (id) => { |
| | | const data = await graphqlRequest(GET_CAROUSEL, { id }) |
| | | return data.carousel |
| | | const result = await graphqlRequest(GET_CAROUSEL, { id }) |
| | | return result.data.carousel |
| | | }, |
| | | |
| | | // 获取播放列表 |
| | | getPlayList: async () => { |
| | | const data = await graphqlRequest(GET_CAROUSEL_PLAY_LIST) |
| | | return data.carouselPlayList |
| | | const result = await graphqlRequest(GET_CAROUSEL_PLAY_LIST) |
| | | return result.data.carouselPlayList |
| | | }, |
| | | |
| | | // 保存轮播图 |
| | | saveCarousel: async (carousel) => { |
| | | const data = await graphqlRequest(SAVE_CAROUSEL, { carousel }) |
| | | return data.saveCarousel |
| | | const result = await graphqlRequest(SAVE_CAROUSEL, { carousel }) |
| | | return result.data.saveCarousel |
| | | }, |
| | | |
| | | // 删除轮播图 |