|
@@ -17,7 +17,7 @@ Page({
|
|
|
onLoad: function (options) {
|
|
|
let pay_sn = options.pay_sn;
|
|
|
this.getDatas(pay_sn);
|
|
|
- console.log(111);
|
|
|
+ console.log('pay_sn:', pay_sn);
|
|
|
},
|
|
|
getDatas(pay_sn) {
|
|
|
let self = this;
|
|
@@ -83,24 +83,22 @@ Page({
|
|
|
signType: param.signType, //微信签名方式:
|
|
|
paySign: param.paySign, //微信签名
|
|
|
success: function (res) {
|
|
|
- // wx.showToast({
|
|
|
- // icon: 'none',
|
|
|
- // title: res,
|
|
|
- // duration: 2000
|
|
|
- // })
|
|
|
- wx.reLaunch({
|
|
|
- url: "/pages/index/index"
|
|
|
+ wx.redirectTo({
|
|
|
+ url: "/pages/order_tabs/orderTabs?state_type=state_pay"
|
|
|
})
|
|
|
- console.log("成功:" + res);
|
|
|
+
|
|
|
+ console.log("成功:", res);
|
|
|
console.log('支付成功')
|
|
|
},
|
|
|
fail: function (res) {
|
|
|
- wx.showToast({
|
|
|
- icon: 'none',
|
|
|
- title: res,
|
|
|
- duration: 2000
|
|
|
- })
|
|
|
- console.log("失败:" + res);
|
|
|
+ setTimeout(() => {
|
|
|
+ wx.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: res.errMsg,
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }, 200);
|
|
|
+ console.log("失败:", res);
|
|
|
}
|
|
|
});
|
|
|
}
|