Commit ca0243e44f8488cab32a28143b140beea4626dcd
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into test
Showing
2 changed files
with
12 additions
and
0 deletions
packageE/pages/cart/cart2/cart2.js
| ... | ... | @@ -201,6 +201,14 @@ Page({ |
| 201 | 201 | |
| 202 | 202 | //----------子页返回父页触发---------- |
| 203 | 203 | onShow: function () { |
| 204 | + | |
| 205 | + if(getApp().globalData.fuiou_pay){ | |
| 206 | + getApp().globalData.fuiou_pay=0; | |
| 207 | + getApp().goto('pages/index/index/index'); | |
| 208 | + return false; | |
| 209 | + } | |
| 210 | + | |
| 211 | + | |
| 204 | 212 | util_pay.set_fir(); |
| 205 | 213 | var th = this; |
| 206 | 214 | th.data.g_cart_q_time = null; | ... | ... |
utils/pay.js
| ... | ... | @@ -52,6 +52,8 @@ module.exports = { |
| 52 | 52 | if(t.data.data.is_fuioupay){ |
| 53 | 53 | const plugin = requirePlugin('fuiou-pay') |
| 54 | 54 | getApp().globalData.no_clear=1; |
| 55 | + getApp().globalData.fuiou_pay=1; | |
| 56 | + | |
| 55 | 57 | |
| 56 | 58 | var paramsJson={ |
| 57 | 59 | reqType:"11",//必填 01-商户模式,11-机构模式 |
| ... | ... | @@ -60,6 +62,7 @@ module.exports = { |
| 60 | 62 | console.log(plugin, plugin.fuioupay) |
| 61 | 63 | plugin.fuioupay(parseInt(t.data.data.amt),paramsJson,function (res){ |
| 62 | 64 | console.log(res); |
| 65 | + getApp().globalData.fuiou_pay=0; | |
| 63 | 66 | i.wx_paying=0; |
| 64 | 67 | getApp().showSuccess("支付成功!", e); |
| 65 | 68 | |
| ... | ... | @@ -67,6 +70,7 @@ module.exports = { |
| 67 | 70 | console.log("插件支付错误",error); |
| 68 | 71 | //支付失败的时候 |
| 69 | 72 | i.wx_paying=0; |
| 73 | + getApp().globalData.fuiou_pay=0; | |
| 70 | 74 | var msg='取消支付'; |
| 71 | 75 | if(error.code){ |
| 72 | 76 | msg=error.code+":"+error.message; | ... | ... |