From 9f3fe61d559239d43a09e585f69e545b7c76b35f 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, 4 Dec 2023 15:40:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BA=A7=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/project/listingItems/items2.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/project/listingItems/items2.js b/static/js/project/listingItems/items2.js index 476cb34..0e8db98 100644 --- a/static/js/project/listingItems/items2.js +++ b/static/js/project/listingItems/items2.js @@ -366,11 +366,11 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function let biddingStartTime = content.biddingStartTime; let biddingStopTime = content.biddingStopTime; var nowTime = Date.parse(new Date()); - if(Date.parse(biddingStartTime) Date: Tue, 5 Dec 2023 14:26:49 +0800 Subject: [PATCH 2/2] =?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/items2.js | 83 +++++++++++++++--------- view/listingItems/itemsDetail.html | 6 +- 2 files changed, 55 insertions(+), 34 deletions(-) diff --git a/static/js/project/listingItems/items2.js b/static/js/project/listingItems/items2.js index 0e8db98..52d6e6d 100644 --- a/static/js/project/listingItems/items2.js +++ b/static/js/project/listingItems/items2.js @@ -119,6 +119,8 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function $("#friendsLinksContent").html(friendsLinksData); } } + + var t = 3; module.dataCompare = function(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime){ // console.log('aaaaaaaaaaa') var signupStartTime = signupStartTime; @@ -165,6 +167,20 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function // console.log('距竞价结束还有:'+d+''+h+''+m+''+s+'秒') $('#countType').html('竞价中') $('#countDown').html('距竞价结束还有:'+d+''+h+''+m+''+s+'秒') + if(module.data.outProjectInformationDetail.biddingType != '自由竞价' && module.data.biddingTimeType != 2){ + document.getElementById('showNowMoney').style.display = 'table-row'; + var timName = document.getElementById('timeDown'); + if(timName) { + document.getElementById('timeDown').style.display = 'inline-block'; + timName.innerHTML = t + '秒后自动刷新'; + } + t--; + if (t < 0) { + t = 3; + tools.doGet(biddinglist, {projectId: getQueryVariable('id')}, module.biddinglistInformation, true); + } + } + }else if (nowTime>Date.parse(biddingStopTime)){ //竞价结束 $('#countType').html('') @@ -347,33 +363,33 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function setTimeout(function(){ var outProjectInformationData = template('outProjectInformationData', module.data); $("#outProjectInformationContent").html(outProjectInformationData); - var timName = document.getElementById('timeDown'); - if(timName){ - var t = 3; - - module.data.timeDown = setInterval(function(){ - // console.log($('#countType').html()) - // if ($('#countType').html()!='竞价中'){ - // clearInterval(module.data.timeDown) - // document.getElementById('timeDown').style.display = 'none'; - // return; - // } - timName.innerHTML = t+'秒后自动刷新'; - t--; - document.getElementById('timeDown').style.display = 'inline-block'; - if(t<0){ - t = 3; - let biddingStartTime = content.biddingStartTime; - let biddingStopTime = content.biddingStopTime; - var nowTime = Date.parse(new Date()); - // if(Date.parse(biddingStartTime)秒后自动刷新'; + // t--; + // document.getElementById('timeDown').style.display = 'inline-block'; + // if(t<0){ + // t = 3; + // let biddingStartTime = content.biddingStartTime; + // let biddingStopTime = content.biddingStopTime; + // var nowTime = Date.parse(new Date()); + // if(Date.parse(biddingStartTime)0){ + console.log('abccba') + $("#nowMoneyBlock").html(''+content[0].money+' 元'); + }else{ + $("#nowMoneyBlock").html('暂无出价'); + } if(module.data.biddinglistInformationDetailLength == content.length){ return; } @@ -637,10 +659,9 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function module.data.biddinglistInformationDetailLength = content.length; var biddinglistInformationData = template('biddinglistInformationData', module.data); $("#tabDetail4").html(biddinglistInformationData); - if (content.length>0){$("#nowMoney").html(content[0].money);} - - - + if (content.length>0){ + console.log('abccba') + $("#nowMoneyBlock").html(''+content[0].money+' 元');} } } diff --git a/view/listingItems/itemsDetail.html b/view/listingItems/itemsDetail.html index e33f859..c840715 100644 --- a/view/listingItems/itemsDetail.html +++ b/view/listingItems/itemsDetail.html @@ -228,11 +228,11 @@ 保证金 {{outProjectInformationDetail.deposit}} 元 - {{if outProjectInformationDetail.biddingType != '自由竞价' && biddinglistInformationDetail.length>0}} - + {{if outProjectInformationDetail.biddingType != '自由竞价'}} + 当前价格 - {{biddinglistInformationDetail[0].money}} 元 +