console.log(reminder.time.getTime());
console.log(reminder.isAllDay);
if(reminder.isAllDay){
reminder.time.setHours(7,0,0,0);
}
const unixTimestamp = Math.floor(reminder.time.getTime() / 1000);
console.log(unixTimestamp);
uni.addPhoneCalendar({
title: reminder.text,
startTime: unixTimestamp,
allDay: reminder.isAllDay,
success(res) {
console.log("success:"+JSON.stringify(res));
uni.showToast({ title: '日历事件创建成功' });
},
fail(res) {
console.log("fail:"+JSON.stringify(res))
uni.showToast({ title: '日历创建失败' });
}
});
