Commit f5ca4176c1ae876ec7f8e7731c38e42f2ac9c680

Authored by vking
1 parent 64104151

blue ui other

@@ -101,7 +101,7 @@ Page({ @@ -101,7 +101,7 @@ Page({
101 hasDishesImage=true 101 hasDishesImage=true
102 dishes.image=dishes.image.replace('//qn.colorcun','//nosqn.colorcun') 102 dishes.image=dishes.image.replace('//qn.colorcun','//nosqn.colorcun')
103 }else{ 103 }else{
104 - hasDishesText:true 104 + hasDishesText=true
105 } 105 }
106 }) 106 })
107 } 107 }
@@ -34,6 +34,16 @@ Page({ @@ -34,6 +34,16 @@ Page({
34 this.setData({ 34 this.setData({
35 reserveDate: options.date ? options.date : util.unixtoTime(new Date() / 1000, 'YYYY-MM-DD'), 35 reserveDate: options.date ? options.date : util.unixtoTime(new Date() / 1000, 'YYYY-MM-DD'),
36 }) 36 })
  37 + if(options.act=='update'){//修改预订
  38 + //act=update&section=night&time=16:00&date=2020-12-27&sid=1&ddate=1609056000&room_demand=[{"id":"30","name":"6人间"},{"id":"31","name":"10人间"},{"id":"32","name":"12人间"}]
  39 + this.setData({
  40 + reserveDate: options.date,
  41 + seletroomlist:JSON.parse(options.room_demand),
  42 + reserveSection:options.section
  43 + })
  44 + this.reserve.section=options.section;
  45 + this.reserve.time=options.time;
  46 + }
37 }, 47 },
38 GetSellerDetail(){ 48 GetSellerDetail(){
39 let options=this.options 49 let options=this.options
@@ -182,7 +192,7 @@ Page({ @@ -182,7 +192,7 @@ Page({
182 if(this.options.pnum){ 192 if(this.options.pnum){
183 this.reserve.pnum = this.options.pnum; 193 this.reserve.pnum = this.options.pnum;
184 } 194 }
185 - wx.navigateTo({ 195 + wx.redirectTo({
186 url:util.http_build_query(this.reserve,'./submit') 196 url:util.http_build_query(this.reserve,'./submit')
187 }) 197 })
188 }, 198 },
@@ -26,7 +26,8 @@ Page({ @@ -26,7 +26,8 @@ Page({
26 */ 26 */
27 options:null, 27 options:null,
28 onLoad: function (options) { 28 onLoad: function (options) {
29 - console.log(options) 29 + //section=noon&time=11:00&date=2020-12-27&sid=1&ddate=1609038000&room_demand=[{"id":"30","name":"6人间"},{"id":"31","name":"10人间"}]
  30 + console.log(options)
30 options.room_demand=JSON.parse(decodeURIComponent(options.room_demand)) 31 options.room_demand=JSON.parse(decodeURIComponent(options.room_demand))
31 this.options=options 32 this.options=options
32 this.GetSellerDetail(); 33 this.GetSellerDetail();
@@ -197,7 +198,16 @@ Page({ @@ -197,7 +198,16 @@ Page({
197 return util.timetouUnix(ddate[0]+' '+rd[0]+':00')+'-'+util.timetouUnix(ddate[0]+' '+rd[1]+':00') 198 return util.timetouUnix(ddate[0]+' '+rd[0]+':00')+'-'+util.timetouUnix(ddate[0]+' '+rd[1]+':00')
198 }, 199 },
199 editorReserve(){ 200 editorReserve(){
200 - wx.navigateBack() 201 + console.log(this.options)
  202 + let params={
  203 + act:'update',
  204 + ...this.options,
  205 + }
  206 + params.room_demand=JSON.stringify(params.room_demand)
  207 + params.id=params.sid,
  208 + wx.redirectTo({
  209 + url:util.http_build_query(params,'/pages/reserve/reserve'),
  210 + })
201 }, 211 },
202 getphone(e){ 212 getphone(e){
203 console.log('getphone',e); 213 console.log('getphone',e);