From 1c62867cd2c3b46b18aa7e844284173f61f847ba Mon Sep 17 00:00:00 2001 From: tsui110 Date: Sat, 10 Jan 2026 20:19:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=88=E6=94=B9=E4=BA=86=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=8A=96=E9=9F=B3=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/app-tab-bar-toutiao.vue | 20 +++++++------------- pages-user/settings/index.vue | 13 +++++++++++++ pages.json | 5 ++++- pages/index/index.vue | 10 +++++++++- 4 files changed, 33 insertions(+), 15 deletions(-) diff --git a/components/app-tab-bar-toutiao.vue b/components/app-tab-bar-toutiao.vue index ee93c3b..03056c7 100644 --- a/components/app-tab-bar-toutiao.vue +++ b/components/app-tab-bar-toutiao.vue @@ -1,18 +1,13 @@ @@ -21,7 +16,7 @@ export default { data() { return { - selected: 2 // 默认选中"我的" + selected: 0 // 默认选中"盒柜" } }, mounted() { @@ -37,9 +32,8 @@ export default { const currentPage = pages[pages.length - 1] const route = currentPage.route - if (route === 'pages/index/index') this.selected = 0 - else if (route === 'pages/cabinet/index') this.selected = 1 - else if (route === 'pages/mine/index') this.selected = 2 + if (route === 'pages/cabinet/index') this.selected = 0 + else if (route === 'pages/mine/index') this.selected = 1 } }, switchTab(url) { diff --git a/pages-user/settings/index.vue b/pages-user/settings/index.vue index b5e0443..b0fa234 100644 --- a/pages-user/settings/index.vue +++ b/pages-user/settings/index.vue @@ -9,11 +9,13 @@ + 设置 + @@ -106,6 +108,7 @@ export default { } /* 导航栏 */ +/* #ifndef MP-TOUTIAO */ .navbar { position: fixed; top: 0; @@ -131,13 +134,23 @@ export default { font-weight: 800; color: $text-main; } +/* #endif */ /* 设置内容区 */ +/* #ifdef MP-TOUTIAO */ +.settings-content { + padding-top: $spacing-lg; + padding-left: $spacing-lg; + padding-right: $spacing-lg; +} +/* #endif */ +/* #ifndef MP-TOUTIAO */ .settings-content { padding-top: calc(env(safe-area-inset-top) + 88rpx + $spacing-lg); padding-left: $spacing-lg; padding-right: $spacing-lg; } +/* #endif */ /* 退出登录区域 */ .logout-section { diff --git a/pages.json b/pages.json index 15e70c5..368e5fe 100644 --- a/pages.json +++ b/pages.json @@ -159,7 +159,10 @@ "path": "settings/index", "style": { "navigationBarTitleText": "设置", - "navigationStyle": "custom" + "navigationStyle": "custom", + "mp-toutiao": { + "navigationStyle": "default" + } } } ] diff --git a/pages/index/index.vue b/pages/index/index.vue index 6ccb221..900189b 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -204,7 +204,15 @@ export default { } }, onLoad() { - // 检查手机号绑定状态(快速检查本地缓存) + // #ifdef MP-TOUTIAO + // 抖音平台屏蔽首页,自动跳转到盒柜 + uni.switchTab({ + url: '/pages/cabinet/index' + }) + return + // #endif + + // 检查手机号绑定状态(快速检查本地缓存) if (!checkPhoneBoundSync()) return // 延迟 200ms 首次加载,让 Token/Session 有机会就绪