nvue直播间需要调整分享样式
This commit is contained in:
@@ -64,7 +64,7 @@
|
||||
@onDialogPopupShowOrHide="handleSwiperDotShow"
|
||||
/> -->
|
||||
<!-- 红包 -->
|
||||
<RedEnvelope />
|
||||
<RedEnvelope @onDialogPopupShowOrHide="handleSwiperDotShow" />
|
||||
|
||||
<!-- 直播按钮 -->
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import ToolbarItemContainer from '../toolbar-item-container/index.vue'
|
||||
import { isUniFrameWork } from '../../../../utils/env'
|
||||
import { navigateTo } from '../../../../../utils/router'
|
||||
import { getAnchorDetail } from '../../../../../api/tui-kit'
|
||||
import { getAnchorDetail, getLiveId } from '../../../../../api/tui-kit'
|
||||
import { useUI } from '../../../../../utils/use-ui'
|
||||
|
||||
const { showDialog } = useUI()
|
||||
@@ -44,11 +44,13 @@
|
||||
return
|
||||
}
|
||||
if (stateData.value === 1) {
|
||||
const { data } = await getLiveId()
|
||||
// 跳转到开播页面
|
||||
uni.$liveID = data
|
||||
uni.navigateTo({
|
||||
url: `/pages/anchor/index?groupId=${encodeURIComponent(
|
||||
props.groupId
|
||||
)}&creatorType=1`
|
||||
)}&creatorType=1&roomId=${data}`
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
import { sendRedEnvelope } from '../../../../../api/tui-kit'
|
||||
import { useUserStore } from '../../../../../stores/user'
|
||||
|
||||
const emits = defineEmits(['onDialogPopupShowOrHide']);
|
||||
|
||||
const { showDialog, showToast } = useUI()
|
||||
|
||||
const placeholderStyle = `font-family: PingFang SC, PingFang SC; font-weight: 500; color: #a9a9a9; font-size: 32rpx; font-style: normal; text-transform: none;`
|
||||
@@ -114,10 +116,12 @@
|
||||
formData.num = ''
|
||||
errorData.integralShow = false
|
||||
errorData.numShow = false
|
||||
emits('onDialogPopupShowOrHide', true);
|
||||
}
|
||||
|
||||
const onDialogClose = () => {
|
||||
console.log('关闭窗口')
|
||||
emits('onDialogPopupShowOrHide', false);
|
||||
}
|
||||
|
||||
const closeDialog = () => {
|
||||
@@ -261,6 +265,7 @@
|
||||
@click.stop="closeDialog"
|
||||
></uni-icons>
|
||||
</view>
|
||||
<input />
|
||||
<!-- 红包个数 -->
|
||||
<view v-if="isGroup" class="group-box">
|
||||
<view
|
||||
|
||||
@@ -116,6 +116,41 @@
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<!-- 直播信息 -->
|
||||
<template
|
||||
v-else-if="customData.businessID === CHAT_MSG_CUSTOM_TYPE.LIVE"
|
||||
>
|
||||
<view @click="onLive" class="live-box">
|
||||
<!-- 直播状态 -->
|
||||
<view class="top-state">
|
||||
<uni-icons
|
||||
type="circle-filled"
|
||||
color="#fff"
|
||||
size="36rpx"
|
||||
></uni-icons>
|
||||
<text class="state">直播间</text>
|
||||
</view>
|
||||
<image
|
||||
:src="goodsData.cover"
|
||||
mode="scaleToFill"
|
||||
class="live-img"
|
||||
/>
|
||||
<view class="live-text">
|
||||
<view class="live_box">
|
||||
<view class="avatar">
|
||||
<image
|
||||
v-if="goodsData.userLiveData?.avatarUrl"
|
||||
:src="goodsData.userLiveData?.avatarUrl"
|
||||
mode="scaleToFill"
|
||||
class="avatar-img"
|
||||
/>
|
||||
<uni-icons v-else type="contact" size="76rpx"></uni-icons>
|
||||
</view>
|
||||
<text class="text-box">{{ goodsData.title }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span v-html="content.custom" />
|
||||
</template>
|
||||
@@ -141,7 +176,7 @@
|
||||
import star from '../../../../assets/icon/star-light.png'
|
||||
import unopenedEnvelope from '../../../../assets/icon/unopened-envelope.svg'
|
||||
import kaiEnvelope from '../../../../assets/icon/kai-unopened-envelope.svg'
|
||||
import { navigateTo } from '../../../../../utils/router'
|
||||
import { navigateTo } from '../../../../../utils/router'
|
||||
|
||||
interface Props {
|
||||
messageItem: IMessageModel
|
||||
@@ -200,6 +235,21 @@ import { navigateTo } from '../../../../../utils/router'
|
||||
navigateTo('/pages/mall/detail', { productId: goodsData.value.id })
|
||||
}
|
||||
|
||||
/** 点击跳转直播间 */
|
||||
const onLive = () => {
|
||||
// #ifdef APP-PLUS
|
||||
navigateTo('/pages/audience/index', {
|
||||
liveID: goodsData.value.id
|
||||
})
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
navigateTo('/pages/discover/livelist/h5-live-player', {
|
||||
liveId: goodsData.value.id
|
||||
})
|
||||
// #endif
|
||||
}
|
||||
|
||||
watchEffect(() => {
|
||||
custom.value = props.content
|
||||
message.value = props.messageItem
|
||||
@@ -359,4 +409,62 @@ import { navigateTo } from '../../../../../utils/router'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.live-box {
|
||||
width: 300rpx;
|
||||
height: 380rpx;
|
||||
position: relative;
|
||||
.top-state {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: 20rpx;
|
||||
left: 20rpx;
|
||||
background: #e15636;
|
||||
padding: 6rpx 18rpx 6rpx 10rpx;
|
||||
border-radius: 50rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 1;
|
||||
.state {
|
||||
font-size: 26rpx;
|
||||
color: #fff;
|
||||
margin-left: 6rpx;
|
||||
}
|
||||
}
|
||||
.live-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.live-text {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
bottom: 20rpx;
|
||||
.live_box {
|
||||
padding: 0 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.avatar {
|
||||
flex-shrink: 0;
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
.avatar-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
.text-box {
|
||||
margin-left: 10rpx;
|
||||
width: calc(100% - 64rpx);
|
||||
color: #fff;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
const emits = defineEmits<IEmits>()
|
||||
const props = withDefaults(defineProps<IProps>(), {
|
||||
isMultipleSelectMode: false,
|
||||
messageItem: () => ({}) as IMessageModel
|
||||
messageItem: () => ({} as IMessageModel)
|
||||
})
|
||||
const featureConfig = TUIChatConfig.getFeatureConfig()
|
||||
|
||||
@@ -119,6 +119,15 @@
|
||||
renderCondition() {
|
||||
if (!featureConfig.RevokeMessage || !message.value) return false
|
||||
if (isRedEnvelopeMessage(message.value)) return false
|
||||
|
||||
// console.log(message.value.conversationType === 'GROUP', '====')
|
||||
console.log(message.value, '====')
|
||||
// if (message.value.conversationType === 'GROUP') {
|
||||
// TUIGroupService.getGroupAttributes({
|
||||
// groupID: 'group1',
|
||||
// keyList: ['key1', 'key2']
|
||||
// })
|
||||
// }
|
||||
return (
|
||||
message.value.flow === 'out' &&
|
||||
message.value.status === 'success'
|
||||
|
||||
Reference in New Issue
Block a user