From f8d2ac641e0f59ba497b5add08c5257d2cc15fc0 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Tue, 28 Dec 2021 14:23:00 +0800 Subject: [PATCH] 26121 --- .../3.0.0/AppVillageActivity/components/Add.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/3.0.0/AppVillageActivity/components/Add.vue b/packages/3.0.0/AppVillageActivity/components/Add.vue index 19c8da86..99febe81 100644 --- a/packages/3.0.0/AppVillageActivity/components/Add.vue +++ b/packages/3.0.0/AppVillageActivity/components/Add.vue @@ -46,7 +46,7 @@ - + { if (valid) { + const nowTime = new Date().getTime() + const beginTime = new Date(this.form.beginTime).getTime() + const endTime = new Date(this.form.endTime).getTime() + + if (beginTime < nowTime) { + return this.$message.error('活动开始时间不能早于当前时间') + } + if (endTime < beginTime) { + return this.$message.error('活动结束时间不能早于活动开始时间') + } + this.instance.post(`/app/appvillageactivityinfo/addOrUpdate`, { ...this.form, url: this.form.url.length ? JSON.stringify([{