From d0dd7d7a46bb69ca82fdd21c9e4fa94c2c430183 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, 4 Sep 2026 03:36:21 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=8A=A0=E8=BD=BD=E7=8A=B6=E6=80=81=E4=B8=8E=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=A0=B7=E5=BC=8F=EF=BC=8C=E7=BB=9F=E4=B8=80=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=8A=A0=E8=BD=BD=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 新增通用sleep工具函数 2. 统一使用uh-data-loading组件处理加载/错误状态 3. 优化回到顶部按钮z-index与分类页面加载延迟 4. 重构关于页导航图标样式,优化视觉效果 5. 格式化代码缩进与排版 --- .../uh-scroll-top/uh-scroll-top.vue | 2 +- src/pages/tabbar/about/about.vue | 609 +++++++++--------- src/pages/tabbar/category/category.vue | 3 + src/pages/tabbar/gallery/gallery.vue | 452 ++++++------- src/pages/tabbar/home/home.vue | 392 +++++------ src/pages/tabbar/moments/moments.vue | 9 +- src/utils/common.ts | 3 + 7 files changed, 745 insertions(+), 725 deletions(-) create mode 100644 src/utils/common.ts diff --git a/src/components/uh-scroll-top/uh-scroll-top.vue b/src/components/uh-scroll-top/uh-scroll-top.vue index 8306e6c..a006f65 100644 --- a/src/components/uh-scroll-top/uh-scroll-top.vue +++ b/src/components/uh-scroll-top/uh-scroll-top.vue @@ -15,7 +15,7 @@ diff --git a/src/pages/tabbar/category/category.vue b/src/pages/tabbar/category/category.vue index 78639b2..8c85ccf 100644 --- a/src/pages/tabbar/category/category.vue +++ b/src/pages/tabbar/category/category.vue @@ -4,6 +4,7 @@ import { onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app' import { getCategoryList } from '@/api/halo' import { useAppConfigStore } from '@/store/appConfig' import { checkThumbnailUrl } from '@/utils/url' +import { sleep } from '@/utils/common' import { t } from '@/locale' import { DataLoadingStatusEnum, useDataLoadingStatus } from '@/hooks/useDataLoadingStatus' import type { ICategory } from '@/api/types/halo' @@ -50,6 +51,8 @@ function handleInitPage() { /* ---------------- 数据加载 ---------------- */ async function handleGetData() { updateLoadingStatus(DataLoadingStatusEnum.Loading) + // 增加延迟,提升用户体验 + await sleep(800) // 审核模式 if (calcAuditModeEnabled.value) { const auditCategoryNames = appConfigStore.auditData.spec?.categories || [] diff --git a/src/pages/tabbar/gallery/gallery.vue b/src/pages/tabbar/gallery/gallery.vue index f0f41bb..d53b73a 100644 --- a/src/pages/tabbar/gallery/gallery.vue +++ b/src/pages/tabbar/gallery/gallery.vue @@ -1,250 +1,250 @@ + + diff --git a/src/pages/tabbar/home/home.vue b/src/pages/tabbar/home/home.vue index 25dcdd7..b26f8f5 100644 --- a/src/pages/tabbar/home/home.vue +++ b/src/pages/tabbar/home/home.vue @@ -1,227 +1,227 @@ \ No newline at end of file + + + 最新内容 + + + + + + + + + + + + {{ loadMoreText }} + + + + + + + + + diff --git a/src/pages/tabbar/moments/moments.vue b/src/pages/tabbar/moments/moments.vue index e4e6a98..1e5e0a4 100644 --- a/src/pages/tabbar/moments/moments.vue +++ b/src/pages/tabbar/moments/moments.vue @@ -278,14 +278,9 @@