that.$request.register('wx_pay/buildOrderInfo', {
id: that.id, //微信支付的订单id
type:this.type,
}).then(res => {
uni.requestPayment({
provider: 'wxpay',
orderInfo: res,
success: function(res) {
that.closePopup()
uni.showToast({
title: '支付成功',
})
setTimeout(res=>{
uni.switchTab({
url:'/pages/tabBar/case/case'
})
},1000)
that.time += that.month_val * 30;
},
fail: function(err) {
console.log(err)
that.status = true
uni.showToast({
title: '支付失败',
icon: "none"
})
}
});
}).catch(res => {
console.log('fail2:' + JSON.stringify(res));
that.status = true
uni.showToast({
title: res,
icon: 'none'
})
})
05-03
8578
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
12-18
8699
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)