Showing
5 changed files
with
12 additions
and
7 deletions
.gitignore
0 → 100644
| 1 | +import App from '../../utils/api' | ||
| 2 | +import util from '../../utils/util.js' | ||
| 1 | Component({ | 3 | Component({ |
| 2 | properties:{ | 4 | properties:{ |
| 3 | item:Object | 5 | item:Object |
| @@ -22,13 +24,13 @@ Component({ | @@ -22,13 +24,13 @@ Component({ | ||
| 22 | // console.log(this.selectComponent('#tellist')) | 24 | // console.log(this.selectComponent('#tellist')) |
| 23 | this.selectComponent('#tellist').show(); | 25 | this.selectComponent('#tellist').show(); |
| 24 | }, | 26 | }, |
| 25 | - pay(){ | ||
| 26 | - console.log(this.data.order.id) | ||
| 27 | - App.Pay.WxPay({openid:util.cache('openid'),orderid:this.data.item.id}).then((json)=>{ | 27 | + pay(e){ |
| 28 | + let item = e.currentTarget.dataset['item']; | ||
| 29 | + App.PayOnline.CombineTransactionsByRecharge({openid:util.cache('openid'),id:item.id}).then((json)=>{ | ||
| 28 | console.log(json,'调起支付'); | 30 | console.log(json,'调起支付'); |
| 29 | if(json.ret==200){ | 31 | if(json.ret==200){ |
| 30 | wx.requestPayment({ | 32 | wx.requestPayment({ |
| 31 | - timeStamp: json.data.timeStamp, | 33 | + timeStamp: json.data.timeStamp + '', |
| 32 | nonceStr: json.data.nonceStr, | 34 | nonceStr: json.data.nonceStr, |
| 33 | package: json.data.package, | 35 | package: json.data.package, |
| 34 | signType: 'MD5', | 36 | signType: 'MD5', |
| @@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
| 30 | </block> | 30 | </block> |
| 31 | </block> | 31 | </block> |
| 32 | <block wx:if="{{item.status==0}}"> | 32 | <block wx:if="{{item.status==0}}"> |
| 33 | - <view class="order-info-button white-font bg-red-pink flex-cc pay-button" style="margin-right: 40rpx;">去支付</view> | 33 | + <view class="order-info-button white-font bg-red-pink flex-cc pay-button" bindtap="pay" data-item="{{item}}" style="margin-right: 40rpx;">去支付</view> |
| 34 | </block> | 34 | </block> |
| 35 | <navigator class="order-info-button red-pink-font pink-border flex-cc" url="../seller/menu?id={{item.sellerid}}" open-type="reLaunch">再来一单</navigator> | 35 | <navigator class="order-info-button red-pink-font pink-border flex-cc" url="../seller/menu?id={{item.sellerid}}" open-type="reLaunch">再来一单</navigator> |
| 36 | </view> | 36 | </view> |
| @@ -49,11 +49,11 @@ Page({ | @@ -49,11 +49,11 @@ Page({ | ||
| 49 | }, | 49 | }, |
| 50 | pay(){ | 50 | pay(){ |
| 51 | console.log(this.data.order.id) | 51 | console.log(this.data.order.id) |
| 52 | - App.Pay.WxPay({openid:util.cache('openid'),orderid:this.data.order.id}).then((json)=>{ | 52 | + App.PayOnline.CombineTransactionsByRecharge({openid:util.cache('openid'),id:this.data.order.id}).then((json)=>{ |
| 53 | console.log(json,'调起支付'); | 53 | console.log(json,'调起支付'); |
| 54 | if(json.ret==200){ | 54 | if(json.ret==200){ |
| 55 | wx.requestPayment({ | 55 | wx.requestPayment({ |
| 56 | - timeStamp: json.data.timeStamp, | 56 | + timeStamp: json.data.timeStamp + '', |
| 57 | nonceStr: json.data.nonceStr, | 57 | nonceStr: json.data.nonceStr, |
| 58 | package: json.data.package, | 58 | package: json.data.package, |
| 59 | signType: 'MD5', | 59 | signType: 'MD5', |
| @@ -114,6 +114,7 @@ export default { | @@ -114,6 +114,7 @@ export default { | ||
| 114 | //创建订单 | 114 | //创建订单 |
| 115 | 'App.Orders.CreateOrder':null, | 115 | 'App.Orders.CreateOrder':null, |
| 116 | 'App.Pay.WxPay':null, | 116 | 'App.Pay.WxPay':null, |
| 117 | + 'App.PayOnline.CombineTransactionsByRecharge':null, | ||
| 117 | //获取订单详情 | 118 | //获取订单详情 |
| 118 | 'App.Orders.GetOrderById':null, | 119 | 'App.Orders.GetOrderById':null, |
| 119 | //获取订单列表 | 120 | //获取订单列表 |
-
Please register or login to post a comment