Showing
4 changed files
with
18 additions
and
9 deletions
| @@ -16,7 +16,7 @@ Component({ | @@ -16,7 +16,7 @@ Component({ | ||
| 16 | let phoneNumber=JSON.parse(json.data).phoneNumber; | 16 | let phoneNumber=JSON.parse(json.data).phoneNumber; |
| 17 | this.triggerEvent('getphone',{ret:200,phone:phoneNumber}) | 17 | this.triggerEvent('getphone',{ret:200,phone:phoneNumber}) |
| 18 | }else{ | 18 | }else{ |
| 19 | - this.triggerEvent('getphone',{ret:json.ret,msg:jaon.data}) | 19 | + this.triggerEvent('getphone',{ret:json.ret,msg:json.data}) |
| 20 | } | 20 | } |
| 21 | }) | 21 | }) |
| 22 | } | 22 | } |
| @@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
| 26 | <view class="icon"> | 26 | <view class="icon"> |
| 27 | <icon type="warn" size="47" color="#999999"/> | 27 | <icon type="warn" size="47" color="#999999"/> |
| 28 | </view> | 28 | </view> |
| 29 | - <view class="title Medium">{{detail.msg||'包间已订满'}}</view> | 29 | + <view class="title Medium">{{detail.cancel||'包间已订满'}}</view> |
| 30 | </block> | 30 | </block> |
| 31 | <block wx:else=""> | 31 | <block wx:else=""> |
| 32 | <view class="icon"> | 32 | <view class="icon"> |
| @@ -26,10 +26,12 @@ Page({ | @@ -26,10 +26,12 @@ Page({ | ||
| 26 | this.options=options | 26 | this.options=options |
| 27 | this.GetSellerDetail(); | 27 | this.GetSellerDetail(); |
| 28 | App.Customer.GetCustomerInfo().then(res=>{ | 28 | App.Customer.GetCustomerInfo().then(res=>{ |
| 29 | - this.user = res.data | ||
| 30 | - this.setData({ | ||
| 31 | - user: res.data, | ||
| 32 | - }) | 29 | + if(res.data){ |
| 30 | + this.user = res.data | ||
| 31 | + this.setData({ | ||
| 32 | + user: res.data, | ||
| 33 | + }) | ||
| 34 | + } | ||
| 33 | }) | 35 | }) |
| 34 | }, | 36 | }, |
| 35 | 37 | ||
| @@ -152,7 +154,14 @@ Page({ | @@ -152,7 +154,14 @@ Page({ | ||
| 152 | editorReserve(){ | 154 | editorReserve(){ |
| 153 | wx.navigateBack() | 155 | wx.navigateBack() |
| 154 | }, | 156 | }, |
| 155 | - getphoneNumber(e){ | ||
| 156 | - console.log('getphoneNumber',e); | 157 | + getphone(e){ |
| 158 | + console.log('getphone',e); | ||
| 159 | + if(e.detail.ret!=200){ | ||
| 160 | + return util.toast('获取失败,请手动填写','none'); | ||
| 161 | + } | ||
| 162 | + this.user.phone=e.detail.phone | ||
| 163 | + this.setData({ | ||
| 164 | + user: this.user | ||
| 165 | + }) | ||
| 157 | }, | 166 | }, |
| 158 | }) | 167 | }) |
| @@ -50,7 +50,7 @@ | @@ -50,7 +50,7 @@ | ||
| 50 | placeholder-class="input-pl"/> | 50 | placeholder-class="input-pl"/> |
| 51 | <view class="flex-rr"> | 51 | <view class="flex-rr"> |
| 52 | <!-- 一键获取 --> | 52 | <!-- 一键获取 --> |
| 53 | - <phone bindgetphoneNumber="getphoneNumber"> | 53 | + <phone bindgetphone="getphone"> |
| 54 | <view class="smooth white-font get-phone flex-vc" style="font-size:28rpx;">一键获取</view> | 54 | <view class="smooth white-font get-phone flex-vc" style="font-size:28rpx;">一键获取</view> |
| 55 | </phone> | 55 | </phone> |
| 56 | </view> | 56 | </view> |
-
Please register or login to post a comment