diff --git a/src/api/carousal.ts b/src/api/carousal.ts index c2e71ca..e052cad 100644 --- a/src/api/carousal.ts +++ b/src/api/carousal.ts @@ -11,6 +11,12 @@ function getTypeList() { function getArticleList(data: ArticleParams) { return httpClient.get>('/articles', data) } +function getSearchRecords() { + return httpClient.get('/articles/search-records') +} +function getSearchRecommends() { + return httpClient.get('/articles/active-search-recommends') +} export default { getCarousalList, getTypeList, diff --git a/src/pages/pet-manual/components/CardList.vue b/src/pages/pet-manual/components/CardList.vue index b848608..76603a0 100644 --- a/src/pages/pet-manual/components/CardList.vue +++ b/src/pages/pet-manual/components/CardList.vue @@ -18,8 +18,10 @@ const props = withDefaults(defineProps<{ total: 0, }, }) - const emit = defineEmits(['loadMore']) +const loadMoreStatus = computed(() => { + return props.pagination.size > props.pagination.total ? 'nomore' : 'more' +}) const contentText = ref({ contentdown: '查看更多', contentrefresh: '加载中', @@ -27,6 +29,9 @@ const contentText = ref({ }) function handleLoadMore() { + if (props.pagination.size > props.pagination.total) { + return + } emit('loadMore') } @@ -50,7 +55,7 @@ function handleLoadMore() { - +