|
...
|
...
|
@@ -21,10 +21,9 @@ Component({ |
|
|
|
let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD');
|
|
|
|
this.getsectionlist();
|
|
|
|
if(today==newdate){
|
|
|
|
this.markoversection();
|
|
|
|
if(this.data.section){
|
|
|
|
this.changesectionstyle(this.data.section);
|
|
|
|
}else{
|
|
|
|
this.markoversection();
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
if(this.data.section){
|
|
...
|
...
|
@@ -34,7 +33,7 @@ Component({ |
|
|
|
}
|
|
|
|
let obj={
|
|
|
|
section:this.data.section ? this.data.section : this.data.sectionlist[0].section,
|
|
|
|
action:'defalut',
|
|
|
|
action:this.data.section ? 'click' :'defalut',
|
|
|
|
time:this.data.sectionlist[0].sectiondur.split('-')[0]
|
|
|
|
}
|
|
|
|
this.triggerEvent('selectsection',obj)
|
|
...
|
...
|
@@ -85,9 +84,11 @@ Component({ |
|
|
|
}
|
|
|
|
})
|
|
|
|
console.log(interval)
|
|
|
|
if(interval.length>0){
|
|
|
|
sectionlist[interval[0].index].isselected=true;
|
|
|
|
this.tellsection(sectionlist[interval[0].index].section,'defalut',interval[0].index)
|
|
|
|
if(!this.data.section){
|
|
|
|
if(interval.length>0){
|
|
|
|
sectionlist[interval[0].index].isselected=true;
|
|
|
|
this.tellsection(sectionlist[interval[0].index].section,'defalut',interval[0].index)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.setData({
|
|
|
|
sectionlist:sectionlist
|
...
|
...
|
|