From 301abb676559211255b1f57800972671a45137c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=97=AD?= <850374051@qq.com> Date: Wed, 28 Jun 2023 17:47:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E6=9D=83=E4=BA=A4=E6=98=93=E5=87=BA?= =?UTF-8?q?=E4=BB=B7=E5=B0=8F=E6=95=B0=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/project/listingItems/items.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/static/js/project/listingItems/items.js b/static/js/project/listingItems/items.js index b91cf08..f62b28c 100644 --- a/static/js/project/listingItems/items.js +++ b/static/js/project/listingItems/items.js @@ -568,7 +568,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function var userId = tools.getCookie('userId'); var userAccount = tools.getCookie('phone'); var userName = tools.getCookie('userName'); - var money = parseInt($('#money').val()).toFixed(2); + var money = parseFloat($('#money').val()); // var loginTime = tools.getNowFormatDate(); data['projectId'] = projectId; data['memberId'] = memberId; @@ -770,7 +770,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function return; } }else{ - if(module.data.biddinglistInformationDetail[0].money <= (parseInt($('#money').val())+parseInt(module.data.outProjectInformationDetail.ladderPrice))){ + if(module.data.biddinglistInformationDetail[0].money <= (parseFloat($('#money').val())+parseFloat(module.data.outProjectInformationDetail.ladderPrice))){ tools.initError('出价不能高于当前出价最低价格'); return; } @@ -793,7 +793,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function console.log($('#money').val()) - module.data.outProjectInformationDetail.ladderPrice?$('#money').val(parseInt($('#money').val())+parseInt(module.data.outProjectInformationDetail.ladderPrice)):document.getElementById('money').value += 1 + module.data.outProjectInformationDetail.ladderPrice?$('#money').val(parseFloat($('#money').val())+parseFloat(module.data.outProjectInformationDetail.ladderPrice)):document.getElementById('money').value += 1 } @@ -818,7 +818,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function return; } }else{ - if(module.data.biddinglistInformationDetail[0].money>=(parseInt($('#money').val())-parseInt(module.data.outProjectInformationDetail.ladderPrice))){ + if(module.data.biddinglistInformationDetail[0].money>=(parseFloat($('#money').val())-parseFloat(module.data.outProjectInformationDetail.ladderPrice))){ tools.initError('出价不能低于当前出价最高价格'); return; } @@ -827,7 +827,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function $('#money').val() == null?$('#money').val(0):''; if ($('#money').val() == 0)return; - module.data.outProjectInformationDetail.ladderPrice?$('#money').val(parseInt($('#money').val())-parseInt(module.data.outProjectInformationDetail.ladderPrice)):document.getElementById('money').value -= 1 + module.data.outProjectInformationDetail.ladderPrice?$('#money').val(parseFloat($('#money').val())-parseFloat(module.data.outProjectInformationDetail.ladderPrice)):document.getElementById('money').value -= 1 }