diff --git a/src/hooks/useListData.ts b/src/hooks/useListData.ts index 8f65833..f35d23b 100644 --- a/src/hooks/useListData.ts +++ b/src/hooks/useListData.ts @@ -67,7 +67,10 @@ export function useListData(options: IUseListDataOptions) { } /** 下拉刷新 */ - onPullDownRefresh(refresh) + onPullDownRefresh(() => { + console.log('下拉刷新', options) + refresh() + }) /** 上拉加载更多 */ onReachBottom(() => { diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 484ec23..0e8ff6f 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -4,6 +4,7 @@ import { queryPostByName, queryPosts } from '@/api/halo-base/post' import { completeUrl } from '@/utils/url' import { timeFrom } from '@/utils/base/timeFrom' import { useListData } from '@/hooks/useListData' +import { randomImageUrl } from '@/utils/randomResources' import type { ListedPostVo, ListedPostVoList, PostV1alpha1PublicApiQueryPostByNameRequest, PostV1alpha1PublicApiQueryPostsRequest, PostVo } from '@halo-dev/api-client' @@ -36,14 +37,12 @@ const banner = reactive({ list: [ { value: exampleImageUrls.banner, - type: 'image', title: 'UNI HALO v3.0', desc: '新全新探索简约的艺术风格', time: timeFrom(new Date()), }, { - value: exampleImageUrls.postCover1, - type: 'image', + value: randomImageUrl.pc, title: 'UNI HALO v3.0 使用手册', desc: 'uni-halo 使用手册,包含安装、配置、使用等信息666666666aaaa啊啊啊啊啊啊啊啊啊啊啊', time: timeFrom(new Date()), @@ -138,7 +137,7 @@ onLoad(() => {