|
|
@@ -281,20 +281,20 @@ export default {
|
|
|
openId: localStorage.getItem('openId') || 'oWJG55wLnwdVzXoKka1-DzQKOd_Y'
|
|
|
})
|
|
|
.then(res => {
|
|
|
- this.getOrder(true);
|
|
|
if ('wx_pub' === this.payChannel) {
|
|
|
console.log('wxPayParams', res);
|
|
|
+ let _this = this;
|
|
|
wx.chooseWXPay({
|
|
|
...res,
|
|
|
success(res) {
|
|
|
- this.$toast.success('支付成功');
|
|
|
+ _this.$toast.success('支付成功');
|
|
|
setTimeout(() => {
|
|
|
- this.$router.replace('/orders');
|
|
|
+ _this.$router.replace('/orderDetail?id=' + _this.orderId);
|
|
|
}, 1000);
|
|
|
},
|
|
|
fail(e) {
|
|
|
console.log(e);
|
|
|
- this.$toast('支付失败,请稍后再试');
|
|
|
+ _this.$toast('支付失败,请稍后再试');
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
@@ -303,6 +303,7 @@ export default {
|
|
|
this.$nextTick(() => {
|
|
|
document.getElementById('pay').click();
|
|
|
});
|
|
|
+ this.getOrder(true);
|
|
|
}
|
|
|
// console.log({
|
|
|
// ...res,
|