Showing
2 changed files
with
9 additions
and
4 deletions
| @@ -140,7 +140,7 @@ Page({ | @@ -140,7 +140,7 @@ Page({ | ||
| 140 | path:path, | 140 | path:path, |
| 141 | } | 141 | } |
| 142 | }, | 142 | }, |
| 143 | - reserve(){ | 143 | + reserveEvent(){ |
| 144 | if(this.data.hasOnlineReserve){ | 144 | if(this.data.hasOnlineReserve){ |
| 145 | return this.setData({ | 145 | return this.setData({ |
| 146 | activeTab:'reserve' | 146 | activeTab:'reserve' |
| @@ -292,16 +292,21 @@ Page({ | @@ -292,16 +292,21 @@ Page({ | ||
| 292 | } | 292 | } |
| 293 | }, | 293 | }, |
| 294 | selectdate(e){//日期改变 | 294 | selectdate(e){//日期改变 |
| 295 | - console.log(e); | 295 | + if(e.detail.action==401){//无可用桌位 |
| 296 | + return; | ||
| 297 | + } | ||
| 298 | + console.log('selectdate',e); | ||
| 296 | if(e.detail.overdate==1){//今天之前 | 299 | if(e.detail.overdate==1){//今天之前 |
| 297 | return this.setData({ | 300 | return this.setData({ |
| 298 | hasFullHouse:true, | 301 | hasFullHouse:true, |
| 302 | + fullHouseMsg:'请选择今天之后的日期', | ||
| 299 | }) | 303 | }) |
| 300 | } | 304 | } |
| 301 | this.reserve.date=e.detail.date; | 305 | this.reserve.date=e.detail.date; |
| 302 | this.setData({ | 306 | this.setData({ |
| 303 | reserveDate:e.detail.date, | 307 | reserveDate:e.detail.date, |
| 304 | hasFullHouse:false, | 308 | hasFullHouse:false, |
| 309 | + fullHouseMsg:'今日所有包间已订满', | ||
| 305 | }) | 310 | }) |
| 306 | } | 311 | } |
| 307 | }) | 312 | }) |
| @@ -183,7 +183,7 @@ | @@ -183,7 +183,7 @@ | ||
| 183 | </userinfo> | 183 | </userinfo> |
| 184 | </view> | 184 | </view> |
| 185 | <view class="reserve"> | 185 | <view class="reserve"> |
| 186 | - <formids class="flex-vc" bindclick="reserve" id="reserve-button"> | 186 | + <formids class="flex-vc" bindclick="reserveEvent" id="reserve-button"> |
| 187 | <view class="text">{{hasOnlineReserve?'包间预订':'联系餐厅'}}</view> | 187 | <view class="text">{{hasOnlineReserve?'包间预订':'联系餐厅'}}</view> |
| 188 | </formids> | 188 | </formids> |
| 189 | </view> | 189 | </view> |
| @@ -201,6 +201,6 @@ | @@ -201,6 +201,6 @@ | ||
| 201 | <view class="reserve-time Semibold">可订时间</view> | 201 | <view class="reserve-time Semibold">可订时间</view> |
| 202 | <dur seller="{{seller}}" wx:if="{{!hasFullHouse}}" | 202 | <dur seller="{{seller}}" wx:if="{{!hasFullHouse}}" |
| 203 | date="{{reserveDate}}" bindselecttime="selecttime"></dur> | 203 | date="{{reserveDate}}" bindselecttime="selecttime"></dur> |
| 204 | - <view class="hasFullHouse Semibold flex-vc" wx:if="{{hasFullHouse}}">今日所有包间已订满</view> | 204 | + <view class="hasFullHouse Semibold flex-vc" wx:if="{{hasFullHouse}}">{{fullHouseMsg}}</view> |
| 205 | </view> | 205 | </view> |
| 206 | </view> | 206 | </view> |
-
Please register or login to post a comment