增加录音功能调整页面布局。

This commit is contained in:
zhonghua.li
2026-04-16 09:20:13 +08:00
parent 826d9082ad
commit 8f556e2168
11 changed files with 222 additions and 48 deletions

View File

@@ -21,15 +21,15 @@
<view class="tabs" :style="{ top: computedNavbarTop || navbarTop }">
<view
class="tab-item"
:class="{ active: activeTab === 'service' }"
@click="switchTab('service')">
<text>服务记录</text>
:class="{ active: activeTab === 'customer' }"
@click="switchTab('customer')">
<text>客户列表</text>
</view>
<view
class="tab-item"
:class="{ active: activeTab === 'customer' }"
@click="switchTab('customer')">
<text>客户</text>
:class="{ active: activeTab === 'service' }"
@click="switchTab('service')">
<text>服务记录</text>
</view>
</view>
@@ -518,8 +518,9 @@
return (totalNavbarHeight + 72) + 'rpx'; // tab栏高度72rpx
}
},
onLoad() {
onLoad(options = {}) {
console.log('[FurnitureCustomer][onLoad] 页面加载');
this.applyIncomingTab(options?.tab);
// 更新导航栏位置
this.updateNavbarPosition();
// 加载服务记录列表
@@ -618,6 +619,13 @@
this.playingAudioId = null;
},
methods: {
applyIncomingTab(tab) {
const allowedTabs = ['service', 'customer'];
if (!allowedTabs.includes(tab)) {
return;
}
this.activeTab = tab;
},
// 计算并更新导航栏和内容区域的位置
updateNavbarPosition() {
console.log('[FurnitureCustomer][updateNavbarPosition] 开始更新导航栏位置');