From df3c8394458801f2d66a982e93dc4443e4c7249c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8A=B1=E6=9C=89=E6=B8=85=E9=A6=99=E6=9C=88=E6=9C=89?= =?UTF-8?q?=E9=98=B4?= <185154740@qq.com> Date: Fri, 7 Jan 2022 16:33:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppVillageDiscuss/Add.vue | 34 ++++++++++++------------------ 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/src/apps/AppVillageDiscuss/Add.vue b/src/apps/AppVillageDiscuss/Add.vue index 01b903f9..d24acc91 100644 --- a/src/apps/AppVillageDiscuss/Add.vue +++ b/src/apps/AppVillageDiscuss/Add.vue @@ -152,23 +152,17 @@ export default { if (!this.form.areaId) { return this.$u.toast('请输入发布地区') } - // if (!this.form.discussDeadline) { - // return this.$u.toast('请选择议事截止时间') - // } - // if (!this.form.publicityDeadline) { - // return this.$u.toast('请选择公示截止时间') - // } - if (this.form.type == 1) { - if (this.opts == 0) { - if (!this.form.contents) { - return this.$u.toast('请输入单选选项') - } - } - if (this.opts == 1) { - if (!this.list.length > 0) { - return this.$u.toast('请输入多选选项') - } - } + if (!this.form.discussDeadline) { + return this.$u.toast('请选择议事截止时间') + } + if (!this.form.publicityDeadline) { + return this.$u.toast('请选择公示截止时间') + } + if (this.form.type == 1 && this.opts == 0 && !this.form.contents) { + return this.$u.toast('请输入单选选项') + } + if (this.opts == 1 && !this.list.length) { + return this.$u.toast('请输入多选选项') } if (this.opts == 1) { @@ -209,11 +203,11 @@ export default { }, addOpts() { - if (!this.content) { + if (!this.contents) { return this.$u.toast('请输入选项内容') } - this.list.push(this.content) - this.content = '' + this.list.push(this.contents) + this.contents = '' }, del(index) {