fix 支付页v4 最大支付金额

master
luoyang 5 years ago
parent e6917173ca
commit 09209d9b88

@ -42,7 +42,7 @@ $(function () {
return; return;
} }
var char = $(this).val(); var char = $(this).val();
if (parseFloat(char) > 10000) { if (parseFloat(char) >= 100000) {
char = char.slice(0, char.length - 1); char = char.slice(0, char.length - 1);
$(this).val(char); $(this).val(char);
return; return;
@ -167,8 +167,7 @@ $(function () {
return; return;
} }
var pointLocation = dataCache.price.indexOf('.'); var pointLocation = dataCache.price.indexOf('.');
if (pointLocation >= 0 || char == '.' || char.length < 5) { if (char == '.' || char.length > 8) {
if (pointLocation >= 0 && char == '.') {
return; return;
} }
if (pointLocation >= 0 && pointLocation <= char.length - 4) { if (pointLocation >= 0 && pointLocation <= char.length - 4) {
@ -181,7 +180,6 @@ $(function () {
updatePrice(); updatePrice();
updatePoundageStatus(); updatePoundageStatus();
} }
}
function updatePoundageStatus() { function updatePoundageStatus() {
$(window.coupons).each(function () { $(window.coupons).each(function () {

@ -34,7 +34,7 @@ $(function () {
return; return;
} }
var char = $(this).val(); var char = $(this).val();
if (parseFloat(char) > 10000) { if (parseFloat(char) >= 100000) {
char = char.slice(0, char.length - 1); char = char.slice(0, char.length - 1);
$(this).val(char); $(this).val(char);
return; return;
@ -159,8 +159,7 @@ $(function () {
return; return;
} }
var pointLocation = dataCache.price.indexOf('.'); var pointLocation = dataCache.price.indexOf('.');
if (pointLocation >= 0 || char == '.' || char.length < 5) { if (char == '.' || char.length > 8) {
if (pointLocation >= 0 && char == '.') {
return; return;
} }
if (pointLocation >= 0 && pointLocation <= char.length - 4) { if (pointLocation >= 0 && pointLocation <= char.length - 4) {
@ -173,7 +172,6 @@ $(function () {
updatePrice(); updatePrice();
updatePoundageStatus(); updatePoundageStatus();
} }
}
function updatePoundageStatus() { function updatePoundageStatus() {
$(window.coupons).each(function () { $(window.coupons).each(function () {

Loading…
Cancel
Save