Commit 5ac3f75d authored by pengguangpu's avatar pengguangpu

添加直接收款的0元判断;

parent be95517e
App({
globalData: {
version: "1.0.0.20200203",
version: "1.0.1.20200311",
//是否使用测试支付数据
useTestPayInfo: false,
printerId: null,
......
......@@ -176,6 +176,7 @@ Page({
this.setData({
isPaying: false
});
hideLoading();
}
}
}.bind(this));
......
......@@ -80,10 +80,25 @@ Page({
}
});
} else if (res.action == ACTION_DIRECT_PAYMENT) {
//判断金额,不允许0元支付
if (res.data == null) {
my.showToast({
content: "数据错误"
});
} else {
var miyapayUtils = require("../../utils/miyapay4.js");
var priceFen = miyapayUtils.yuan2Fen(res.data);
if (priceFen == 0) {
my.showToast({
content: "不允许0元支付"
});
return;
}
//直接收款
my.reLaunch({
url: "/pages/balance/balance?totalPrice=" + res.data + "&totalQuantity=0&totalDisc=0&type=direct",
});
}
} else if (res.action == ACTION_CONVERT_COUPON) {
//兑换券
context.setData({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment