feat: 添加直播间跳转功能,优化观众页面数据展示

This commit is contained in:
2026-03-07 20:12:22 +07:00
parent 537d598906
commit fa5849fb6f
4 changed files with 137 additions and 101 deletions

View File

@@ -59,11 +59,11 @@
/>
</view>
<view class="participant-count">
<text v-if="topNUmber" class="count-text">
{{ Number(topNUmber) > 100 ? '99+' : topNUmber }}
<text v-if="Number(topNUmber) > 0" class="count-text">
{{ Number(topNUmber) > 100 ? '99+' : topNUmber }}1
</text>
<text v-else class="count-text">
{{ audienceList.length }}
{{ audienceNumber }}
</text>
</view>
</view>
@@ -268,6 +268,7 @@
addLiveSeatEventListener,
removeLiveSeatEventListener
} = useLiveSeatState(uni?.$liveID)
console.log("uniliveID",uni?.$liveID)
const { audienceList } = useLiveAudienceState(uni?.$liveID)
const { disconnect, connected, cancelApplication } = useCoGuestState(
uni?.$liveID
@@ -346,6 +347,7 @@
const coGuestSheetItems = ref(['取消连麦申请'])
const coGuestSheetTitle = ref('')
const topNUmber = ref('')
const audienceNumber = computed(()=>audienceList.value.length)
// 监听座位变化:当自身不在 seatList 时,将本地连麦状态重置为 IDLE
watch(