From bd3ef507cc732ce7de820021b8d811effe0debda Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Mon, 25 Jul 2022 11:36:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=8F=E5=90=8C=E5=AE=A3=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Announce/AppAnnounce/components/Add.vue | 29 +++++++--- .../AppAnnounce/components/Detail.vue | 57 +++++++++++-------- .../Announce/AppAnnounce/components/List.vue | 7 +-- 3 files changed, 57 insertions(+), 36 deletions(-) diff --git a/project/sass/apps/Announce/AppAnnounce/components/Add.vue b/project/sass/apps/Announce/AppAnnounce/components/Add.vue index aa7dc89e..096af2b9 100644 --- a/project/sass/apps/Announce/AppAnnounce/components/Add.vue +++ b/project/sass/apps/Announce/AppAnnounce/components/Add.vue @@ -55,7 +55,7 @@
- {{ item.name || item.linkTitle || item.mpTitle }} + {{ item.mpTitle || item.name || item.linkTitle }}
删除
@@ -198,6 +198,7 @@

{{ item.mpTitle }}

+
小程序 @@ -292,6 +293,7 @@ v-model="dateForm.choiceTime" type="datetime" size="small" + value-format="yyyy-MM-dd HH:mm:ss" placeholder="请选择定时发送时间"> @@ -490,7 +492,8 @@ ...this.miniAppForm, msgType: '5', ...this.miniAppForm.media[0], - mediaId: this.miniAppForm.media[0].media.mediaId + mediaId: this.miniAppForm.media[0].media.mediaId, + sysFileId: this.miniAppForm.media[0].id }) this.isShowAddMiniapp = false @@ -600,12 +603,15 @@ ...this.fileList ] - this.isLoading = true + if (sendType === 0) { + this.isLoading = true + } this.instance.post(`/app/appmasssendingtask/addOrUpdate`, { ...this.form, id: this.params.id, wxGroups: this.form.wxGroups, contents, + sendType, choiceTime: this.dateForm.choiceTime, filterCriteria: this.form.filterCriteria.join(','), examines: this.form.examines.length ? this.form.examines.map(v => { @@ -865,7 +871,9 @@ .msg-miniapp { width: 206px; + padding: 0 12px; text-align: justify; + font-size: 0; background: #FFFFFF; border-radius: 5px; font-size: 14px; @@ -873,17 +881,24 @@ h2 { line-height: 1.2; - padding: 8px 10px 8px; + padding: 8px 0; border-bottom: 1px solid #eee; color: #222222; font-size: 14px; } + img { + width: 100%; + height: 120px; + margin-bottom: 8px; + } + .msg-bottom { display: flex; align-items: center; line-height: 1; - padding: 8px 12px; + padding: 4px 0; + border-top: 1px solid #eee; i { margin-right: 4px; @@ -893,8 +908,8 @@ } img { - width: 20px; - height: 20px; + width: 16px; + height: 16px; border-radius: 50%; } } diff --git a/project/sass/apps/Announce/AppAnnounce/components/Detail.vue b/project/sass/apps/Announce/AppAnnounce/components/Detail.vue index a66d1cf6..22557fcf 100644 --- a/project/sass/apps/Announce/AppAnnounce/components/Detail.vue +++ b/project/sass/apps/Announce/AppAnnounce/components/Detail.vue @@ -13,46 +13,48 @@ content="任务开始后,3天内15分钟更新1次,3天后访问页面时触发更新,1时间最多刷新1次"> - 数据更新于2022-07-06 09:23 + 数据更新于{{ info.dataUpdateTime }}
- @@ -202,7 +200,10 @@ current: 1, size: 10 }, + fileList: [], tableData: [], + info: {}, + content: '', currIndex: 0, colConfigs: [ { prop: 'position', label: '任务名称' }, @@ -216,22 +217,32 @@ }, created () { + this.getInfo(this.params.id) }, methods: { getInfo (id) { - this.instance.post(`/app/wxcp/wxuser/queryDetailById?id=${id}`).then(res => { + this.instance.post(`/app/appmasssendingtask/queryDetailById?id=${id}`).then(res => { if (res.code === 0) { - this.form = { - ...res.data + this.info = res.data + + const content = res.data.contents.filter(v => v.msgType === '0') + + if (content.length) { + this.content = content[0].content } + + this.fileList = res.data.contents.filter(v => v.msgType !== '0').map(v => { + return { + ...v, + ...v.sysFile + } + }) } }) }, - getList () { - - }, + getList () {}, cancel (isRefresh) { this.$emit('change', { diff --git a/project/sass/apps/Announce/AppAnnounce/components/List.vue b/project/sass/apps/Announce/AppAnnounce/components/List.vue index ddf9f499..5016520e 100644 --- a/project/sass/apps/Announce/AppAnnounce/components/List.vue +++ b/project/sass/apps/Announce/AppAnnounce/components/List.vue @@ -49,15 +49,10 @@ :col-configs="colConfigs" :total="total" v-loading="loading" - style="margin-top: 6px;" + style="margin-top: 6px; width: 100%;" :current.sync="search.current" :size.sync="search.size" @getList="getList"> - - -