From 61b89395b676f20378038f0d0d7aa83d00616a1c Mon Sep 17 00:00:00 2001 From: wikiboss Date: Mon, 21 Sep 2026 16:27:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(mpuniapp):=20=E7=A7=BB=E9=99=A4=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E5=8F=B0=E5=8E=9F=E7=94=9F=E7=99=BD=E5=BA=95=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E6=A0=8F=E6=A0=87=E9=A2=98=E4=B8=8E=E5=BA=95=E9=83=A8?= =?UTF-8?q?=E5=B8=B8=E9=A9=BB=E6=82=AC=E6=B5=AE=E5=87=BA=E7=A4=BA=E5=90=8D?= =?UTF-8?q?=E7=89=87=E7=A0=81=E6=8C=89=E9=92=AE=EF=BC=8C=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=E5=85=A8=E6=B2=89=E6=B5=B8=E5=BC=8F=E6=9E=81=E7=AE=80=E5=95=86?= =?UTF-8?q?=E5=8A=A1=E5=B7=A5=E4=BD=9C=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mpuniapp/pages.json | 1 + mpuniapp/pages/owner/workplace/index.uvue | 52 +++-------------------- mpuniapp/tests/workplace.test.ts | 12 ++++-- 3 files changed, 14 insertions(+), 51 deletions(-) diff --git a/mpuniapp/pages.json b/mpuniapp/pages.json index 38543c6..f80f8db 100644 --- a/mpuniapp/pages.json +++ b/mpuniapp/pages.json @@ -4,6 +4,7 @@ "path": "pages/owner/workplace/index", "style": { "navigationBarTitleText": "销售工作台", + "navigationStyle": "custom", "backgroundColorContent": "#F7F8FA" } }, diff --git a/mpuniapp/pages/owner/workplace/index.uvue b/mpuniapp/pages/owner/workplace/index.uvue index d738dc0..c378f06 100644 --- a/mpuniapp/pages/owner/workplace/index.uvue +++ b/mpuniapp/pages/owner/workplace/index.uvue @@ -159,15 +159,6 @@ - - - - - - - @@ -308,17 +299,19 @@ onMounted(() => { pointer-events: none; } -/* 顶栏 */ +/* 顶栏 (适配沉浸式顶部安全区) */ .workplace-topbar { display: flex; flex-direction: row; justify-content: space-between; align-items: center; - height: 48px; + height: calc(48px + env(safe-area-inset-top, 0px)); + padding-top: env(safe-area-inset-top, 0px); padding-inline: 16px; background-color: var(--surface, #FFFFFF); border-bottom: 1px solid var(--border, #E3E7ED); z-index: 10; + box-sizing: border-box; } .workplace-identity { @@ -776,42 +769,7 @@ onMounted(() => { } .workplace-spacer { - height: calc(88px + var(--window-bottom, 0px) + env(safe-area-inset-bottom, 0px)); -} - -/* 底部常驻悬浮主 CTA 栏 (一屏仅1个主按钮) */ -.workplace-cta-bar { - position: fixed; - left: 0; - right: 0; - bottom: var(--window-bottom, 0px); - padding: 12px 16px; - padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); - background-color: rgba(255, 255, 255, 0.95); - backdrop-filter: blur(8px); - border-top: 1px solid var(--border, #E3E7ED); - z-index: 100; -} - -.cta-inner { - width: 100%; -} - -.primary-cta-btn { - height: 48px; - width: 100%; - border-radius: 12px; - background-color: var(--primary, #0B5CFF); - display: flex; - justify-content: center; - align-items: center; - box-shadow: 0 8px 20px rgba(11, 92, 255, 0.22); -} - -.primary-cta-btn-text { - font-size: 16px; - font-weight: 600; - color: #FFFFFF; + height: calc(16px + var(--window-bottom, 0px) + env(safe-area-inset-bottom, 0px)); } /* RTL 适配 */ diff --git a/mpuniapp/tests/workplace.test.ts b/mpuniapp/tests/workplace.test.ts index b392f5f..752d631 100644 --- a/mpuniapp/tests/workplace.test.ts +++ b/mpuniapp/tests/workplace.test.ts @@ -34,8 +34,9 @@ test('1. pages.json 必须规范配置 5 栏纯正 TabBar (工作台、名片、 assert.equal(tabBarList[4].pagePath, 'pages/owner/profile/index', 'TabBar 第 5 项必须是我的'); assert.equal(tabBarList[4].text, '我的'); - // 验证 pages[0] 首屏页面为工作台首页 + // 验证 pages[0] 首屏页面为工作台首页且为沉浸式导航 assert.equal(config.pages[0].path, 'pages/owner/workplace/index', '应用首屏 pages[0] 应设为工作台'); + assert.equal(config.pages[0].style?.navigationStyle, 'custom', '工作台页面应采用沉浸式 custom 导航,消除原生白底标题栏'); }); test('2. 核心契约与接口复用审查 (fetchWorkplaceOverview 与 WorkplaceOverviewResult)', () => { @@ -58,7 +59,7 @@ test('3. 工作台状态机 useWorkplace.uts 逻辑完整性审查', () => { assert.ok(content.includes('resolveWorkplaceText'), '必须提供国际化文案解析 resolveWorkplaceText'); }); -test('4. 工作台视图 index.uvue 结构与规范审查 (Bento Grid 模组、零 Emoji、安全区避让、单悬浮主 CTA)', () => { +test('4. 工作台视图 index.uvue 结构与规范审查 (Bento Grid 模组、零 Emoji、安全区避让、沉浸式且无遮挡悬浮按钮)', () => { assert.ok(fs.existsSync(workplaceUvuePath), '必须存在 workplace/index.uvue 视图文件'); const content = fs.readFileSync(workplaceUvuePath, 'utf-8'); @@ -66,12 +67,15 @@ test('4. 工作台视图 index.uvue 结构与规范审查 (Bento Grid 模组、 const emojiRegex = /[\u{1F300}-\u{1F9FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/u; assert.equal(emojiRegex.test(content), false, 'workplace/index.uvue 严禁含有 Emoji'); - // 必须包含核心 Bento 模组与主 CTA + // 必须包含核心 Bento 模组与沉浸式顶栏 + assert.ok(content.includes('workplace-topbar'), '必须包含沉浸式工作台顶栏'); assert.ok(content.includes('quick-showcase-section'), '必须包含闪电出示微展台模组'); assert.ok(content.includes('kpi-grid-section'), '必须包含 2x2 Bento 战情报表模组'); assert.ok(content.includes('radar-pulse-section'), '必须包含实时雷达高光模组'); assert.ok(content.includes('leads-todo-section'), '必须包含今日待办商机模组'); - assert.ok(content.includes('workplace-cta-bar'), '必须包含常驻底部悬浮主 CTA 栏'); + + // 移除底部遮挡内容的悬浮主 CTA 栏 (一屏单主操作由微展台承载,名片Tab独立) + assert.equal(content.includes('workplace-cta-bar'), false, '严禁包含遮挡内容的常驻底部悬浮主 CTA 栏'); // 必须避让安全区与 window-bottom assert.ok(content.includes('safe-area-inset-bottom'), '必须适配 env(safe-area-inset-bottom)');