Commit bdc67407d491ca6f14a6440ab9eef08558d71aa8

Authored by liuxuqinfhp1220
1 parent 4f3cbc93

no message

@@ -28,9 +28,6 @@ Component({ @@ -28,9 +28,6 @@ Component({
28 this.getroomtype(); 28 this.getroomtype();
29 this.date=newdate; 29 this.date=newdate;
30 this.section=newsection; 30 this.section=newsection;
31 - }else{  
32 - this.date=newdate;  
33 - this.section=newsection;  
34 } 31 }
35 }else{ 32 }else{
36 this.getroomtype(); 33 this.getroomtype();
@@ -21,13 +21,16 @@ Component({ @@ -21,13 +21,16 @@ Component({
21 console.log('room',newdate,newsection) 21 console.log('room',newdate,newsection)
22 if(newdate && newsection){ 22 if(newdate && newsection){
23 if(this.date && this.section){ 23 if(this.date && this.section){
24 - if(newdate!=newdate && this.section!=newsection){ 24 + if(newdate!=this.date || this.section!=newsection){
25 this.setData({ 25 this.setData({
26 seletroomlist:[] 26 seletroomlist:[]
27 }) 27 })
28 this.date=newdate; 28 this.date=newdate;
29 this.section=newsection; 29 this.section=newsection;
30 } 30 }
  31 + }else{
  32 + this.date=newdate;
  33 + this.section=newsection;
31 } 34 }
32 35
33 } 36 }
@@ -280,6 +280,7 @@ Page({ @@ -280,6 +280,7 @@ Page({
280 this.setData({ 280 this.setData({
281 reserveSection:e.detail.section, 281 reserveSection:e.detail.section,
282 }) 282 })
  283 + this.reserve.selectroom=[];
283 clearTimeout(t); 284 clearTimeout(t);
284 },0) 285 },0)
285 286
@@ -289,14 +290,15 @@ Page({ @@ -289,14 +290,15 @@ Page({
289 //包间类型改变 290 //包间类型改变
290 selectroom(e){ 291 selectroom(e){
291 console.log(e) 292 console.log(e)
292 - this.reserve.room_demand=JSON.stringify(e.detail.selectroom); 293 + this.reserve.selectroom=e.detail.selectroom;
293 }, 294 },
294 complete(){ 295 complete(){
295 - if(!this.reserve.room_demand || (this.reserve.room_demand && this.reserve.room_demand.length==0)){ 296 + if(!this.reserve.selectroom || (this.reserve.selectroom && this.reserve.selectroom.length==0)){
296 return util.toast('请选择包间类型','none'); 297 return util.toast('请选择包间类型','none');
297 } 298 }
298 this.reserve.sid=this.options.id 299 this.reserve.sid=this.options.id
299 this.reserve.ddate=util.timetouUnix(this.reserve.date+' '+this.reserve.time+':00'); 300 this.reserve.ddate=util.timetouUnix(this.reserve.date+' '+this.reserve.time+':00');
  301 + this.reserve.room_demand=JSON.stringify(this.reserve.selectroom)
300 wx.navigateTo({ 302 wx.navigateTo({
301 url:util.http_build_query(this.reserve,'./submit') 303 url:util.http_build_query(this.reserve,'./submit')
302 }) 304 })
@@ -331,6 +333,7 @@ Page({ @@ -331,6 +333,7 @@ Page({
331 }) 333 })
332 } 334 }
333 this.reserve.date=e.detail.date; 335 this.reserve.date=e.detail.date;
  336 + this.reserve.selectroom=[];
334 this.setData({ 337 this.setData({
335 reserveDate:e.detail.date, 338 reserveDate:e.detail.date,
336 hasFullHouse:false, 339 hasFullHouse:false,