[版本更新]
This commit is contained in:
@@ -114,10 +114,16 @@ Page({
|
||||
* 支付提交
|
||||
*/
|
||||
orderPay() {
|
||||
wx.$api.exchange.payments(this.data.pay.orderId).then(res=>{
|
||||
let url = ''
|
||||
if(this.data.orderType == 'welfare' || this.data.orderType == 'welfareGoods') url = wx.$api.exchange.welfarePay
|
||||
if(this.data.orderType == 'rights' || this.data.orderType == 'rightsCoupons') url = wx.$api.exchange.rightsPay
|
||||
url(this.data.pay.orderId).then(res=>{
|
||||
// payTips为1的时候为微信支付
|
||||
if(this.data.pay.payTips == 1) {
|
||||
wx.$api.index.wechat(res.data.trade_no).then(res=>{
|
||||
let wechaUrl = ''
|
||||
if(this.data.orderType == 'welfare' || this.data.orderType == 'welfareGoods') wechaUrl = wx.$api.index.fridayPay
|
||||
if(this.data.orderType == 'rights' || this.data.orderType == 'rightsCoupons') wechaUrl = wx.$api.index.wechat
|
||||
wechaUrl(res.data.trade_no).then(res=>{
|
||||
let payInfo = JSON.parse(res.data)
|
||||
wx.requestPayment({
|
||||
timeStamp: payInfo.timeStamp,
|
||||
@@ -132,16 +138,14 @@ Page({
|
||||
icon : 'success'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
wx.reLaunch({
|
||||
url: '/pages/coupon/coupon?type=couponPublic'
|
||||
})
|
||||
// 获取商品活动订单
|
||||
this.orderInfo();
|
||||
},2000)
|
||||
}
|
||||
},
|
||||
fail : res=>{
|
||||
wx.redirectTo({
|
||||
url: '/pages/order/order?stateType=unpay'
|
||||
})
|
||||
// 获取商品活动订单
|
||||
this.orderInfo();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user