|
|
@@ -12,7 +12,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
isFirst:'', |
|
|
|
timer:null, |
|
|
|
biddinglistInformationDetailLength:-1, |
|
|
|
biddingTimeType:0, |
|
|
|
biddingTimeType:1, |
|
|
|
biddinglistInformationDetail:[], |
|
|
|
timeConfig:0.00 |
|
|
|
}, |
|
|
@@ -289,11 +289,12 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
if(t<0){ |
|
|
|
t = 10; |
|
|
|
let biddingStartTime = content.biddingStartTime; |
|
|
|
let biddingStopTime = content.biddingStopTime; |
|
|
|
let biddingStopTime = module.data.biddingStopTime; |
|
|
|
var nowTime = Date.parse(new Date()); |
|
|
|
if(Date.parse(biddingStartTime)<nowTime&&nowTime<Date.parse(biddingStopTime)){ |
|
|
|
//正在竞价 |
|
|
|
//交易项目竞价记录 |
|
|
|
console.log('aaaaaaaaaaaaaaaaaaaa') |
|
|
|
tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformation,true); |
|
|
|
} |
|
|
|
} |
|
|
@@ -353,26 +354,27 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
let signupStartTime = content.signupStartTime; |
|
|
|
let signupStopTime = content.signupStopTime; |
|
|
|
let biddingStartTime = content.biddingStartTime; |
|
|
|
let biddingStopTime = content.biddingStopTime; |
|
|
|
let biddingStopTime = module.data.biddingStopTime; |
|
|
|
var nowTime = Date.parse(new Date()); |
|
|
|
var difference = Date.parse(biddingStopTime)-nowTime; |
|
|
|
var centerTime = module.data.timeConfig * 60 * 1000 |
|
|
|
if ( 0 < difference&&difference <= centerTime){ |
|
|
|
console.log("竞价最后两分钟") |
|
|
|
// console.log("竞价最后两分钟") |
|
|
|
//正在竞价 |
|
|
|
var m,s; |
|
|
|
document.getElementById('biddingTitle').innerHTML = '竞价进行中...'; |
|
|
|
document.getElementById('swiperType').style.display = 'block'; |
|
|
|
m = Math.floor(difference/1000/60%60); |
|
|
|
s = Math.floor(difference/1000%60); |
|
|
|
$('#countType').html('竞价中') |
|
|
|
$('#countDown').html('<span>距竞价结束还有:0</span>天<span>0</span>时<span>'+m+'</span>分<span>'+s+'</span>秒') |
|
|
|
// console.log('<span>距竞价结束还有:0</span>天<span>0</span>时<span>'+m+'</span>分<span>'+s+'</span>秒') |
|
|
|
//交易项目竞价记录 |
|
|
|
tools.doGet(biddinglist, {projectId:getQueryVariable('id')}, module.biddinglistInformationNew,true); |
|
|
|
|
|
|
|
if(module.data.outProjectInformationDetail.biddingType != '公开竞价' && module.data.biddingTimeType != 2){ |
|
|
|
if(module.data.outProjectInformationDetail.biddingType == '自由竞价' && module.data.biddingTimeType != 2){ |
|
|
|
document.getElementById('biddingTable').style.display = 'none'; |
|
|
|
document.getElementById('biddingTitle').style.display = 'block'; |
|
|
|
document.getElementById('biddingTitle').innerHTML = '竞价进行中...'; |
|
|
|
} |
|
|
|
}else{ |
|
|
|
if (!signupStartTime){console.log('缺失报名开始时间');return;} |
|
|
@@ -417,9 +419,9 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
module.biddinglistInformation = function (data) { |
|
|
|
if (data.code == 200) { |
|
|
|
var content = data.rows; |
|
|
|
if(module.data.biddinglistInformationDetailLength == content.length){ |
|
|
|
return; |
|
|
|
} |
|
|
|
// if(module.data.biddinglistInformationDetailLength == content.length){ |
|
|
|
// return; |
|
|
|
// } |
|
|
|
console.log(module.data.outProjectInformationDetail.biddingDirect) |
|
|
|
setTimeout(function(){ |
|
|
|
|
|
|
@@ -433,8 +435,14 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
} |
|
|
|
}else{ |
|
|
|
if (content.length>0){ |
|
|
|
console.log('11111111111111111111111') |
|
|
|
document.getElementById('money').value = parseFloat(parseFloat(content[0].money) + parseFloat(module.data.outProjectInformationDetail.ladderPrice)).toFixed(2); |
|
|
|
|
|
|
|
console.log(document.getElementById('money').value) |
|
|
|
console.log(content[0].money) |
|
|
|
console.log(parseFloat(parseFloat(content[0].money) + parseFloat(module.data.outProjectInformationDetail.ladderPrice)).toFixed(2)) |
|
|
|
}else{ |
|
|
|
console.log('2222222222222222222222222') |
|
|
|
document.getElementById('money').value = parseFloat(parseFloat(module.data.outProjectInformationDetail.price)).toFixed(2); |
|
|
|
// + parseFloat(module.data.outProjectInformationDetail.ladderPrice) |
|
|
|
} |
|
|
@@ -458,7 +466,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.biddinglistInformationDetailLength+'----------------------'+content.length) |
|
|
|
if (module.data.biddinglistInformationDetailLength<content.length){ |
|
|
|
let time = new Date(Date.parse(new Date())+(2 * 60 * 1000)); |
|
|
|
const Y = time.getFullYear() |
|
|
@@ -468,6 +476,7 @@ define(['jquery', "template", "Tools", 'swiper', 'itemsApi', 'swiper'], function |
|
|
|
const m = time.getMinutes() // 分钟 |
|
|
|
const S = time.getSeconds() // 秒 |
|
|
|
module.data.biddingStopTime = Y+'-'+M+'-'+D+' '+H+':'+m+':'+S; |
|
|
|
console.log(module.data.biddingStopTime) |
|
|
|
module.data.biddinglistInformationDetailLength = content.length; |
|
|
|
|
|
|
|
} |
|
|
|