diff --git a/src/views/mp/components/wx-msg/main.vue b/src/views/mp/components/wx-msg/main.vue index ad37c1f1..c7354628 100644 --- a/src/views/mp/components/wx-msg/main.vue +++ b/src/views/mp/components/wx-msg/main.vue @@ -126,7 +126,7 @@
- 发送(S) + 发送(S)
@@ -231,12 +231,8 @@ const sendMsg = async () => { list.value = [...list.value, ...[data]] scrollToBottom() - //ts检查的時候会判断这个组件可能是空的,所以需要进行断言。 - //避免 tab 的数据未清理 - const deleteObj = replySelectRef.value?.deleteObj - if (deleteObj) { - deleteObj() - } + // 发送后清空数据 + replySelectRef.value?.clear() } const loadingMore = () => { @@ -333,6 +329,7 @@ const scrollToBottom = () => { .send-but { float: right; - margin-top: 8px !important; + margin-top: 8px; + margin-bottom: 8px; } diff --git a/src/views/mp/components/wx-reply/components/TabImage.vue b/src/views/mp/components/wx-reply/components/TabImage.vue new file mode 100644 index 00000000..827ef11c --- /dev/null +++ b/src/views/mp/components/wx-reply/components/TabImage.vue @@ -0,0 +1,172 @@ + + + + + diff --git a/src/views/mp/components/wx-reply/components/TabMusic.vue b/src/views/mp/components/wx-reply/components/TabMusic.vue new file mode 100644 index 00000000..5a50cbf0 --- /dev/null +++ b/src/views/mp/components/wx-reply/components/TabMusic.vue @@ -0,0 +1,121 @@ + + + + + diff --git a/src/views/mp/components/wx-reply/components/TabNews.vue b/src/views/mp/components/wx-reply/components/TabNews.vue new file mode 100644 index 00000000..13ae9570 --- /dev/null +++ b/src/views/mp/components/wx-reply/components/TabNews.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/src/views/mp/components/wx-reply/components/TabText.vue b/src/views/mp/components/wx-reply/components/TabText.vue new file mode 100644 index 00000000..f6981a73 --- /dev/null +++ b/src/views/mp/components/wx-reply/components/TabText.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/views/mp/components/wx-reply/components/TabVideo.vue b/src/views/mp/components/wx-reply/components/TabVideo.vue new file mode 100644 index 00000000..c924bc2a --- /dev/null +++ b/src/views/mp/components/wx-reply/components/TabVideo.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/src/views/mp/components/wx-reply/components/TabVoice.vue b/src/views/mp/components/wx-reply/components/TabVoice.vue new file mode 100644 index 00000000..7bcefced --- /dev/null +++ b/src/views/mp/components/wx-reply/components/TabVoice.vue @@ -0,0 +1,162 @@ + + + + + diff --git a/src/views/mp/components/wx-reply/components/types.ts b/src/views/mp/components/wx-reply/components/types.ts new file mode 100644 index 00000000..d5273334 --- /dev/null +++ b/src/views/mp/components/wx-reply/components/types.ts @@ -0,0 +1,25 @@ +type ReplyType = '' | 'news' | 'image' | 'voice' | 'video' | 'music' | 'text' + +interface ObjData { + accountId: number + type: ReplyType + name: string | null + content: string | null + mediaId: string | null + url: string | null + title: string | null + description: string | null + thumbMediaId: string | null + thumbMediaUrl: string | null + musicUrl: string | null + hqMusicUrl: string | null + introduction: string | null + articles: any[] +} + +enum NewsType { + Published = '1', + Draft = '2' +} + +export { ObjData, NewsType } diff --git a/src/views/mp/components/wx-reply/main.vue b/src/views/mp/components/wx-reply/main.vue index 8e8b3eee..da523b6c 100644 --- a/src/views/mp/components/wx-reply/main.vue +++ b/src/views/mp/components/wx-reply/main.vue @@ -8,519 +8,63 @@ ④ 支持发送【视频】消息时,支持新建视频 --> -