flat:语音功能优化

This commit is contained in:
史典卓
2025-07-22 15:20:21 +08:00
parent ea04387b58
commit 58c36c01a0
11 changed files with 229 additions and 479 deletions

View File

@@ -46,18 +46,22 @@ export const useReadMsg = defineStore('readMsg', () => {
// 设置 TabBar 角标
function updateTabBarBadge() {
const count = unreadCount.value
const index = 3
const countVal = count > 99 ? '99+' : String(count)
if (count === 0) {
uni.removeTabBarBadge({
index: 3
index
}) // 替换为你消息页面的 TabBar index
} else {
const val = count > 99 ? '99+' : String(count)
badges.value[index] = {
count: val
count: 0
}
} else {
badges.value[index] = {
count: countVal
}
uni.setTabBarBadge({
index: 3,
text: val
index,
text: countVal
})
}
}