Showing
4 changed files
with
27 additions
and
22 deletions
| @@ -112,11 +112,15 @@ Page({ | @@ -112,11 +112,15 @@ Page({ | ||
| 112 | template_code:'SMS_150579975', | 112 | template_code:'SMS_150579975', |
| 113 | template_param:JSON.stringify(this.smsData), | 113 | template_param:JSON.stringify(this.smsData), |
| 114 | rid:this.bookInfo.id | 114 | rid:this.bookInfo.id |
| 115 | - }).then(()=>{ | 115 | + }).then((res)=>{ |
| 116 | + if(res.ret!=200){ | ||
| 117 | + return util.toast(res.msg,'none'); | ||
| 118 | + } | ||
| 116 | util.toast('短信已发送'); | 119 | util.toast('短信已发送'); |
| 117 | this.setData({ | 120 | this.setData({ |
| 118 | hideSendsms:true, | 121 | hideSendsms:true, |
| 119 | }) | 122 | }) |
| 123 | + App.Reserve.SmsInfo({seller_id:this.bookInfo.seller.id},'clear') | ||
| 120 | }) | 124 | }) |
| 121 | }, | 125 | }, |
| 122 | copysms(){ | 126 | copysms(){ |
| @@ -26,11 +26,11 @@ http://qn.colorcun.com/custom/lite-yd/image/icon-cz.png | @@ -26,11 +26,11 @@ http://qn.colorcun.com/custom/lite-yd/image/icon-cz.png | ||
| 26 | width: 90%; | 26 | width: 90%; |
| 27 | margin: 0 auto; | 27 | margin: 0 auto; |
| 28 | color: #353535; | 28 | color: #353535; |
| 29 | - padding-top: 28rpx; | 29 | + padding-top: 34rpx; |
| 30 | } | 30 | } |
| 31 | .row{ | 31 | .row{ |
| 32 | font-size: 34rpx; | 32 | font-size: 34rpx; |
| 33 | - height: 80rpx; | 33 | + height: 106rpx; |
| 34 | border-bottom: 2rpx solid #F1F0F4; | 34 | border-bottom: 2rpx solid #F1F0F4; |
| 35 | } | 35 | } |
| 36 | .row .right{ | 36 | .row .right{ |
| @@ -14,27 +14,13 @@ Page({ | @@ -14,27 +14,13 @@ Page({ | ||
| 14 | /** | 14 | /** |
| 15 | * 生命周期函数--监听页面加载 | 15 | * 生命周期函数--监听页面加载 |
| 16 | */ | 16 | */ |
| 17 | + seller_id:0, | ||
| 17 | onLoad: function (options) { | 18 | onLoad: function (options) { |
| 18 | if(!options.seller_id){ | 19 | if(!options.seller_id){ |
| 19 | let enter_params=util.cache('enter_params'); | 20 | let enter_params=util.cache('enter_params'); |
| 20 | options.seller_id=enter_params.seller_id; | 21 | options.seller_id=enter_params.seller_id; |
| 21 | } | 22 | } |
| 22 | - App.Reserve.SmsInfo({seller_id:options.seller_id}).then(res=>{ | ||
| 23 | - if(res.ret==404){ | ||
| 24 | - res.data={ | ||
| 25 | - last_num:100, | ||
| 26 | - meals:[ | ||
| 27 | - {id:1,total:550,price_ave:0.09,price_old:50,price:50,discount:0}, | ||
| 28 | - {id:2,total:1200,price_ave:0.083,price_old:100,price:100,discount:0}, | ||
| 29 | - {id:3,total:3650,price_ave:0.082,price_old:328,price:300,discount:9.1}, | ||
| 30 | - ], | ||
| 31 | - }; | ||
| 32 | - } | ||
| 33 | - this.setData({ | ||
| 34 | - seller_id:options.seller_id, | ||
| 35 | - sms:res.data, | ||
| 36 | - }) | ||
| 37 | - }) | 23 | + this.seller_id=options.seller_id; |
| 38 | }, | 24 | }, |
| 39 | 25 | ||
| 40 | /** | 26 | /** |
| @@ -48,7 +34,22 @@ Page({ | @@ -48,7 +34,22 @@ Page({ | ||
| 48 | * 生命周期函数--监听页面显示 | 34 | * 生命周期函数--监听页面显示 |
| 49 | */ | 35 | */ |
| 50 | onShow: function () { | 36 | onShow: function () { |
| 51 | - | 37 | + App.Reserve.SmsInfo({seller_id:this.seller_id}).then(res=>{ |
| 38 | + if(res.ret==404){ | ||
| 39 | + res.data={ | ||
| 40 | + last_num:100, | ||
| 41 | + meals:[ | ||
| 42 | + {id:1,total:550,price_ave:0.09,price_old:50,price:50,discount:0}, | ||
| 43 | + {id:2,total:1200,price_ave:0.083,price_old:100,price:100,discount:0}, | ||
| 44 | + {id:3,total:3650,price_ave:0.082,price_old:328,price:300,discount:9.1}, | ||
| 45 | + ], | ||
| 46 | + }; | ||
| 47 | + } | ||
| 48 | + this.setData({ | ||
| 49 | + seller_id:this.seller_id, | ||
| 50 | + sms:res.data, | ||
| 51 | + }) | ||
| 52 | + }) | ||
| 52 | }, | 53 | }, |
| 53 | 54 | ||
| 54 | /** | 55 | /** |
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | <view class="lastNum">{{sms.last_num||0}}</view> | 7 | <view class="lastNum">{{sms.last_num||0}}</view> |
| 8 | <view class="lastNum-txt">条</view> | 8 | <view class="lastNum-txt">条</view> |
| 9 | </view> | 9 | </view> |
| 10 | - <formids class="button" url="/pages/book/setting/sms_buy?seller_id={{seller_id}}" open-type="redirect"> | 10 | + <formids class="button" url="/pages/book/setting/sms_buy?seller_id={{seller_id}}"> |
| 11 | <view class="txt Medium">立即充值</view> | 11 | <view class="txt Medium">立即充值</view> |
| 12 | <view class="icon-cz">特惠</view> | 12 | <view class="icon-cz">特惠</view> |
| 13 | </formids> | 13 | </formids> |
| @@ -29,7 +29,7 @@ | @@ -29,7 +29,7 @@ | ||
| 29 | </view> | 29 | </view> |
| 30 | <view class="action"> | 30 | <view class="action"> |
| 31 | <view class="tip Medium">3.充值说明</view> | 31 | <view class="tip Medium">3.充值说明</view> |
| 32 | - <view class="item">短信统一在订座商户小程序上进行充值,充值记录和 详情使用情况统一在小程序上查看;</view> | 32 | + <view class="item">短信统一在订座商户小程序上进行充值,充值记录和 详细使用情况统一在小程序上查看;</view> |
| 33 | </view> | 33 | </view> |
| 34 | </view> | 34 | </view> |
| 35 | 35 |
-
Please register or login to post a comment