Files
yudao-ui-admin-vben/apps/web-ele/src/views/mp/components/wx-msg/msg.vue
YunaiV eb9b1c9364 fix(vben): 修复 antdv-next 与 ele 端差异问题
- 修复 pay 收银台二维码展示:ele 使用 useQRCode 渲染协议串二维码,并补齐两端 QR 弹窗打开逻辑
- 修复 ele 端 mp 消息语音、视频播放器组件对调问题
- 修复 ele 端 ERP 库存单据商品、仓库下拉选项不渲染问题
- 修复 ele 端系统菜单组件路径搜索过滤逻辑
- 修复 ele 端 IM 表情包抽屉打开后不加载表情列表问题
- 修复 ele 端文件配置 loading 关闭路径,避免成功或异常后持续转圈
- 修复 ele 端客户公海、合同配置等 CRM 表单文案不可见问题,并保持两端数字校验一致
- 修复 BPM、商城、字典等页面的组件适配和条件判断差异
- 启用 web-antdv-next typecheck 脚本,保持与 web-ele 一致
2026-06-26 17:30:58 -07:00

93 lines
2.1 KiB
Vue

<script lang="ts" setup>
import { MpMsgType } from '@vben/constants';
import {
WxLocation,
WxMusic,
WxNews,
WxVideoPlayer,
WxVoicePlayer,
} from '#/views/mp/components';
import MsgEvent from './msg-event.vue';
defineOptions({ name: 'WxMsg' });
withDefaults(
defineProps<{
item?: any;
}>(),
{
item: {},
},
);
</script>
<template>
<div>
<MsgEvent v-if="item.type === MpMsgType.Event" :item="item" />
<div v-else-if="item.type === MpMsgType.Text">{{ item.content }}</div>
<div v-else-if="item.type === MpMsgType.Voice">
<WxVoicePlayer :url="item.mediaUrl" :content="item.recognition" />
</div>
<div v-else-if="item.type === MpMsgType.Image">
<a target="_blank" :href="item.mediaUrl">
<img :src="item.mediaUrl" class="w-[100px]" />
</a>
</div>
<div
v-else-if="item.type === MpMsgType.Video || item.type === 'shortvideo'"
class="text-center"
>
<WxVideoPlayer :url="item.mediaUrl" />
</div>
<div v-else-if="item.type === MpMsgType.Link" class="flex-1">
<el-link
type="success"
:underline="false"
target="_blank"
:href="item.url"
>
<div
class="mb-3 text-base text-[rgba(0,0,0,0.85)] hover:text-[#1890ff]"
>
<i class="el-icon-link"></i>{{ item.title }}
</div>
</el-link>
<div
class="h-auto overflow-hidden text-[rgba(0,0,0,0.45)]"
style="height: unset"
>
{{ item.description }}
</div>
</div>
<div v-else-if="item.type === MpMsgType.Location">
<WxLocation
:label="item.label"
:location-y="item.locationY"
:location-x="item.locationX"
/>
</div>
<div v-else-if="item.type === MpMsgType.News" class="w-[300px]">
<WxNews :articles="item.articles" />
</div>
<div v-else-if="item.type === MpMsgType.Music">
<WxMusic
:title="item.title"
:description="item.description"
:thumb-media-url="item.thumbMediaUrl"
:music-url="item.musicUrl"
:hq-music-url="item.hqMusicUrl"
/>
</div>
</div>
</template>