feat: 添加结束活动和直播记录详情功能,优化直播页面跳转
This commit is contained in:
@@ -32,7 +32,8 @@
|
||||
import { useAuthUser } from '../../../composables/useAuthUser'
|
||||
import {
|
||||
getLiveActivityDetail,
|
||||
getLiveActivityRecord
|
||||
getLiveActivityRecord,
|
||||
getLIveRecordDetailByRoomId
|
||||
} from '../../../api/tui-kit'
|
||||
import { LIVE_BUSINESS } from '@/constants/live-keys'
|
||||
|
||||
@@ -71,6 +72,7 @@
|
||||
/** 是否显示活动按钮 */
|
||||
const isShowActivity = ref(false)
|
||||
const shareDialog = ref(false)
|
||||
const topNUmber = ref('')
|
||||
|
||||
const audienceListTitle = computed(
|
||||
() => `在线人数 (${audienceList.value.length})`
|
||||
@@ -137,6 +139,10 @@
|
||||
currentLive.value?.liveOwner.userId
|
||||
liveOwnerAvatar.value = currentLive.value?.liveOwner.avatarUrl
|
||||
}
|
||||
getLIveRecordDetailByRoomId(e.liveId).then(res => {
|
||||
console.log('初始化虚拟人数===========', res.data.virtualViewers)
|
||||
topNUmber.value = res.data.virtualViewers
|
||||
})
|
||||
const res = await getLiveActivityDetail(liveId)
|
||||
// status: 0-未开始 1-进行中 2-已结束 3-已取消
|
||||
console.log('活动数据============= ', currentLive.value)
|
||||
@@ -249,7 +255,10 @@
|
||||
:src="item.avatarUrl"
|
||||
:size="24"
|
||||
/>
|
||||
<div class="audience-count">
|
||||
<div v-if="topNUmber" class="audience-count">
|
||||
{{ Number(topNUmber) > 100 ? '99+' : topNUmber }}
|
||||
</div>
|
||||
<div v-else class="audience-count">
|
||||
<span>{{ audienceList.length }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -20,12 +20,13 @@
|
||||
const onGo = item => {
|
||||
// #ifdef APP-PLUS
|
||||
uni.$liveID = item.roomId
|
||||
navigateTo('/pages/audience/index', { liveID: item.roomId })
|
||||
navigateTo('/pages/audience/index', { liveID: item.roomId,id: item.id })
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
navigateTo('/pages/discover/livelist/h5-live-player', {
|
||||
liveId: item.roomId
|
||||
liveId: item.roomId,
|
||||
id: item.id
|
||||
})
|
||||
// #endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user