Commit 8b48af05f6249416da7c9c84aea0a9c35b0bff15

Authored by vking
1 parent d7312dc5

lxq 修改ddate

@@ -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';
@@ -96,18 +96,19 @@ Page({ @@ -96,18 +96,19 @@ Page({
96 */ 96 */
97 onShow: function () { 97 onShow: function () {
98 this.selectComponent('#getpos').getPos(); 98 this.selectComponent('#getpos').getPos();
99 - if(this.data.reserveDate){//后退进入等情况刷新时段  
100 - this.setData({  
101 - reserveDate:this.data.reserveDate  
102 - })  
103 - } 99 + if(this.data.reserveDate){//后退进入等情况刷新时段
  100 + this.setData({
  101 + reserveDate:this.data.reserveDate
  102 + })
  103 + }
104 //已经完成预订的情况---清除日期、时段、选中包间 104 //已经完成预订的情况---清除日期、时段、选中包间
105 if(wx.getStorageSync('order')){ 105 if(wx.getStorageSync('order')){
106 this.setData({ 106 this.setData({
107 - seletroomlist:[] 107 + seletroomlist:[],
108 }) 108 })
109 wx.removeStorageSync('order') 109 wx.removeStorageSync('order')
110 } 110 }
  111 +
111 }, 112 },
112 113
113 /** 114 /**