|
...
|
...
|
@@ -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)
|
|
|
|
|
...
|
...
|
|