|
@@ -54,10 +54,10 @@ Page({
|
|
|
console.log(error, "error");
|
|
|
}
|
|
|
},
|
|
|
- onPayError() {
|
|
|
+ onPayError(message?: string) {
|
|
|
wx.hideLoading()
|
|
|
wx.showToast({
|
|
|
- title: '支付失败',
|
|
|
+ title: message || '支付取消',
|
|
|
icon: 'none'
|
|
|
})
|
|
|
},
|
|
@@ -132,7 +132,7 @@ Page({
|
|
|
if(res.data.code === 200) {
|
|
|
this.onPay(paymentType, res.data.data.reqParams, orderNo)
|
|
|
} else {
|
|
|
- this.onPayError()
|
|
|
+ this.onPayError(res.data.message)
|
|
|
}
|
|
|
},
|
|
|
fail: () => {
|
|
@@ -161,10 +161,11 @@ Page({
|
|
|
},
|
|
|
fail(ressonInfo) {
|
|
|
console.log('支付失败', ressonInfo)
|
|
|
- // wx.showToast({ title: '支付失败!', icon: 'none' });
|
|
|
that.onPayError()
|
|
|
- wx.redirectTo({
|
|
|
- url: '/pages/orders/order-result?orderNo=' + orderNo
|
|
|
+ const goodsInfo = that.data.goodsInfo
|
|
|
+ goodsInfo.orderNo = orderNo
|
|
|
+ that.setData({
|
|
|
+ goodsInfo
|
|
|
})
|
|
|
}
|
|
|
})
|