Commit 08c0e65fb62f83498dcbf90483f43e932043d99a
1 parent
755652df
优化
Showing
2 changed files
with
13 additions
and
3 deletions
pages/user/user_spsy/user_spsy.js
| ... | ... | @@ -81,8 +81,18 @@ Page({ |
| 81 | 81 | let res = await getApp().request.promisePut("/api/weshop/users/grade/storage/update", { |
| 82 | 82 | data: data |
| 83 | 83 | }); |
| 84 | - console.log('门店更新'); | |
| 85 | - console.log(res); | |
| 84 | + if (res && res.data && res.data.code==0) { | |
| 85 | + let text='qr_code_object.StorageID' | |
| 86 | + this.setData({ | |
| 87 | + [text]:item.keyid | |
| 88 | + }) | |
| 89 | + }else{ | |
| 90 | + wx.showToast({ | |
| 91 | + title: '门店选择失败', | |
| 92 | + icon: 'none', | |
| 93 | + duration: 2000 | |
| 94 | + }) | |
| 95 | + } | |
| 86 | 96 | }else{ |
| 87 | 97 | wx.showToast({ |
| 88 | 98 | title: '门店选择失败', | ... | ... |
pages/user/user_spsy/user_spsy.wxml
| ... | ... | @@ -15,7 +15,7 @@ |
| 15 | 15 | <view wx:if="{{is_use}}" class="btn1">已使用</view> |
| 16 | 16 | <block wx:else> |
| 17 | 17 | <view wx:if="{{qr_code_object.StorageID}}" bindtap="show_hxm" data-type="1" class="btn">立即使用</view> |
| 18 | - <view wx:else bindtap="select_product" data-type="1" class="btn">选门店</view> | |
| 18 | + <view wx:else bindtap="select_product" data-type="1" class="btn">登记取货</view> | |
| 19 | 19 | </block> |
| 20 | 20 | <!-- <view bindtap="right_use" class="btn">立即使用</view></view> --> |
| 21 | 21 | </view> | ... | ... |