From 6325dd288cd6db11a241ac443db7b3e64eb6e2ae Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 10 Jan 2023 21:01:46 +0800 Subject: [PATCH] =?UTF-8?q?mp=EF=BC=9A=E5=89=8D=E7=AB=AF=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=20message=20=E6=B6=88=E6=81=AF=E7=9A=84=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/message/vo/MpMessageBaseVO.java | 16 ++++++ .../src/views/mp/components/wx-msg/card.scss | 15 ++++++ .../src/views/mp/components/wx-msg/main.vue | 34 +++--------- .../src/views/mp/components/wx-music/main.vue | 52 +++++++++++++++++++ yudao-ui-admin/src/views/mp/message/index.vue | 8 ++- 5 files changed, 97 insertions(+), 28 deletions(-) create mode 100644 yudao-ui-admin/src/views/mp/components/wx-music/main.vue diff --git a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/message/vo/MpMessageBaseVO.java b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/message/vo/MpMessageBaseVO.java index 32e406814..5e85c3ed0 100644 --- a/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/message/vo/MpMessageBaseVO.java +++ b/yudao-module-mp/yudao-module-mp-biz/src/main/java/cn/iocoder/yudao/module/mp/controller/admin/message/vo/MpMessageBaseVO.java @@ -10,6 +10,7 @@ import me.chanjar.weixin.common.api.WxConsts; import java.util.List; +// TODO 芋艿:VO 的注解 /** * 粉丝消息表 Base VO,提供给添加、修改、详细的子 VO 使用 * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 @@ -158,6 +159,21 @@ public class MpMessageBaseVO { @TableField(typeHandler = MpMessageDO.ArticleTypeHandler.class) private List articles; + /** + * 音乐链接 + * + * 消息类型为 {@link WxConsts.XmlMsgType} 的 MUSIC + */ + private String musicUrl; + /** + * 高质量音乐链接 + * + * WIFI 环境优先使用该链接播放音乐 + * + * 消息类型为 {@link WxConsts.XmlMsgType} 的 MUSIC + */ + private String hqMusicUrl; + // ========= 事件推送 https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_event_pushes.html /** diff --git a/yudao-ui-admin/src/views/mp/components/wx-msg/card.scss b/yudao-ui-admin/src/views/mp/components/wx-msg/card.scss index 18278b3e4..67ac92191 100644 --- a/yudao-ui-admin/src/views/mp/components/wx-msg/card.scss +++ b/yudao-ui-admin/src/views/mp/components/wx-msg/card.scss @@ -84,3 +84,18 @@ } } } + +/** joolun 额外加的 */ +.avue-comment__main { + flex: unset!important; + border-radius: 5px!important; + margin: 0 8px!important; +} +.avue-comment__header { + border-top-left-radius: 5px; + border-top-right-radius: 5px; +} +.avue-comment__body { + border-bottom-right-radius: 5px; + border-bottom-left-radius: 5px; +} diff --git a/yudao-ui-admin/src/views/mp/components/wx-msg/main.vue b/yudao-ui-admin/src/views/mp/components/wx-msg/main.vue index 4ecb1e6a5..72daaac91 100644 --- a/yudao-ui-admin/src/views/mp/components/wx-msg/main.vue +++ b/yudao-ui-admin/src/views/mp/components/wx-msg/main.vue @@ -68,22 +68,13 @@
-
- - - - - - - - - - - - +
+ +
@@ -103,6 +94,7 @@ import WxVoicePlayer from '@/views/mp/components/wx-voice-play/main.vue'; import WxNews from '@/views/mp/components/wx-news/main.vue'; import WxLocation from '@/views/mp/components/wx-location/main.vue'; + import WxMusic from '@/views/mp/components/wx-music/main.vue'; export default { name: "wxMsg", @@ -111,7 +103,8 @@ WxVideoPlayer, WxVoicePlayer, WxNews, - WxLocation + WxLocation, + WxMusic }, props: { wxUserId: { @@ -245,19 +238,6 @@ .msg-send { padding: 10px; } -.avue-comment__main { - flex: unset!important; - border-radius: 5px!important; - margin: 0 8px!important; -} -.avue-comment__header { - border-top-left-radius: 5px; - border-top-right-radius: 5px; -} -.avue-comment__body { - border-bottom-right-radius: 5px; - border-bottom-left-radius: 5px; -} .avatar-div { text-align: center; width: 80px; diff --git a/yudao-ui-admin/src/views/mp/components/wx-music/main.vue b/yudao-ui-admin/src/views/mp/components/wx-music/main.vue new file mode 100644 index 000000000..5b2676e1c --- /dev/null +++ b/yudao-ui-admin/src/views/mp/components/wx-music/main.vue @@ -0,0 +1,52 @@ + + + + + + diff --git a/yudao-ui-admin/src/views/mp/message/index.vue b/yudao-ui-admin/src/views/mp/message/index.vue index c49451bbc..938efc5d8 100644 --- a/yudao-ui-admin/src/views/mp/message/index.vue +++ b/yudao-ui-admin/src/views/mp/message/index.vue @@ -89,6 +89,10 @@
+
+ +
未知消息类型
@@ -119,6 +123,7 @@ import WxVideoPlayer from '@/views/mp/components/wx-video-play/main.vue'; import WxVoicePlayer from '@/views/mp/components/wx-voice-play/main.vue'; import WxMsg from '@/views/mp/components/wx-msg/main.vue'; import WxLocation from '@/views/mp/components/wx-location/main.vue'; +import WxMusic from '@/views/mp/components/wx-music/main.vue'; export default { name: "WxFansMsg", @@ -126,7 +131,8 @@ export default { WxVideoPlayer, WxVoicePlayer, WxMsg, - WxLocation + WxLocation, + WxMusic }, data() { return {