From 6eb7b5d13d59b90bd24b5e8621eeee73c1fb70df Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Tue, 28 Jun 2022 10:36:31 +0800 Subject: [PATCH] 30377 --- .../wxwork/AppMassNotification/components/Add.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/wxwork/AppMassNotification/components/Add.vue b/packages/wxwork/AppMassNotification/components/Add.vue index 81fa7e8f..cc3c8add 100644 --- a/packages/wxwork/AppMassNotification/components/Add.vue +++ b/packages/wxwork/AppMassNotification/components/Add.vue @@ -164,6 +164,7 @@ export default { videos: [], videoArr: [], files: [], + flag: false, rules: { deptList: [{required: true, message: '请选择发送范围'}], content: [{required: true, message: '请输入群发内容'}], @@ -229,11 +230,15 @@ export default { }) }, confirm() { + if(this.flag) return + if(!this.form.deptList.length) { return this.$message.error('请选择发送范围') } this.$refs.form.validate((valid) => { if (valid) { + this.flag = true + this.form.fileList = [] let contentList = [{ content: this.form.content, @@ -268,9 +273,10 @@ export default { accessUrl: item.url, } }) - } - + } + this.form.fileList = [...contentList, ...this.imgs, ...this.videos, ...this.files] + this.instance.post(`/app/pushmessage/addOrUpdate`, { ...this.form }).then(res => { @@ -279,7 +285,11 @@ export default { setTimeout(() => { this.cancel(true) }, 600) + } else { + this.flag = false } + }).catch(() => { + this.flex = false }) } })