From c847dfb1c43a40c69f5af1cd36542940be54e1d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=8E=AB=E5=94=90=E5=B0=BC?= Date: Fri, 12 Jun 2026 00:12:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E9=A1=B6=E9=83=A8=E5=8A=9F=E8=83=BD=E4=B8=8E=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=A8=AA=E5=B9=85=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 给useListData的下拉刷新添加调试日志 2. 首页横幅替换固定图片为随机资源图,调整渐变背景层级 3. 新增tabbar滚动监听与返回顶部按钮功能 --- src/hooks/useListData.ts | 5 ++++- src/pages/index/index.vue | 7 +++---- src/tabbar/index.vue | 32 +++++++++++++++++++++++++++++--- 3 files changed, 36 insertions(+), 8 deletions(-) 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(() => {