From 4ebf42cd485e0673304aa7f16491a4ca67791115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=97=AD?= <850374051@qq.com> Date: Fri, 8 Dec 2023 17:03:44 +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 --- .../project/bidding/biddingBigDataDetail.js | 18 ++++---- static/js/project/listingItems/items2.js | 43 ++++++++++--------- 2 files changed, 32 insertions(+), 29 deletions(-) diff --git a/static/js/project/bidding/biddingBigDataDetail.js b/static/js/project/bidding/biddingBigDataDetail.js index 42e6a13..779f55f 100644 --- a/static/js/project/bidding/biddingBigDataDetail.js +++ b/static/js/project/bidding/biddingBigDataDetail.js @@ -24,11 +24,14 @@ define(['jquery', "template", "Tools", "biddingApi", "itemsApi"], function ($, t tools.doGet(webConfig, {}, module.webConfigInformation, true) - $("#nowDateNYR").html(new Date().getFullYear()+'.'+(new Date().getMonth()+1)+'.'+new Date().getDate()) + var nowTime = new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")); + + $("#nowDateNYR").html(nowTime.getFullYear()+'.'+(nowTime.getMonth()+1)+'.'+nowTime.getDate()) setInterval(function () { - $("#nowDateSFM").html(new Date().toLocaleTimeString()); - $("#nowTime").html('服务器时间:'+new Date().getFullYear()+'.'+(new Date().getMonth()+1)+'.'+new Date().getDate()+' '+new Date().toLocaleTimeString()); + var nowTime = new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")); + $("#nowDateSFM").html(nowTime.toLocaleTimeString()); + $("#nowTime").html('服务器时间:'+nowTime.getFullYear()+'.'+(nowTime.getMonth()+1)+'.'+nowTime.getDate()+' '+nowTime.toLocaleTimeString()); },1000) tools.doGet(outProject + '/id/'+getQueryVariable('id'), {}, module.outProjectInformation,true); @@ -99,9 +102,6 @@ define(['jquery', "template", "Tools", "biddingApi", "itemsApi"], function ($, t //交易项目竞价记录 tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true); - - - //倒计时 module.data.timer = setInterval(function(){ let signupStartTime = module.data.outProjectInformationDetail.signupStartTime; @@ -109,7 +109,7 @@ define(['jquery', "template", "Tools", "biddingApi", "itemsApi"], function ($, t let biddingStartTime = module.data.outProjectInformationDetail.biddingStartTime; let biddingStopTime = module.data.outProjectInformationDetail.biddingStopTime;//延时后结束时间 let biddingStopSetime = module.data.outProjectInformationDetail.biddingStopSetime;//原始结束时间 - var nowTime = Date.parse(new Date()); + var nowTime = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date"))); var difference = Date.parse(biddingStopTime)-nowTime;//延时后时间差 var differenceSetime = Date.parse(biddingStopSetime)-nowTime;//原始时间差 @@ -194,7 +194,7 @@ define(['jquery', "template", "Tools", "biddingApi", "itemsApi"], function ($, t var signupStopTime = signupStopTime; var biddingStartTime = biddingStartTime; var biddingStopTime = biddingStopTime; - var nowTime = Date.parse(new Date()); + var nowTime = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date"))); var beginTimes=signupStartTime.substring(0,10).split('-'); var endTimes=signupStopTime.substring(0,10).split('-'); @@ -350,7 +350,7 @@ define(['jquery', "template", "Tools", "biddingApi", "itemsApi"], function ($, t },true); var biddingStartTime = module.data.outProjectInformationDetail.biddingStartTime var biddingStopTime = module.data.outProjectInformationDetail.biddingStopTime; - var nowTime = Date.parse(new Date()); + var nowTime = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date"))); var biddingBeginTimes=biddingStartTime.substring(0,10).split('-'); var biddingEndTimes=biddingStopTime.substring(0,10).split('-'); diff --git a/static/js/project/listingItems/items2.js b/static/js/project/listingItems/items2.js index 2bc58a1..296a40c 100644 --- a/static/js/project/listingItems/items2.js +++ b/static/js/project/listingItems/items2.js @@ -99,7 +99,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function module.webConfigInformation = function (data) { if (data.code == 200) { var content = data.data; - console.log(content) + //console.log(content) //document.getElementById('time').innerHTML = '延时周期:'+content[8].configValue+content[8].remark+'?' module.data.timeConfig = parseFloat(content[8].configValue); module.data.titleConfig = content[9].configValue; @@ -113,7 +113,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function module.bottomFriendsLinks = function (data) { if (data.code == 200) { var content = data.data; - console.log(content) + //console.log(content) module.data.friendsLinksList = content; var friendsLinksData = template('friendsLinksData', module.data); $("#friendsLinksContent").html(friendsLinksData); @@ -122,7 +122,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function var t = 3; module.dataCompare = function(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime){ - // console.log('aaaaaaaaaaa') + //console.log('aaaaaaaaaaa') var signupStartTime = signupStartTime; var signupStopTime = signupStopTime; var biddingStartTime = biddingStartTime; @@ -489,6 +489,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function document.getElementById('moneyText').style.display = 'table-row'; document.getElementById('moneyBtn').style.display = 'flex'; + $('.swiperInput').css('display','block') }else if( module.data.biddingTimeType == 3 ){ //判断当前竞价状态(竞价未开始) document.getElementById('moneyText').style.display = 'none'; document.getElementById('moneyBtn').style.display = 'none'; @@ -540,8 +541,8 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function document.getElementById('signBtn2').style.display = 'block'; } } - console.log(s+'-------------'+m) - if (s < 2 && m < 1){ + //console.log(s+'-------------'+m) + if (s < 1 && m < 1){ console.log("竞价结束22222222222") tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, function(data){ if (data.code == 200) { @@ -551,11 +552,13 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function let timeNew = Date.parse(data.data) + 0 - nowDate; if (timeNew > 0) { module.data.outProjectInformationDetail.biddingStopTime = data.data; - // module.dataCompare(signupStartTime,signupStopTime,biddingStartTime,data.data); + $('.swiperInput').css('display','block') + // module.data.biddingTimeType = 1; }else{ $('#countType').html('') $('#countDown').html('竞价结束') $('#timeDown').css('display','none'); + $('.swiperInput').css('display','none'); // document.getElementById('swiperType').style.display = 'none'; document.getElementById('biddingTable').style.display = 'table'; document.getElementById('biddingTitle').style.display = 'none'; @@ -631,7 +634,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function if (data.code == 200) { var content = data.rows; if (content.length>0){ - console.log('abccba') + //console.log('abccba') $("#nowMoneyBlock").html(''+content[0].money+' 元'); }else{ $("#nowMoneyBlock").html('暂无出价'); @@ -639,8 +642,8 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function if(module.data.biddinglistInformationDetailLength == content.length){ return; } - console.log(module.data.outProjectInformationDetail.biddingDirect) - console.log(module.data.outProjectInformationDetail.biddingType) + //console.log(module.data.outProjectInformationDetail.biddingDirect) + //console.log(module.data.outProjectInformationDetail.biddingType) setTimeout(function(){ if(module.data.outProjectInformationDetail.biddingType == '阶梯竞价'||module.data.outProjectInformationDetail.biddingType == '2'){ @@ -675,7 +678,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function var biddinglistInformationData = template('biddinglistInformationData', module.data); $("#tabDetail4").html(biddinglistInformationData); if (content.length>0){ - console.log('abccba') + //console.log('abccba') $("#nowMoneyBlock").html(''+content[0].money+' 元');} } } @@ -684,7 +687,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function module.biddinglistInformationNew = function (data) { if (data.code == 200) { var content = data.rows; - console.log(module.data.biddinglistInformationDetail.length+'----------------------'+content.length) + //console.log(module.data.biddinglistInformationDetail.length+'----------------------'+content.length) if (module.data.biddinglistInformationDetailLength