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 @@
+
+
+
+ 图片
+
+
+
+
+
{{ objData.name }}
+
+
+
+
+
+
+
+
+
+
+
+ 素材库选择
+
+
+
+
+
+
+
+
+ 上传图片
+
+
+ 支持 bmp/png/jpeg/jpg/gif 格式,大小不超过 2M
+
+
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+ 图文
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ newsType === NewsType.Published ? '选择已发布图文' : '选择草稿箱图文' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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 @@
+
+
+
+ 语音
+
+
+
{{ objData.name }}
+
+
+
+
+
+
+
+
+
+
+
+ 素材库选择
+
+
+
+
+
+
+
+
+ 点击上传
+
+
+ 格式支持 mp3/wma/wav/amr,文件大小不超过 2M,播放长度不超过 60s
+
+
+
+
+
+
+
+
+
+
+
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 @@
④ 支持发送【视频】消息时,支持新建视频
-->
-
+
-
-
- 文本
-
-
-
+
-
-
- 图片
-
-
-
-
-
{{ objData.name }}
-
-
-
-
-
-
-
-
-
-
-
- 素材库选择
-
-
-
-
-
-
-
-
- 上传图片
-
-
- 支持 bmp/png/jpeg/jpg/gif 格式,大小不超过 2M
-
-
-
-
-
-
+
-
-
- 语音
-
-
-
{{ objData.name }}
-
-
-
-
-
-
-
-
-
-
-
- 素材库选择
-
-
-
-
-
-
-
-
- 点击上传
-
-
- 格式支持 mp3/wma/wav/amr,文件大小不超过 2M,播放长度不超过 60s
-
-
-
-
-
-
+
-
-
- 视频
-
-
-
-
-
-
-
-
-
-
-
-
- 素材库选择
-
-
-
-
-
-
-
-
- 新建视频
-
-
-
-
-
-
+
-
-
- 图文
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ newsType === '1' ? '选择已发布图文' : '选择草稿箱图文' }}
-
-
-
-
-
-
-
-
-
-
+
-
-
- 音乐
-
-
-
-
-
-
-
-
-
-
-
-
-
- 本地上传
-
- 素材库选择
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-