Commit a472928627d1d322504af8cf5e84c96733fb3498
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into test
Showing
1 changed file
with
27 additions
and
1 deletions
utils/pay.js
| @@ -43,7 +43,33 @@ module.exports = { | @@ -43,7 +43,33 @@ module.exports = { | ||
| 43 | success: function(t) { | 43 | success: function(t) { |
| 44 | wx.hideLoading(); | 44 | wx.hideLoading(); |
| 45 | if(t.data.code==0){ | 45 | if(t.data.code==0){ |
| 46 | - i.weixinPay(t.data.data, e, a); | 46 | + |
| 47 | + if(t.data.data.is_fuioupay){ | ||
| 48 | + const plugin = requirePlugin('fuiou-pay') | ||
| 49 | + | ||
| 50 | + var paramsJson={ | ||
| 51 | + reqType:"11",//必填 01-商户模式,11-机构模式 | ||
| 52 | + reqData:t.data.data.reqData,//必填 富友加密参数 | ||
| 53 | + } | ||
| 54 | + plugin.fuioupay(parseInt(t.data.data.amt),paramsJson,function (res){ | ||
| 55 | + wx_paying=0; | ||
| 56 | + getApp().showSuccess("支付成功!", e); | ||
| 57 | + | ||
| 58 | + },function (){ | ||
| 59 | + //支付失败的时候 | ||
| 60 | + setTimeout(function(){ | ||
| 61 | + wx.redirectTo({ | ||
| 62 | + url: "/pages/user/order_list/order_list", | ||
| 63 | + }); | ||
| 64 | + },1000) | ||
| 65 | + wx_paying=0; | ||
| 66 | + }) | ||
| 67 | + }else{ | ||
| 68 | + i.weixinPay(t.data.data, e, a); | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + | ||
| 72 | + | ||
| 47 | }else{ | 73 | }else{ |
| 48 | getApp().confirmBox(t.data.msg); | 74 | getApp().confirmBox(t.data.msg); |
| 49 | setTimeout(function(){ | 75 | setTimeout(function(){ |