From 737c0a8008d82db993a81a5d020d23f5f52c7020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=97=AD?= <850374051@qq.com> Date: Mon, 3 Jul 2023 13:51:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E6=9D=83=E4=BA=A4=E6=98=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/project/listingItems/items.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/static/js/project/listingItems/items.js b/static/js/project/listingItems/items.js index 6861cc1..1f7c33e 100644 --- a/static/js/project/listingItems/items.js +++ b/static/js/project/listingItems/items.js @@ -404,12 +404,16 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function setTimeout(function(){ if (module.data.outProjectInformationDetail.biddingDirect == '反向竞价'||module.data.outProjectInformationDetail.biddingDirect == '2'){ if (content.length>0){ - document.getElementById('money').value = parseInt(content[0].money) - parseInt(module.data.outProjectInformationDetail.ladderPrice); + document.getElementById('money').value = parseFloat(content[0].money) - parseFloat(module.data.outProjectInformationDetail.ladderPrice); }else{ - document.getElementById('money').value = parseInt(parseInt(module.data.outProjectInformationDetail.price) - parseInt(module.data.outProjectInformationDetail.ladderPrice)); + document.getElementById('money').value = parseFloat(parseFloat(module.data.outProjectInformationDetail.price) - parseFloat(module.data.outProjectInformationDetail.ladderPrice)); } }else{ - + if (content.length>0){ + document.getElementById('money').value = parseFloat(content[0].money) + parseFloat(module.data.outProjectInformationDetail.ladderPrice); + }else{ + document.getElementById('money').value = parseFloat(parseFloat(module.data.outProjectInformationDetail.price) + parseFloat(module.data.outProjectInformationDetail.ladderPrice)); + } } },2000) @@ -519,11 +523,11 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function } //出价 - module.biddingSubmitMethod = function (data) { + module.biddingSubmitMethod = function (data2) { let newMoney; - if (data.data&&data.code==200){ - console.log(data) - newMoney = data.data; + if (data2.data&&data2.code==200){ + console.log(data2) + newMoney = data2.data; }else{ newMoney = module.data.outProjectInformationDetail.price; } @@ -541,7 +545,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function //判断当前竞价方式 if (module.data.outProjectInformationDetail.biddingType=='阶梯竞价' || module.data.outProjectInformationDetail.biddingType=='公开竞价'){ //判断当前是否有人出价 - if (data.data){ + if (data2.data){ //判断用户出价不能高于当前出价最低价格 if(newMoney < $('#money').val()){ tools.initError('不能高于当前最低价格!'); @@ -558,7 +562,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function //判断当前竞价方式 if (module.data.outProjectInformationDetail.biddingType=='阶梯竞价' || module.data.outProjectInformationDetail.biddingType=='公开竞价'){ //判断当前是否有人出价 - if (data.data){ + if (data2.data){ //判断用户出价不能低于当前出价最高价格 if(newMoney >= $('#money').val()){ tools.initError('不能低于当前最高价格!');