From d335ec290a408891ca7a4387048a924b37360bc9 Mon Sep 17 00:00:00 2001 From: cheng <545895878@qq.com> Date: Wed, 23 Sep 2026 20:56:14 +0800 Subject: [PATCH] =?UTF-8?q?refactor(app):=20=E9=87=8D=E6=9E=84=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E4=B8=BB=E9=A2=98=E5=92=8C=E9=A1=B5=E9=9D=A2=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除动态主题切换功能,改为全局统一深色主题 - 实现自定义TabBar组件替换原生tabBar,解决iOS闪白问题 - 创建main容器页面统一管理三个tab页面的生命周期和状态 - 将所有页面的onShow/onHide等生命周期方法迁移到子组件内部 - 更新页面路径从index改为main,并调整路由跳转逻辑 - 移除theme-mixin和相关主题工具函数 - 统一页面背景色设置,优化用户体验一致性 --- App.vue | 29 ++--- common/theme-mixin.js | 28 ----- common/utils.js | 89 -------------- components/TabBar.vue | 107 +++++++++++++++++ pages.json | 52 +-------- pages/agreement/agreement.vue | 7 +- pages/card/card.vue | 12 +- pages/chat-list/chat-list.vue | 6 +- pages/chat/chat.vue | 4 +- pages/circle-detail/circle-detail.vue | 16 +-- pages/circle-publish/circle-publish.vue | 4 +- pages/circle/circle.vue | 63 +++++----- pages/event-create/event-create.vue | 4 +- pages/event-detail/event-detail.vue | 4 +- pages/friends/friends.vue | 8 +- pages/games/games.vue | 5 +- pages/index/index.vue | 79 +++++++------ pages/login/login.vue | 10 +- pages/main/main.vue | 147 ++++++++++++++++++++++++ pages/onboarding/onboarding.vue | 9 +- pages/profile/profile.vue | 47 ++++---- pages/record/record.vue | 8 +- pages/share-profile/share-profile.vue | 11 +- uni.scss | 7 +- 24 files changed, 399 insertions(+), 357 deletions(-) delete mode 100644 common/theme-mixin.js create mode 100644 components/TabBar.vue create mode 100644 pages/main/main.vue diff --git a/App.vue b/App.vue index 19cfc5e..04e9fea 100644 --- a/App.vue +++ b/App.vue @@ -1,13 +1,18 @@ + + diff --git a/pages.json b/pages.json index 58a1f3a..258a17e 100644 --- a/pages.json +++ b/pages.json @@ -1,17 +1,13 @@ { "pages": [ { - "path": "pages/index/index", + "path": "pages/main/main", "style": { "navigationStyle": "custom", - "navigationBarTitleText": "" - } - }, - { - "path": "pages/profile/profile", - "style": { - "navigationStyle": "custom", - "navigationBarTitleText": "" + "navigationBarTitleText": "", + "backgroundColor": "#0B0B14", + "backgroundColorTop": "#0B0B14", + "backgroundColorBottom": "#0B0B14" } }, { @@ -49,18 +45,6 @@ "navigationBarTitleText": "" } }, - { - "path": "pages/circle/circle", - "style": { - "navigationStyle": "custom", - "navigationBarTitleText": "", - "app-plus": { - "background": "#0B0B14", - "bounceBackground": "#0B0B14", - "animationAlphaBGColor": "#0B0B14" - } - } - }, { "path": "pages/circle-detail/circle-detail", "style": { @@ -139,31 +123,5 @@ "backgroundColorTop": "#0B0B14", "backgroundColorBottom": "#0B0B14" }, - "tabBar": { - "color": "#9494AC", - "selectedColor": "#E8A838", - "backgroundColor": "#151520", - "borderStyle": "black", - "list": [ - { - "pagePath": "pages/index/index", - "text": "首页", - "iconPath": "static/tab-home.png", - "selectedIconPath": "static/tab-home-active.png" - }, - { - "pagePath": "pages/circle/circle", - "text": "酒友圈", - "iconPath": "static/tab-circle.png", - "selectedIconPath": "static/tab-circle-active.png" - }, - { - "pagePath": "pages/profile/profile", - "text": "我的", - "iconPath": "static/tab-profile.png", - "selectedIconPath": "static/tab-profile-active.png" - } - ] - }, "uniIdRouter": {} } diff --git a/pages/agreement/agreement.vue b/pages/agreement/agreement.vue index a22512c..b7d2aeb 100644 --- a/pages/agreement/agreement.vue +++ b/pages/agreement/agreement.vue @@ -1,5 +1,5 @@ + + diff --git a/pages/onboarding/onboarding.vue b/pages/onboarding/onboarding.vue index e61b557..a335436 100644 --- a/pages/onboarding/onboarding.vue +++ b/pages/onboarding/onboarding.vue @@ -1,5 +1,5 @@