Showing
4 changed files
with
12 additions
and
3 deletions
| @@ -86,6 +86,7 @@ Component({ | @@ -86,6 +86,7 @@ Component({ | ||
| 86 | let obj={ | 86 | let obj={ |
| 87 | id:_target.id, | 87 | id:_target.id, |
| 88 | name:this.data.roomlist[_target.index].name, | 88 | name:this.data.roomlist[_target.index].name, |
| 89 | + standard:this.data.roomlist[_target.index].standard, | ||
| 89 | action:'confirm' | 90 | action:'confirm' |
| 90 | } | 91 | } |
| 91 | this.triggerEvent('selectroom',obj) | 92 | this.triggerEvent('selectroom',obj) |
| @@ -137,6 +138,7 @@ Component({ | @@ -137,6 +138,7 @@ Component({ | ||
| 137 | let obj={ | 138 | let obj={ |
| 138 | id:r.id, | 139 | id:r.id, |
| 139 | name:r.name, | 140 | name:r.name, |
| 141 | + standard:r.standard, | ||
| 140 | action:'cancel' | 142 | action:'cancel' |
| 141 | } | 143 | } |
| 142 | this.triggerEvent('selectroom',obj) | 144 | this.triggerEvent('selectroom',obj) |
| @@ -189,11 +189,17 @@ Page({ | @@ -189,11 +189,17 @@ Page({ | ||
| 189 | } | 189 | } |
| 190 | this.reserve.sid=this.options.id | 190 | this.reserve.sid=this.options.id |
| 191 | this.reserve.ddate=util.timetouUnix(this.reserve.date+' '+this.reserve.time+':00'); | 191 | this.reserve.ddate=util.timetouUnix(this.reserve.date+' '+this.reserve.time+':00'); |
| 192 | + let num=0 | ||
| 193 | + this.data.seletroomlist.forEach(i=>{ | ||
| 194 | + num+=i.standard*1 | ||
| 195 | + }) | ||
| 192 | this.reserve.room_demand=JSON.stringify(this.data.seletroomlist) | 196 | this.reserve.room_demand=JSON.stringify(this.data.seletroomlist) |
| 193 | if(this.options.pnum){ | 197 | if(this.options.pnum){ |
| 194 | this.reserve.pnum = this.options.pnum; | 198 | this.reserve.pnum = this.options.pnum; |
| 199 | + }else{ | ||
| 200 | + this.reserve.pnum = num; | ||
| 195 | } | 201 | } |
| 196 | - | 202 | + |
| 197 | App.Reserve.GetReserveIsExits({sid:this.reserve.sid,ddate_solt:slots[this.reserve.section],ddate:this.reserve.ddate}).then((json)=>{ | 203 | App.Reserve.GetReserveIsExits({sid:this.reserve.sid,ddate_solt:slots[this.reserve.section],ddate:this.reserve.ddate}).then((json)=>{ |
| 198 | console.log(json) | 204 | console.log(json) |
| 199 | if(json.ret==200){ | 205 | if(json.ret==200){ |
| @@ -27,7 +27,7 @@ Page({ | @@ -27,7 +27,7 @@ Page({ | ||
| 27 | options:null, | 27 | options:null, |
| 28 | onLoad: function (options) { | 28 | onLoad: function (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人间"}] | 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 | + console.log('options',options) |
| 31 | options.room_demand=JSON.parse(decodeURIComponent(options.room_demand)) | 31 | options.room_demand=JSON.parse(decodeURIComponent(options.room_demand)) |
| 32 | this.options=options | 32 | this.options=options |
| 33 | this.GetSellerDetail(); | 33 | this.GetSellerDetail(); |
-
Please register or login to post a comment