From b5cc45f0781569d5beacda45f6a40f459277ab81 Mon Sep 17 00:00:00 2001 From: wanglei <1336977847@qq.com> Date: Tue, 23 Nov 2021 14:07:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=85=AC=E5=91=8A=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apps/AppNotification/components/add.vue | 22 +++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/apps/AppNotification/components/add.vue b/src/apps/AppNotification/components/add.vue index 45d6c7d2..1f0f89a4 100644 --- a/src/apps/AppNotification/components/add.vue +++ b/src/apps/AppNotification/components/add.vue @@ -61,7 +61,7 @@ - + @@ -92,6 +92,15 @@ }, userSelect: false, flag: null, + options: { + year: true, + month: true, + day: true, + hour: true, + minute: true, + second: true, + timestamp: true, + }, } }, watch:{ @@ -112,17 +121,10 @@ }, methods: { confirm(e){ - const date = new Date(e.value); - if(e.value< (Date.now())|0){ + if(e.timestamp< (Date.now()/1000)|0){ return this.$u.toast("发送时间不能小于当前时间"); } - const year = date.getFullYear(); - const month = date.getMonth() + 1; - const day = date.getDate(); - const hours = date.getHours(); - const minutes = date.getMinutes(); - this.form.releaseTime = `${year}-${month}-${day} ${hours}:${minutes}:00`; - this.show = false; + this.form.releaseTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}`; }, fileList(e){ this.form.files = e