需要添加客服,二维码,扫码功能
This commit is contained in:
@@ -27,7 +27,8 @@
|
||||
<image class="participant-avatar" :src="user?.avatarURL || defaultAvatarURL" mode="aspectFill" />
|
||||
</view>
|
||||
<view class="participant-count">
|
||||
<text class="count-text">{{ audienceCount }}</text>
|
||||
<text v-if="topNUmber" class="count-text">{{ Number(topNUmber) > 100 ? '99+' : topNUmber }}</text>
|
||||
<text v-else class="count-text">{{ audienceCount }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="control-icons">
|
||||
@@ -159,6 +160,7 @@
|
||||
import { useLiveSummaryState } from '@/uni_modules/tuikit-atomic-x/state/LiveSummaryState'
|
||||
import ActionSheet from '@/components/ActionSheet.nvue'
|
||||
import Activity from './components/activity.nvue'
|
||||
import { LIVE_BUSINESS } from '@/constants/live-keys'
|
||||
|
||||
const dom = uni.requireNativePlugin('dom')
|
||||
const { loginUserInfo } = useLoginState();
|
||||
@@ -180,6 +182,8 @@
|
||||
const { summaryData } = useLiveSummaryState(uni.$liveID)
|
||||
const defaultCoverURL = 'https://liteav-test-1252463788.cos.ap-guangzhou.myqcloud.com/voice_room/voice_room_cover1.png';
|
||||
const defaultAvatarURL = 'https://web.sdk.qcloud.com/component/TUIKit/assets/avatar_01.png';
|
||||
|
||||
const topNUmber = ref('')
|
||||
const audienceCount = computed(() => audienceList.value.length);
|
||||
const isShowEndSheet = ref(false)
|
||||
const endSheetTitle = ref('')
|
||||
@@ -252,6 +256,17 @@
|
||||
}
|
||||
}, { immediate: true, deep: true });
|
||||
|
||||
// 监听自定义消息列表更新
|
||||
watch(messageList, (newMessages) => {
|
||||
if (newMessages && newMessages.length > 0) {
|
||||
console.log('弹幕消息列表更新:', newMessages);
|
||||
if (newMessages.some(v => v.businessID === LIVE_BUSINESS.ADMIN)) {
|
||||
console.log('管理员消息====================', newMessages.find(v => v.businessID === LIVE_BUSINESS.ADMIN))
|
||||
topNUmber.value = newMessages.find(v => v.businessID === LIVE_BUSINESS.ADMIN).data;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const editCover = (data : string) => {
|
||||
coverURL.value = data
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user