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 }