|
...
|
...
|
@@ -21,6 +21,7 @@ Component({ |
|
|
|
let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD');
|
|
|
|
this.getsectionlist();
|
|
|
|
if(today==newdate){
|
|
|
|
console.log('xxxxxxx')
|
|
|
|
this.markoversection();
|
|
|
|
if(this.data.section){
|
|
|
|
this.changesectionstyle(this.data.section);
|
|
...
|
...
|
@@ -72,13 +73,12 @@ Component({ |
|
|
|
let interval=[];
|
|
|
|
sectionlist.forEach((v,i)=>{
|
|
|
|
let sectionarr=v.sectiondur.split('-');
|
|
|
|
if(curtimestamp>=new Date(today+' '+sectionarr[1]+':00')/1000){
|
|
|
|
if(curtimestamp>Number(util.timetouUnix(today+' '+sectionarr[1]+':00'))){
|
|
|
|
v.overdate=true
|
|
|
|
}
|
|
|
|
if(!v.overdate){
|
|
|
|
let intervaldur=curtimestamp-new Date(today+' '+sectionarr[0]+':00')/1000;
|
|
|
|
let intervaldur=curtimestamp-Number(util.timetouUnix(today+' '+sectionarr[1]+':00'));
|
|
|
|
interval.push({
|
|
|
|
intervaldur:intervaldur,
|
|
|
|
index:i
|
|
|
|
})
|
|
|
|
}
|
|
...
|
...
|
@@ -106,8 +106,8 @@ Component({ |
|
|
|
let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD');
|
|
|
|
let curtimestamp=new Date()/1000;
|
|
|
|
let sectionarr=this.data.sectionlist[index].sectiondur.split('-');
|
|
|
|
let starttimestamp=new Date(today+' '+sectionarr[0]+':00')/1000;
|
|
|
|
let endtimestamp=new Date(today+' '+sectionarr[1]+':00')/1000;
|
|
|
|
let starttimestamp=Number(util.timetouUnix(today+' '+sectionarr[1]+':00'));
|
|
|
|
let endtimestamp=Number(util.timetouUnix(today+' '+sectionarr[1]+':00'));
|
|
|
|
let obj={
|
|
|
|
section:selectsection,
|
|
|
|
action:action
|
...
|
...
|
|