From 07afc7bc380271ca9a9b2629b64ea7bc62a7d8c0 Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Wed, 14 Sep 2022 10:40:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=8F=E5=90=8C=E5=AE=A3=E5=8F=911.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppCooperationPropaganda.vue | 7 +- .../addPropaganda.vue | 37 +- .../AppCooperationPropaganda/circleDetail.vue | 482 ++++++++++++++++++ .../cooperationDetail.vue | 37 +- .../AppCooperationPropaganda/sendScoped.vue | 39 +- .../cooperationDetail.vue | 6 +- 6 files changed, 566 insertions(+), 42 deletions(-) create mode 100644 src/apps/AppCooperationPropaganda/circleDetail.vue diff --git a/src/apps/AppCooperationPropaganda/AppCooperationPropaganda.vue b/src/apps/AppCooperationPropaganda/AppCooperationPropaganda.vue index 223f549b..dfa2e7e9 100644 --- a/src/apps/AppCooperationPropaganda/AppCooperationPropaganda.vue +++ b/src/apps/AppCooperationPropaganda/AppCooperationPropaganda.vue @@ -150,7 +150,12 @@ export default { }, toDetail(item) { - uni.navigateTo({url: `./cooperationDetail?id=${item.id}&time=${item.createTime}`}) + if(this.tabIndex == 0) { + uni.navigateTo({url: `./cooperationDetail?id=${item.id}&time=${item.createTime}`}) + } else { + alert('hhh') + } + }, searchBtn() { this.current = 1 diff --git a/src/apps/AppCooperationPropaganda/addPropaganda.vue b/src/apps/AppCooperationPropaganda/addPropaganda.vue index f3712ef7..fd080821 100644 --- a/src/apps/AppCooperationPropaganda/addPropaganda.vue +++ b/src/apps/AppCooperationPropaganda/addPropaganda.vue @@ -110,7 +110,7 @@
-
+
{{ item.title }}
@@ -233,6 +233,24 @@ export default { ] } ], + uploadCircle: [ + { + title: '从本地上传', + list: [ + { + icon: 'https://cdn.cunwuyun.cn/dvcp/announce/img.png', + name: '图片', + msgType: 'image' + }, + { + icon: 'https://cdn.cunwuyun.cn/dvcp/announce/video.png', + name: '视频', + msgType: 'video' + }, + ] + } + ], + upload: [], midiaIds: [], sum: '' } @@ -317,14 +335,19 @@ export default { let formData = new FormData() formData.append('file', img) formData.append('type', type) - this.$http.post('/app/wxcp/upload/uploadFile', formData,{ + let url = '' + if(this.type=='Residents' || this.type=='ResidentsGroup') { + url = `/app/wxcp/upload/uploadFile` + } else if(this.type=='CircleOfFriends') { + url = `/app/wxcp/upload/uploadAttachment?attachmentType=1&mediaType=${type}` + } + this.$http.post(url, formData,{ withCredentials: false }).then((res) => { uni.hideLoading() if (res?.data) { this.$u.toast('上传成功!') this.showUpload = false - // this.files.push(res.data) this.files.push({ ...res.data.file, media: res.data.media, @@ -351,6 +374,7 @@ export default { confirm() { if(this.flag) return + this.form.contents = [] // 文本 const firstContent = [ { @@ -448,6 +472,9 @@ export default { if(res?.code == 0) { this.flag = false this.$u.toast("新增成功") + setTimeout(() => { + navigateBack() + }, 600) } }).catch((err)=>{ this.flag = false @@ -488,11 +515,15 @@ export default { this.forms.sendScope = this.form.sendScope this.forms.groupList = this.form.wxGroups this.sum = this.form.wxGroups.reduce((pre, cur) => pre + cur.customerCount, 0) + this.upload = this.uploadList } else if(this.type=='CircleOfFriends') { this.forms.taskType = 0 this.forms.sendScope = this.form.sendScope this.forms.executorList = this.form.wxGroups this.sum = this.form.wxGroups.reduce((pre, cur) => pre + cur.customerCount, 0) + this.upload = this.uploadCircle + } else if(this.type == 'ResidentsGroup') { + this.upload = this.uploadList } this.forms.taskTitle = this.form.taskTitle diff --git a/src/apps/AppCooperationPropaganda/circleDetail.vue b/src/apps/AppCooperationPropaganda/circleDetail.vue new file mode 100644 index 00000000..0e6aa2aa --- /dev/null +++ b/src/apps/AppCooperationPropaganda/circleDetail.vue @@ -0,0 +1,482 @@ + + + + + \ No newline at end of file diff --git a/src/apps/AppCooperationPropaganda/cooperationDetail.vue b/src/apps/AppCooperationPropaganda/cooperationDetail.vue index 17e4ea3a..a24e697a 100644 --- a/src/apps/AppCooperationPropaganda/cooperationDetail.vue +++ b/src/apps/AppCooperationPropaganda/cooperationDetail.vue @@ -1,6 +1,6 @@