Commit d98e420aa08a6b9c3bb324aeec35dbdbdc739db8
1 parent
e70b7e74
支付的修改
Showing
1 changed file
with
7 additions
and
1 deletions
utils/pay.js
... | ... | @@ -80,7 +80,13 @@ module.exports = { |
80 | 80 | success (res) { |
81 | 81 | console.log(n), t.showSuccess("支付成功!", e); |
82 | 82 | }, |
83 | - fail (res) { | |
83 | + fail (n) { | |
84 | + if(!n.errMsg ) { | |
85 | + getApp().showWarning("支付失败"); | |
86 | + "function" == typeof fail && fail(); | |
87 | + return false; | |
88 | + } | |
89 | + | |
84 | 90 | console.log(n), "requestPayment:fail" == n.errMsg ? t.showWarning("支付失败") : "requestPayment:fail cancel" == n.errMsg ? t.showWarning("您已取消支付") : |
85 | 91 | t.confirmBox("支付失败:" + n.errMsg.substr("requestPayment:fail ".length)), |
86 | 92 | "function" == typeof a && a(); | ... | ... |