Commit c0b0cdab by liang ce

修改默认时间

parent 024fd7ec
......@@ -44,13 +44,9 @@ create.Page({
this.store.data.conflictPeople = []
this.store.data.participatorList = []
this.store.data.locationName = ''
// <<<<<<< HEAD
// this.store.data.participatorUserId = []
// this.update()
this.store.data.participatorUserId = [getApp().globalData.userid]
this.update()
var date = new Date();
var date = new Date('2020/02/20 13:31');
var y = date.getFullYear();
var m = (date.getMonth() + 1) < 10 ? "0" + (date.getMonth() + 1) : (date.getMonth() + 1);//获取当前月份的日期,不足10补0
var d = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();//获取当前几号,不足10补0
......@@ -59,8 +55,8 @@ create.Page({
var h = date.getHours()
var min = date.getMinutes();
this.setData({
time1: `${y}/${m}/${d} ${h < 10 ? "0" + date.getHours() : date.getHours()}:${min < 30 ? '30' : '00'}:00`,
time2: `${y}/${m}/${d} ${min < 30 ? (h + 1) < 10 ? "0" + (date.getHours() + 1) : date.getHours() + 1 : h < 10 ? "0" + date.getHours() : date.getHours()}:${min < 30 ? '00' : '30'}:00`,
time1: `${y}/${m}/${d} ${min<30 ? h<10?'0'+h:h : (h+1)<10?'0'+(h+1): h+1}:${min<30? '30': '00'}`,
time2: `${y}/${m}/${d} ${(h+1)<10?'0'+(h+1):h+1}:${min<30 ? '00':'30'}`,
week1: w,
week2: w,
type: event.type,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment