|
|
@@ -491,14 +491,69 @@ export default { |
|
|
|
this.bottomBtn = true; |
|
|
|
let biddingStartTime = Date.parse(this.detail.biddingStartTime)+0 |
|
|
|
let biddingStopTime = Date.parse(this.detail.biddingStopTime)+0 |
|
|
|
let biddingStopSetime = Date.parse(this.detail.biddingStopSetime)+0 |
|
|
|
let signupStartTime = Date.parse(this.detail.signupStartTime)+0 |
|
|
|
let signupStopTime = Date.parse(this.detail.signupStopTime)+0 |
|
|
|
|
|
|
|
let nowDate = Date.parse(this.format($.ajax({async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date"), "yyyy-MM-dd HH:mm:ss")); |
|
|
|
let time = this.detail.delayPeriod * 1000; |
|
|
|
var difference = biddingStopTime-nowDate; |
|
|
|
var difference = biddingStopTime-nowDate;//延时后时间差 |
|
|
|
var differenceSetime = biddingStopSetime-nowDate;//延时后时间差 |
|
|
|
|
|
|
|
let m = Math.floor(difference/1000/60%60); |
|
|
|
let s = Math.floor(difference/1000%60); |
|
|
|
|
|
|
|
|
|
|
|
if (differenceSetime <= 0 && difference >= 0 && difference <=time){ |
|
|
|
console.log("竞价剩余两分钟"+"m:"+m+"s:"+s) |
|
|
|
this.biddingTimeType = 1; |
|
|
|
this.process= "竞价中" |
|
|
|
this.tip=this.detail.biddingStopTime+"结束竞价" |
|
|
|
this.timeMsg="距竞价结束" |
|
|
|
if(this.getSignupData=="1"){ |
|
|
|
this.isSignup=true |
|
|
|
this.btnMsg="立即竞价" |
|
|
|
this.showBtn=true |
|
|
|
// this.price=this.detail.ladderPrice?this.biddinglistInformation[0].money+this.detail.ladderPrice:this.biddinglistInformation[0].money+1 |
|
|
|
}else{ |
|
|
|
this.btnMsg="未报名" |
|
|
|
this.isSignup=true |
|
|
|
} |
|
|
|
$('#timeData').html(this.TimeInterval(biddingStopTime-nowDate)); |
|
|
|
|
|
|
|
if (s < 2 && m < 1){ |
|
|
|
console.log("竞价结束22222222222") |
|
|
|
getBiddingStopTime(this.id).then(response => { |
|
|
|
this.$set(this.detail,'biddingStopTime',response.data) |
|
|
|
let timeNew = Date.parse(response.data) + 0 - nowDate; |
|
|
|
if (timeNew > 0) { |
|
|
|
this.$set(this.detail,'biddingStopTime',response.data) |
|
|
|
this.getTime(); |
|
|
|
} else { |
|
|
|
clearInterval(this.timeCount); |
|
|
|
this.process = "竞价结束" |
|
|
|
this.tip = this.detail.biddingStopTime + "结束竞价" |
|
|
|
this.btnMsg = "竞价结束" |
|
|
|
this.timeMsg = "竞价结束" |
|
|
|
this.time = 0 |
|
|
|
this.isSignup = true |
|
|
|
this.showBtn = false |
|
|
|
this.biddingTimeType = 2; |
|
|
|
$('#timeData').html(''); |
|
|
|
return; |
|
|
|
} |
|
|
|
}); |
|
|
|
}else if (s%2 == 0&&time!=0){ |
|
|
|
getBiddingStopTime(this.id).then(response =>{ |
|
|
|
this.$set(this.detail,'biddingStopTime',response.data); |
|
|
|
}); |
|
|
|
} |
|
|
|
}else{ |
|
|
|
this.dataCompare(signupStartTime,signupStopTime,biddingStartTime,biddingStopSetime) |
|
|
|
} |
|
|
|
}, |
|
|
|
dataCompare(signupStartTime,signupStopTime,biddingStartTime,biddingStopTime){ |
|
|
|
let nowDate = Date.parse(this.format($.ajax({async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date"), "yyyy-MM-dd HH:mm:ss")); |
|
|
|
if(signupStartTime>nowDate){ |
|
|
|
//console.log('未开始') |
|
|
|
this.process= "报名未开始" |
|
|
@@ -560,8 +615,6 @@ export default { |
|
|
|
this.btnMsg="未报名" |
|
|
|
this.isSignup=true |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
if(nowDate>biddingStopTime){ |
|
|
|
//console.log('竞价结束') |
|
|
@@ -577,52 +630,8 @@ export default { |
|
|
|
$('#timeData').html(''); |
|
|
|
// this.timeData = '' |
|
|
|
} |
|
|
|
|
|
|
|
// console.log(s+'---------------'+m) |
|
|
|
if (s < 1 && m < 1){ |
|
|
|
console.log("竞价结束22222222222") |
|
|
|
getBiddingStopTime(this.id).then(response => { |
|
|
|
this.$set(this.detail,'biddingStopTime',response.data) |
|
|
|
let timeNew = Date.parse(response.data) + 0 - nowDate; |
|
|
|
if (timeNew > 0) { |
|
|
|
this.$set(this.detail,'biddingStopTime',response.data) |
|
|
|
this.getTime(); |
|
|
|
} else { |
|
|
|
clearInterval(this.timeCount); |
|
|
|
this.process = "竞价结束" |
|
|
|
this.tip = this.detail.biddingStopTime + "结束竞价" |
|
|
|
this.btnMsg = "竞价结束" |
|
|
|
this.timeMsg = "竞价结束" |
|
|
|
this.time = 0 |
|
|
|
this.isSignup = true |
|
|
|
this.showBtn = false |
|
|
|
this.biddingTimeType = 2; |
|
|
|
$('#timeData').html(''); |
|
|
|
return; |
|
|
|
} |
|
|
|
}); |
|
|
|
}else if (s%2 == 0&&time!=0){ |
|
|
|
|
|
|
|
//console.log('aaa') |
|
|
|
// console.log((biddingStopTime-nowDate)) |
|
|
|
// console.log(time) |
|
|
|
// this.getTime(); |
|
|
|
if ((biddingStopTime-nowDate)<=time){ |
|
|
|
// console.log("竞价剩余两分钟"+"m:"+m+"s:"+s) |
|
|
|
getBiddingStopTime(this.id).then(response =>{ |
|
|
|
if(this.detail.biddingStopTime!=response.data){ |
|
|
|
console.log('有人出价') |
|
|
|
this.time = null; |
|
|
|
} |
|
|
|
// this.detail.biddingStopTime = response.data |
|
|
|
this.$set(this.detail,'biddingStopTime',response.data); |
|
|
|
// this.delayPeriodNow = true; |
|
|
|
// this.time = Date.parse(response.data)+0-nowDate; |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
getBidding(){ |
|
|
|
var that = this; |
|
|
|
getBiddingList(that.biddingquery).then(response =>{ |
|
|
|