修复已知问题

This commit is contained in:
bobobobo
2026-01-29 00:27:31 +08:00
parent 990f2df972
commit 41c1e5ba89
36 changed files with 1353 additions and 169 deletions

View File

@@ -142,7 +142,7 @@
v-else-if="item.type === TYPES.MSG_LOCATION"
:content="item.getMessageContent()"
/>
<!-- 自定义消息,目前只支持红包 -->
<!-- 自定义消息,目前只支持红包,商品详情 -->
<MessageCustom
v-else-if="item.type === TYPES.MSG_CUSTOM"
ref="customRefMessage"

View File

@@ -20,6 +20,8 @@
>
<Avatar
useSkeletonAnimation
:type="message.conversationType"
:id="message.from"
:url="message.avatar || ''"
:style="{ flex: '0 0 auto' }"
/>

View File

@@ -100,6 +100,22 @@
</text> -->
</view>
</template>
<!-- 商品详情 -->
<template
v-else-if="customData.businessID === CHAT_MSG_CUSTOM_TYPE.GOODS"
>
<view class="goods-box" @click="onGoods">
<image
mode="heightFix"
:src="goodsData.cover"
class="img-box"
></image>
<view class="right-box">
<text class="name">{{ goodsData.title }}</text>
<text class="price">¥ {{ goodsData.price }}</text>
</view>
</view>
</template>
<template v-else>
<span v-html="content.custom" />
</template>
@@ -125,6 +141,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'
interface Props {
messageItem: IMessageModel
@@ -173,6 +190,16 @@
}
})
/** 商品详情显示数据 */
const goodsData = computed(() => {
return JSON.parse(props.messageItem.payload.data)
})
/** 点击商品详情 */
const onGoods = () => {
navigateTo('/pages/mall/detail', { productId: goodsData.value.id })
}
watchEffect(() => {
custom.value = props.content
message.value = props.messageItem
@@ -298,4 +325,38 @@
color: #ffffff;
}
}
.goods-box {
display: flex;
.img-box {
flex-shrink: 0;
width: 180rpx;
height: 240rpx;
border-radius: 12rpx;
overflow: hidden;
background: rgb(182, 182, 182);
margin-right: 20rpx;
}
.right-box {
width: 50vw;
display: flex;
flex-direction: column;
justify-content: space-between;
.name {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
font-size: 28rpx;
font-weight: 400;
color: #333333;
}
.price {
font-size: 28rpx;
font-weight: 500;
color: #ff7201;
}
}
}
</style>

View File

@@ -171,7 +171,7 @@ const isHoverFingerPointer = computed<boolean>(() => {
function openReadUserPanel() {
if (isHoverFingerPointer.value) {
emits('openReadUserPanel');
// emits('openReadUserPanel');
}
}