nvue直播间需要调整分享样式

This commit is contained in:
bobobobo
2026-02-03 00:45:33 +08:00
parent 10ceb6b476
commit ae36c4cf10
393 changed files with 753 additions and 147 deletions

View File

@@ -1,4 +1,4 @@
<script setup lang="ts">
<script setup>
import { onLoad, onBackPress } from '@dcloudio/uni-app'
import { ref, computed, watch, Teleport } from 'vue'
import TUIRoomEngine, {
@@ -128,7 +128,7 @@
/**
* 初始化直播间
*/
const handleJoinLive = async (liveId: string) => {
const handleJoinLive = async liveId => {
try {
await joinLive({ liveId })
if (currentLive.value) {
@@ -139,7 +139,7 @@
}
const res = await getLiveActivityDetail(liveId)
// status: 0-未开始 1-进行中 2-已结束 3-已取消
console.log('活动数据============= ', res.data)
console.log('活动数据============= ', currentLive.value)
if (res?.data && res.data.status === 1) {
const show = await getLiveActivityRecord(res.data.activityId)
activityData.value = {
@@ -157,11 +157,11 @@
}
/** 监听是否发送活动 */
const handleActivity = async (message: any) => {
const handleActivity = async message => {
console.log('收到弹幕========:')
}
function showLeaveLiveDialog(text: string) {
function showLeaveLiveDialog(text) {
if (leaveLiveDialogVisible.value || text.trim().length === 0) {
return
}
@@ -189,7 +189,7 @@
})
}
function preventScroll(event: any) {
function preventScroll(event) {
event.preventDefault()
}
@@ -204,7 +204,7 @@
window.scrollTo({ top: 0, behavior: 'instant' })
}
onLoad(async (e: any) => {
onLoad(async e => {
try {
await setSelfInfo({
userName: userInfo.value?.userName || userInfo.value?.mobile,
@@ -338,7 +338,14 @@
<!-- 分享弹框 -->
<!-- 分享弹窗 :id="productId"
:cover="viewData.mainImage" -->
<share-popup v-model:show="shareDialog" type="1"></share-popup>
<share-popup
v-model:show="shareDialog"
:id="currentLive.liveId"
:text="currentLive.liveName"
:cover="currentLive.coverUrl"
:userLiveData="currentLive.liveOwner"
type="1"
></share-popup>
</UIKitProvider>
</template>