From dc44b85d6943bd45a8b7c458eda693a8c65b97a7 Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Tue, 14 Jun 2022 09:31:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=B8=80=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppMassNotification/components/Add.vue | 51 ++++--------------- 1 file changed, 9 insertions(+), 42 deletions(-) diff --git a/core/apps/AppMassNotification/components/Add.vue b/core/apps/AppMassNotification/components/Add.vue index fb7c453a..4e3895c5 100644 --- a/core/apps/AppMassNotification/components/Add.vue +++ b/core/apps/AppMassNotification/components/Add.vue @@ -61,25 +61,15 @@ placeholder="选择日期时间"> - - - - @@ -117,7 +107,7 @@ style="width: 100%; height:100%; object-fit: fill;" muted controls="controls"> - + @@ -160,20 +150,12 @@ accessImgurl: "", accessTitle: "", accessUrl: "", - // content: "", + content: "", contentType: "", createdA: 0, mediaId: "" } ], - // file: {}, - // accessUrl: '', - // accessDesc: '', - // accessTitle: '', - // accessImgurl: '', - // accessAppid: '', - // mediaId: '', - // name: '', }, tags: [], subTags: {}, @@ -182,16 +164,13 @@ imgList: [], videoList: [], filesList: [], - files: [], areaRootId: '', - accessUrlAll: [], users: [], rules: { content: [{ required: true, message: '请输入群发内容'}], sendType: [{ required: true, message: '请选择群发方式' }], sendTime: [{ required: true, message: '请选择群发时间' }], }, - } }, @@ -252,28 +231,16 @@ this.instance.post(`/app/pushmessage/detail?id=${this.params.id}`).then(res => { if (res?.data) { this.data = res.data - this.accessUrlAll = [{url: res.data.accessUrl}] } }) }, - onTypeChange () { - this.files = [] - this.form.file.url = '' - this.form.accessUrl = '' - this.form.accessDesc = '' - this.form.accessTitle = '' - this.form.accessImgurl = '' - this.form.accessAppid = '' - this.$forceUpdate() - }, - confirm () { this.$refs.form.validate((valid) => { if (valid) { this.form.fileList = [] - var contentList = { + let contentList = { content: this.form.content, contentType: 'text' } @@ -281,30 +248,30 @@ this.form.fileList.push(contentList) if(this.imgList.length) { - var info = { + let item = { contentType: 'image', mediaId: this.imgList[0].media.mediaId, accessUrl: this.imgList[0].url } - this.form.fileList.push(info) + this.form.fileList.push(item) } if(this.videoList.length) { - var info = { + let item = { contentType: 'video', mediaId: this.videoList[0].media.mediaId, accessUrl: this.videoList[0].url } - this.form.fileList.push(info) + this.form.fileList.push(item) } if(this.filesList.length) { - var info = { + let item = { contentType: 'file', mediaId: this.filesList[0].media.mediaId, accessUrl: this.filesList[0].url } - this.form.fileList.push(info) + this.form.fileList.push(item) } this.instance.post(`/app/pushmessage/addOrUpdate`, {