From 80c2d2ceb9ec9e2ad7cb984b98765ca7461eb742 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=97=AD?= <850374051@qq.com> Date: Tue, 17 Oct 2023 16:26:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E6=9D=83=E4=BA=A4=E6=98=93=E5=80=92?= =?UTF-8?q?=E8=AE=A1=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/project/projectDetail.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/views/project/projectDetail.vue b/src/views/project/projectDetail.vue index 9ac18888..c9805ba2 100644 --- a/src/views/project/projectDetail.vue +++ b/src/views/project/projectDetail.vue @@ -20,8 +20,9 @@ + - {{ process }}     + {{ process }}    
@@ -296,6 +297,7 @@ export default { pageNum:1 }, timeData:'', + timeCount:null }; }, computed: { @@ -485,7 +487,7 @@ export default { let biddingStopTime = Date.parse(this.detail.biddingStopTime)+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}).getResponseHeader("Date"), "yyyy-MM-dd HH:mm:ss")); + 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; let m = Math.floor(difference/1000/60%60); @@ -556,6 +558,7 @@ export default { } if(nowDate>biddingStopTime){ //console.log('竞价结束') + clearInterval(this.timeCount); this.process= "竞价结束" this.tip=this.detail.biddingStopTime+"结束竞价" this.btnMsg="竞价结束" @@ -578,6 +581,7 @@ export default { this.$set(this.detail,'biddingStopTime',response.data) this.getTime(); } else { + clearInterval(this.timeCount); this.process = "竞价结束" this.tip = this.detail.biddingStopTime + "结束竞价" this.btnMsg = "竞价结束" @@ -657,7 +661,7 @@ export default { userAccount:this.userAccount, userName:this.userName, money:parseFloat(newMoney), - loginTime:Date.now($.ajax({async:false}).getResponseHeader("Date")) + loginTime:Date.now($.ajax({async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")) }; biddingSubmit(data).then(response =>{ let _this = this @@ -772,7 +776,7 @@ export default { userAccount:this.userAccount, userName:this.userName, money:parseFloat(this.price), - loginTime:Date.now($.ajax({async:false}).getResponseHeader("Date")) + loginTime:Date.now($.ajax({async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date")) }; // console.log(Date.now($.ajax({async:false}).getResponseHeader("Date"))) biddingSubmit(data).then(response =>{ @@ -938,7 +942,7 @@ export default { let m = value.minutes; let s = value.seconds; let biddingStopTime = Date.parse(this.detail.biddingStopTime)+0 - let nowDate = Date.parse(this.format($.ajax({async:false}).getResponseHeader("Date"), "yyyy-MM-dd HH:mm:ss")); + 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; if (s < 1 && m < 1){