Commit 1a6440148730db8c6b5a0ea0ab90ba1973cc98dc

Authored by liuxuqinfhp1220
1 parent fb4abdd5

no message

... ... @@ -104,22 +104,19 @@ Component({
//通知时段
tellsection(selectsection,action,index){
let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD');
let curtimestamp=new Date()/1000;
let curtimestamp=Number(new Date().getTime().toString().substr(0,10));
let sectionarr=this.data.sectionlist[index].sectiondur.split('-');
let starttimestamp=Number(util.timetouUnix(today+' '+sectionarr[1]+':00'));
let starttimestamp=Number(util.timetouUnix(today+' '+sectionarr[0]+':00'));
let endtimestamp=Number(util.timetouUnix(today+' '+sectionarr[1]+':00'));
let obj={
section:selectsection,
action:action
}
if(curtimestamp>=starttimestamp && curtimestamp<endtimestamp){
obj.time=sectionarr[1]
console.log(curtimestamp,starttimestamp)
if(curtimestamp<starttimestamp){
obj.time=sectionarr[0]
}else{
if(curtimestamp>=endtimestamp){
obj.time=sectionarr[1]
}else{
obj.time=sectionarr[0]
}
obj.time=sectionarr[1]
}
this.triggerEvent('selectsection',obj)
... ...