fix(mpuniapp): 移除工作台原生白底导航栏标题与底部常驻悬浮出示名片码按钮,实现全沉浸式极简商务工作台

这个提交包含在:
wikiboss
2026-09-21 16:27:23 +08:00
父节点 43b8536c7f
当前提交 61b89395b6
共有 3 个文件被更改,包括 14 次插入 和 51 次删除

查看文件

@@ -4,6 +4,7 @@
"path": "pages/owner/workplace/index",
"style": {
"navigationBarTitleText": "销售工作台",
"navigationStyle": "custom",
"backgroundColorContent": "#F7F8FA"
}
},

查看文件

@@ -159,15 +159,6 @@
<!-- 底部安全区垫高 -->
<view class="workplace-spacer"></view>
</scroll-view>
<!-- 底部常驻单悬浮主 CTA 栏 (一屏仅1个主按钮) -->
<view class="workplace-cta-bar">
<view class="cta-inner">
<button class="primary-cta-btn" @click="handleOpenQrcode">
<text class="primary-cta-btn-text">{{ t('workplace.primary_cta') }}</text>
</button>
</view>
</view>
</view>
</template>
@@ -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 适配 */

查看文件

@@ -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)');