From 42a9715ff2dc32e224cd23c4011cb9dbfd52276a Mon Sep 17 00:00:00 2001 From: dhb52 Date: Sat, 8 Apr 2023 10:13:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DWxReply=E3=80=81WxMate?= =?UTF-8?q?rialSelect=E7=BB=84=E4=BB=B6bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mp/components/wx-material-select/main.vue | 239 +++++++++--------- src/views/mp/components/wx-reply/main.vue | 34 +-- 2 files changed, 139 insertions(+), 134 deletions(-) diff --git a/src/views/mp/components/wx-material-select/main.vue b/src/views/mp/components/wx-material-select/main.vue index 4c477078..bcf38027 100644 --- a/src/views/mp/components/wx-material-select/main.vue +++ b/src/views/mp/components/wx-material-select/main.vue @@ -5,127 +5,130 @@ ① 移除 avue 组件,使用 ElementUI 原生组件 --> @@ -173,7 +176,7 @@ export default defineComponent({ const newsTypeRef = ref(props.newsType) const selectMaterialFun = (item) => { - ctx.emit('selectMaterial', item) + ctx.emit('select-material', item) } /** 搜索按钮操作 */ const handleQuery = () => { @@ -203,9 +206,10 @@ export default defineComponent({ total.value = data.total loading.value = false } + const getFreePublishPageFun = async () => { let data = await getFreePublishPage(queryParams) - data.list.foreach((item) => { + data.list.forEach((item) => { const newsItem = item.content.newsItem newsItem.forEach((article) => { article.picUrl = article.thumbUrl @@ -232,6 +236,7 @@ export default defineComponent({ onMounted(async () => { getPage() }) + return { handleQuery, dateFormatter, diff --git a/src/views/mp/components/wx-reply/main.vue b/src/views/mp/components/wx-reply/main.vue index a31e9462..b7bc3443 100644 --- a/src/views/mp/components/wx-reply/main.vue +++ b/src/views/mp/components/wx-reply/main.vue @@ -37,7 +37,7 @@

{{ objDataRef.name }}

- + @@ -52,7 +52,7 @@ - + @@ -91,20 +91,20 @@

{{ objDataRef.name }}

- +
- - + +
- 素材库选择 + 素材库选择 - + @@ -151,7 +151,7 @@ @input="inputContent" />
- +
@@ -162,7 +162,7 @@ - + @@ -196,8 +196,8 @@
-
- +
+ @@ -216,9 +216,9 @@ - @@ -268,9 +268,9 @@ - @@ -482,7 +482,7 @@ export default defineComponent({ // 创建 tempObjItem 对象,并设置对应的值 let tempObjItem = { type: '', - articles: '', + articles: [], thumbMediaId: '', thumbMediaUrl: '', introduction: '', @@ -560,7 +560,7 @@ export default defineComponent({ } const deleteObj = () => { if (objDataRef.type === 'news') { - objDataRef.articles = '' + objDataRef.articles = [] } else if (objDataRef.type === 'image') { objDataRef.mediaId = null objDataRef.url = null