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