|
@@ -120,14 +120,13 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
module.dataCompare = function(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime){ |
|
|
module.dataCompare = function(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime){ |
|
|
console.log('aaaaaaaaaaa') |
|
|
|
|
|
|
|
|
// console.log('aaaaaaaaaaa') |
|
|
var signupStartTime = signupStartTime; |
|
|
var signupStartTime = signupStartTime; |
|
|
var signupStopTime = signupStopTime; |
|
|
var signupStopTime = signupStopTime; |
|
|
var biddingStartTime = biddingStartTime; |
|
|
var biddingStartTime = biddingStartTime; |
|
|
var biddingStopTime = biddingStopTime; |
|
|
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"))); |
|
|
|
|
|
// console.log(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date"))) |
|
|
var beginTimes=signupStartTime.substring(0,10).split('-'); |
|
|
var beginTimes=signupStartTime.substring(0,10).split('-'); |
|
|
var endTimes=signupStopTime.substring(0,10).split('-'); |
|
|
var endTimes=signupStopTime.substring(0,10).split('-'); |
|
|
|
|
|
|
|
@@ -148,8 +147,10 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
var signDownLeftTime = Date.parse(signupStopTime)-nowTime; |
|
|
var signDownLeftTime = Date.parse(signupStopTime)-nowTime; |
|
|
//定义变量 d,h,m,s保存倒计时的时间 |
|
|
//定义变量 d,h,m,s保存倒计时的时间 |
|
|
var d,h,m,s; |
|
|
var d,h,m,s; |
|
|
|
|
|
|
|
|
if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){ |
|
|
if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){ |
|
|
//正在竞价 |
|
|
//正在竞价 |
|
|
|
|
|
// console.log('正在竞价') |
|
|
module.data.biddingTimeType = 1; |
|
|
module.data.biddingTimeType = 1; |
|
|
if(module.data.outProjectInformationDetail.biddingType == '自由竞价'){ |
|
|
if(module.data.outProjectInformationDetail.biddingType == '自由竞价'){ |
|
|
document.getElementById('biddingTable').style.display = 'none'; |
|
|
document.getElementById('biddingTable').style.display = 'none'; |
|
@@ -161,6 +162,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
h = Math.floor(leftTime/1000/60/60%24); |
|
|
h = Math.floor(leftTime/1000/60/60%24); |
|
|
m = Math.floor(leftTime/1000/60%60); |
|
|
m = Math.floor(leftTime/1000/60%60); |
|
|
s = Math.floor(leftTime/1000%60); |
|
|
s = Math.floor(leftTime/1000%60); |
|
|
|
|
|
// console.log('<span>距竞价结束还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒') |
|
|
$('#countType').html('竞价中') |
|
|
$('#countType').html('竞价中') |
|
|
$('#countDown').html('<span>距竞价结束还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒') |
|
|
$('#countDown').html('<span>距竞价结束还有:'+d+'</span>天<span>'+h+'</span>时<span>'+m+'</span>分<span>'+s+'</span>秒') |
|
|
}else if (nowTime>Date.parse(biddingStopTime)){ |
|
|
}else if (nowTime>Date.parse(biddingStopTime)){ |
|
@@ -278,7 +280,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
var t = 10; |
|
|
var t = 10; |
|
|
|
|
|
|
|
|
module.data.timeDown = setInterval(function(){ |
|
|
module.data.timeDown = setInterval(function(){ |
|
|
console.log($('#countType').html()) |
|
|
|
|
|
|
|
|
// console.log($('#countType').html()) |
|
|
if ($('#countType').html()!='竞价中'){ |
|
|
if ($('#countType').html()!='竞价中'){ |
|
|
clearInterval(module.data.timeDown) |
|
|
clearInterval(module.data.timeDown) |
|
|
document.getElementById('timeDown').style.display = 'none'; |
|
|
document.getElementById('timeDown').style.display = 'none'; |
|
@@ -345,9 +347,6 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true); |
|
|
tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//倒计时 |
|
|
//倒计时 |
|
|
module.data.timer = setInterval(function(){ |
|
|
module.data.timer = setInterval(function(){ |
|
|
// '2023-05-17 14:56:00' |
|
|
// '2023-05-17 14:56:00' |
|
@@ -356,13 +355,14 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
let biddingStartTime = module.data.outProjectInformationDetail.biddingStartTime; |
|
|
let biddingStartTime = module.data.outProjectInformationDetail.biddingStartTime; |
|
|
let biddingStopTime = module.data.outProjectInformationDetail.biddingStopTime; |
|
|
let 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 difference = Date.parse(biddingStopTime)-nowTime; |
|
|
var difference = Date.parse(biddingStopTime)-nowTime; |
|
|
// var centerTime = module.data.timeConfig * 60 * 1000 |
|
|
// var centerTime = module.data.timeConfig * 60 * 1000 |
|
|
var centerTime = content.delayPeriod * 1000 |
|
|
var centerTime = content.delayPeriod * 1000 |
|
|
|
|
|
|
|
|
if ( 0 < difference&&difference <= centerTime){ |
|
|
|
|
|
console.log("竞价最后两分钟") |
|
|
|
|
|
|
|
|
if ( 0 <= difference&&difference <= centerTime){ |
|
|
|
|
|
// console.log("竞价最后两分钟") |
|
|
//正在竞价 |
|
|
//正在竞价 |
|
|
var m,s; |
|
|
var m,s; |
|
|
if(module.data.outProjectInformationDetail.biddingType == '自由竞价'){ |
|
|
if(module.data.outProjectInformationDetail.biddingType == '自由竞价'){ |
|
@@ -376,7 +376,33 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
s = Math.floor(difference/1000%60); |
|
|
s = Math.floor(difference/1000%60); |
|
|
$('#countType').html('竞价中') |
|
|
$('#countType').html('竞价中') |
|
|
$('#countDown').html('<span>距竞价结束还有:0</span>天<span>0</span>时<span>'+m+'</span>分<span>'+s+'</span>秒') |
|
|
$('#countDown').html('<span>距竞价结束还有:0</span>天<span>0</span>时<span>'+m+'</span>分<span>'+s+'</span>秒') |
|
|
tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, module.getBiddingStopTime,true); |
|
|
|
|
|
|
|
|
console.log(s+'-------------'+m) |
|
|
|
|
|
if (s < 1 && m < 1){ |
|
|
|
|
|
console.log("竞价结束22222222222") |
|
|
|
|
|
tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, function(data){ |
|
|
|
|
|
if (data.code == 200) { |
|
|
|
|
|
var nowDate = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date"))); |
|
|
|
|
|
module.data.outProjectInformationDetail.biddingStopTime = data.data |
|
|
|
|
|
|
|
|
|
|
|
let timeNew = Date.parse(data.data) + 0 - nowDate; |
|
|
|
|
|
if (timeNew > 0) { |
|
|
|
|
|
module.data.outProjectInformationDetail.biddingStopTime = data.data; |
|
|
|
|
|
// module.dataCompare(signupStartTime,signupStopTime,biddingStartTime,data.data); |
|
|
|
|
|
}else{ |
|
|
|
|
|
$('#countType').html('') |
|
|
|
|
|
$('#countDown').html('竞价结束') |
|
|
|
|
|
document.getElementById('swiperType').style.display = 'none'; |
|
|
|
|
|
document.getElementById('biddingTable').style.display = 'table-block'; |
|
|
|
|
|
document.getElementById('biddingTitle').style.display = 'none'; |
|
|
|
|
|
module.data.biddingTimeType = 2; |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
},true); |
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, module.getBiddingStopTime,true); |
|
|
|
|
|
} |
|
|
}else{ |
|
|
}else{ |
|
|
if (!signupStartTime){console.log('缺失报名开始时间');return;} |
|
|
if (!signupStartTime){console.log('缺失报名开始时间');return;} |
|
|
if (!signupStopTime){console.log('缺失报名结束时间');return;} |
|
|
if (!signupStopTime){console.log('缺失报名结束时间');return;} |
|
@@ -408,6 +434,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
|
|
|
|
|
module.getBiddingStopTime = function(data){ |
|
|
module.getBiddingStopTime = function(data){ |
|
|
if (data.code == 200) { |
|
|
if (data.code == 200) { |
|
|
|
|
|
$('#stopTime').html(data.data) |
|
|
module.data.outProjectInformationDetail.biddingStopTime = data.data |
|
|
module.data.outProjectInformationDetail.biddingStopTime = data.data |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@@ -638,6 +665,28 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
module.biddingSubmitOpen = function(){ |
|
|
module.biddingSubmitOpen = function(){ |
|
|
|
|
|
tools.doGet(getBiddingStopTime+getQueryVariable('id'), {}, function(data){ |
|
|
|
|
|
if (data.code == 200) { |
|
|
|
|
|
var nowDate = Date.parse(new Date($.ajax({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date"))); |
|
|
|
|
|
module.data.outProjectInformationDetail.biddingStopTime = data.data |
|
|
|
|
|
let timeNew = Date.parse(data.data) + 0 - nowDate; |
|
|
|
|
|
if (timeNew > 0) { |
|
|
|
|
|
module.data.outProjectInformationDetail.biddingStopTime = data.data; |
|
|
|
|
|
module.dataCompare( |
|
|
|
|
|
module.data.outProjectInformationDetail.signupStartTime, |
|
|
|
|
|
module.data.outProjectInformationDetail.signupStopTime, |
|
|
|
|
|
module.data.outProjectInformationDetail.biddingStartTime,data.data); |
|
|
|
|
|
}else{ |
|
|
|
|
|
$('#countType').html('') |
|
|
|
|
|
$('#countDown').html('竞价结束') |
|
|
|
|
|
document.getElementById('swiperType').style.display = 'none'; |
|
|
|
|
|
document.getElementById('biddingTable').style.display = 'table-block'; |
|
|
|
|
|
document.getElementById('biddingTitle').style.display = 'none'; |
|
|
|
|
|
module.data.biddingTimeType = 2; |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
},true); |
|
|
tools.initError('出价成功'); |
|
|
tools.initError('出价成功'); |
|
|
// $('#money').val(0) |
|
|
// $('#money').val(0) |
|
|
} |
|
|
} |
|
|