【优化】mall 客服商品消息
This commit is contained in:
@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<!-- 图片消息 -->
|
||||
<template v-if="KeFuMessageContentTypeEnum.PRODUCT === message.contentType">
|
||||
<div
|
||||
:class="[
|
||||
message.senderType === UserTypeEnum.MEMBER
|
||||
? `ml-10px`
|
||||
: message.senderType === UserTypeEnum.ADMIN
|
||||
? `mr-10px`
|
||||
: ''
|
||||
]"
|
||||
>
|
||||
<ProductItem
|
||||
:img="getMessageContent.picUrl"
|
||||
:price="getMessageContent.price"
|
||||
:skuText="getMessageContent.introduction"
|
||||
:title="getMessageContent.spuName"
|
||||
:titleWidth="400"
|
||||
priceColor="#FF3000"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { KeFuMessageContentTypeEnum } from '../tools/constants'
|
||||
import ProductItem from './ProductItem.vue'
|
||||
import { UserTypeEnum } from '@/utils/constants'
|
||||
import { KeFuMessageRespVO } from '@/api/mall/promotion/kefu/message'
|
||||
|
||||
defineOptions({ name: 'ImageMessageItem' })
|
||||
const props = defineProps<{
|
||||
message: KeFuMessageRespVO
|
||||
}>()
|
||||
const getMessageContent = computed(() => JSON.parse(props.message.content))
|
||||
</script>
|
||||
Reference in New Issue
Block a user