QAQ
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@
|
||||
|
||||
<template>
|
||||
<UIKitProvider language="zh-CN">
|
||||
<div @click="handleLiveRoomClick()">点击</div>
|
||||
<!-- <div @click="handleLiveRoomClick()">点击</div> -->
|
||||
<LiveList @live-room-click="handleLiveRoomClick" />
|
||||
</UIKitProvider>
|
||||
</template>
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
getLiveActivityDetail,
|
||||
getLiveActivityRecord
|
||||
} from '../../../api/tui-kit'
|
||||
import { LIVE_BUSINESS } from '@/constants/live-keys'
|
||||
|
||||
const { t } = useUIKit()
|
||||
|
||||
@@ -69,6 +70,7 @@
|
||||
const activityData = ref({})
|
||||
/** 是否显示活动按钮 */
|
||||
const isShowActivity = ref(false)
|
||||
const shareDialog = ref(false)
|
||||
|
||||
const audienceListTitle = computed(
|
||||
() => `在线人数 (${audienceList.value.length})`
|
||||
@@ -80,9 +82,17 @@
|
||||
showLeaveLiveDialog('您已被踢出房间')
|
||||
}
|
||||
|
||||
watch(messageList, (newVal, oldVal) => {
|
||||
console.log('收到弹幕消息====:', newVal) // 实时更新的全量消息列表
|
||||
})
|
||||
watch(
|
||||
() => messageList.value,
|
||||
newMessages => {
|
||||
if (newMessages.length > 0) {
|
||||
console.log('弹幕消息列表更新:', newMessages)
|
||||
if (newMessages.some(v => v.businessID === LIVE_BUSINESS.ADMIN)) {
|
||||
}
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
)
|
||||
|
||||
watch(
|
||||
() => currentLive.value?.liveId,
|
||||
@@ -112,7 +122,7 @@
|
||||
*/
|
||||
const handleLeaveLive = () => {
|
||||
leaveLiveDialogVisible.value = false
|
||||
// navigateBack()
|
||||
navigateBack()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -195,12 +205,20 @@
|
||||
}
|
||||
|
||||
onLoad(async (e: any) => {
|
||||
await setSelfInfo({
|
||||
userName: userInfo.value?.userName || userInfo.value?.mobile,
|
||||
avatarUrl: userInfo.value?.avatar || ''
|
||||
})
|
||||
subscribeEvent(LiveListEvent.onKickedOutOfLive, handleKickedOutOfLive)
|
||||
await handleJoinLive(e.liveId)
|
||||
try {
|
||||
await setSelfInfo({
|
||||
userName: userInfo.value?.userName || userInfo.value?.mobile,
|
||||
avatarUrl: userInfo.value?.avatar || ''
|
||||
})
|
||||
subscribeEvent(
|
||||
LiveListEvent.onKickedOutOfLive,
|
||||
handleKickedOutOfLive
|
||||
)
|
||||
await handleJoinLive(e.liveId)
|
||||
} catch (err) {
|
||||
console.error('Failed to join live room, error:', err)
|
||||
showLeaveLiveDialog('没有直播间')
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -273,6 +291,13 @@
|
||||
src="/static/images/activity.png"
|
||||
mode="aspectFit"
|
||||
/>
|
||||
<image
|
||||
class="action-button-icon"
|
||||
src="/static/images/fengxiang.png"
|
||||
mode="aspectFit"
|
||||
style="margin-left: 14rpx"
|
||||
@click="shareDialog = true"
|
||||
/>
|
||||
<!-- <LiveGift class="bottom-operate-button-icon" /> -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -309,6 +334,11 @@
|
||||
</div>
|
||||
</template>
|
||||
</TUIDialog>
|
||||
|
||||
<!-- 分享弹框 -->
|
||||
<!-- 分享弹窗 :id="productId"
|
||||
:cover="viewData.mainImage" -->
|
||||
<share-popup v-model:show="shareDialog" type="1"></share-popup>
|
||||
</UIKitProvider>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -137,17 +137,23 @@
|
||||
<view class="left-img">
|
||||
<text>拼单</text>
|
||||
<image
|
||||
src="/static/images/public/random1.png"
|
||||
:src="`/static/images/public/random${
|
||||
Math.floor(Math.random() * 7) + 1
|
||||
}.png`"
|
||||
mode="scaleToFill"
|
||||
class="avatar"
|
||||
></image>
|
||||
<image
|
||||
src="/static/images/public/random2.png"
|
||||
:src="`/static/images/public/random${
|
||||
Math.floor(Math.random() * 7) + 1
|
||||
}.png`"
|
||||
mode="scaleToFill"
|
||||
class="avatar"
|
||||
></image>
|
||||
<image
|
||||
src="/static/images/public/random3.png"
|
||||
:src="`/static/images/public/random${
|
||||
Math.floor(Math.random() * 7) + 1
|
||||
}.png`"
|
||||
mode="scaleToFill"
|
||||
class="avatar"
|
||||
></image>
|
||||
@@ -159,7 +165,7 @@
|
||||
<!-- 去拼团 -->
|
||||
<view class="bottom-name">
|
||||
<view class="count-down">
|
||||
<text>拼单倒计时:</text>
|
||||
<text>距离结束:</text>
|
||||
<uni-countdown
|
||||
:day="parseDateTime(item.endTime).day"
|
||||
:hour="parseDateTime(item.endTime).hour"
|
||||
|
||||
Reference in New Issue
Block a user