|
@@ -33,6 +33,13 @@ Component({ |
|
@@ -33,6 +33,13 @@ Component({ |
|
33
|
action:'defalut',
|
33
|
action:'defalut',
|
|
34
|
time:this.data.sectionlist[0].sectiondur.split('-')[0]
|
34
|
time:this.data.sectionlist[0].sectiondur.split('-')[0]
|
|
35
|
}
|
35
|
}
|
|
|
|
36
|
+ if(this.data.section){
|
|
|
|
37
|
+ this.data.sectionlist.forEach((v,i)=>{
|
|
|
|
38
|
+ if(this.data.section==v.section){
|
|
|
|
39
|
+ obj.time=v.sectiondur.split('-')[0]
|
|
|
|
40
|
+ }
|
|
|
|
41
|
+ })
|
|
|
|
42
|
+ }
|
|
36
|
this.triggerEvent('selectsection',obj)
|
43
|
this.triggerEvent('selectsection',obj)
|
|
37
|
}
|
44
|
}
|
|
38
|
}
|
45
|
}
|
|
@@ -115,9 +122,11 @@ Component({ |
|
@@ -115,9 +122,11 @@ Component({ |
|
115
|
let _target=e.currentTarget.dataset;
|
122
|
let _target=e.currentTarget.dataset;
|
|
116
|
this.changesectionstyle(_target.section);
|
123
|
this.changesectionstyle(_target.section);
|
|
117
|
this.tellsection(_target.section,'click',_target.index);
|
124
|
this.tellsection(_target.section,'click',_target.index);
|
|
|
|
125
|
+ console.log(_target.index);
|
|
118
|
},
|
126
|
},
|
|
119
|
//通知时段
|
127
|
//通知时段
|
|
120
|
tellsection(selectsection,action,index){
|
128
|
tellsection(selectsection,action,index){
|
|
|
|
129
|
+ console.log(index);
|
|
121
|
let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD');
|
130
|
let today=util.unixtoTime(new Date()/1000,'YYYY-MM-DD');
|
|
122
|
let curtimestamp=new Date()/1000;
|
131
|
let curtimestamp=new Date()/1000;
|
|
123
|
let sectionarr=this.data.sectionlist[index].sectiondur.split('-');
|
132
|
let sectionarr=this.data.sectionlist[index].sectiondur.split('-');
|
|
@@ -149,6 +158,7 @@ Component({ |
|
@@ -149,6 +158,7 @@ Component({ |
|
149
|
}
|
158
|
}
|
|
150
|
if(selectsection==v.section){
|
159
|
if(selectsection==v.section){
|
|
151
|
curindex=i;
|
160
|
curindex=i;
|
|
|
|
161
|
+
|
|
152
|
}
|
162
|
}
|
|
153
|
})
|
163
|
})
|
|
154
|
let curkey='sectionlist['+curindex+'].isselected';
|
164
|
let curkey='sectionlist['+curindex+'].isselected';
|