From 4f3170a8474de4782644c6c9522d31984c0c3371 Mon Sep 17 00:00:00 2001 From: liuye Date: Wed, 21 Jun 2023 18:04:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BE=A4=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../addPropaganda.vue | 89 +++++++++++++++++-- 1 file changed, 84 insertions(+), 5 deletions(-) diff --git a/src/project/qianxinan/AppCooperationPropaganda/addPropaganda.vue b/src/project/qianxinan/AppCooperationPropaganda/addPropaganda.vue index 76661b90..62fdd735 100644 --- a/src/project/qianxinan/AppCooperationPropaganda/addPropaganda.vue +++ b/src/project/qianxinan/AppCooperationPropaganda/addPropaganda.vue @@ -73,6 +73,18 @@
删除
+ +
+
+
+ +
+
+
{{ item.mpTitle }}
+
+
删除
+
+
@@ -223,6 +235,36 @@ + +
+
+ *小程序appid +
+ +
+
+
+ *小程序page路径 +
+ +
+
+
+ *标题 +
+ +
+
+
+ *封面图 +
+
+ +
+
+ +
+
@@ -363,7 +405,7 @@ export default { msgType: 'web' }, { - icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-web.png', + icon: 'https://cdn.cunwuyun.cn/dvcp/announce/ic-routine.png', name: '小程序', msgType: 'app' }, @@ -433,9 +475,14 @@ export default { 'https://cdn.cunwuyun.cn/dvcp/announce/ic-web.png', ], tagList: [], + showAddWeb: false, webInfo: {}, - webListInfo: [] + webListInfo: [], + + showAddApp: false, + appInfo: {}, + appListInfo: [] } }, methods: { @@ -483,9 +530,13 @@ export default { uploadBtn(type) { if(type == 'web') { this.showAddWeb = true + this.webInfo = {} return false } if(type == 'app') { + this.showAddApp = true + this.appInfo = {} + // this.appInfo.media = [] return } let count = 9 - (this.files?.length || 0) - (this.checkedList?.length || 0) @@ -651,9 +702,18 @@ export default { } item.msgType = '4' }) - this.form.contents.push(...this.webListInfo) + //小程序 + this.appListInfo.map((item) => { + if(item.media && item.media.length) { + item.mediaId = this.appListInfo.media[0].media.mediaId + item.sysFileId = this.appListInfo.media[0].id + } + item.msgType = '5' + }) + this.form.contents.push(...this.appListInfo) + if(this.checkedList.length) { this.form.contents.push(...this.checkedList) } @@ -775,7 +835,27 @@ export default { }, removeWeb(index) { this.webListInfo.splice(index, 1) - } + }, + addApp() { + if(!this.appInfo.mpAppid) { + return this.$u.toast('请输入小程序appid') + } + if(!this.appInfo.mpPage) { + return this.$u.toast('请输入小程序page路径') + } + if(!this.appInfo.mpTitle) { + return this.$u.toast('请输入标题') + } + if(!this.appInfo.media.length) { + return this.$u.toast('请上传封面图') + } + + this.appListInfo.push(this.appInfo) + this.showAddApp = false + }, + removeApp(index) { + this.appListInfo.splice(index, 1) + }, }, watch: { @@ -1134,7 +1214,6 @@ export default { .upload_list { text-align: center; - width: 106px; height: 140px; display: flex; flex-wrap: nowrap;