|
@@ -159,13 +159,21 @@
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
this.isSubLoading = false;
|
|
this.isSubLoading = false;
|
|
},2000)
|
|
},2000)
|
|
- this.$api.navigateTo(`/pages/user/order/order-payment?money=${data.payableAmount}`)
|
|
|
|
- // this.MiniWxPayFor(data)
|
|
|
|
|
|
+ this.MiniWxPayFor(data)
|
|
}).catch(error =>{
|
|
}).catch(error =>{
|
|
this.$util.msg(error.msg,2000);
|
|
this.$util.msg(error.msg,2000);
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- async MiniWxPayFor(data){
|
|
|
|
|
|
+ MiniWxPayFor(data){
|
|
|
|
+ this.PayService.PayOrderOnLineSwitch().then(response =>{
|
|
|
|
+ if(response.data === 1 ){
|
|
|
|
+ this.WeChatMiniWxPay(data)
|
|
|
|
+ }else{
|
|
|
|
+ this.$api.navigateTo(`/pages/user/order/order-payment?money=${data.payableAmount}`)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ async WeChatMiniWxPay(data){
|
|
const wechatCode = await authorize.getCode('weixin')
|
|
const wechatCode = await authorize.getCode('weixin')
|
|
this.PayService.WeChatMiniWxPay(
|
|
this.PayService.WeChatMiniWxPay(
|
|
{
|
|
{
|
|
@@ -193,7 +201,7 @@
|
|
'signType': data.signType,
|
|
'signType': data.signType,
|
|
'paySign': data.paySign,
|
|
'paySign': data.paySign,
|
|
'success':function(res){
|
|
'success':function(res){
|
|
- wx.reLaunch({url: '/pages/index/index'});
|
|
|
|
|
|
+ wx.reLaunch({url: '/pages/tabBar/index/index'});
|
|
},
|
|
},
|
|
'fail':function(res){
|
|
'fail':function(res){
|
|
console.log(res)
|
|
console.log(res)
|