From ad0edadd28b848e9127cc350eda3c505aa08c975 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 09:13:17 +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 --- src/views/project/projectDetail.vue | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/views/project/projectDetail.vue b/src/views/project/projectDetail.vue index c5a44b86..c3fd10a9 100644 --- a/src/views/project/projectDetail.vue +++ b/src/views/project/projectDetail.vue @@ -485,7 +485,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({type:'HEAD',async:false,data:{i: Date.parse(new Date())}}).getResponseHeader("Date"), "yyyy-MM-dd HH:mm:ss")); + let nowDate = Date.parse(this.format($.ajax({async:false}).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); @@ -497,12 +497,7 @@ export default { this.tip=this.detail.signupStartTime+"开始报名" this.btnMsg="立即报名" this.timeMsg="距报名开始" - this.timeData = { - days :signupStartTime-nowDate, - hours :signupStartTime-nowDate, - minutes :signupStartTime-nowDate, - seconds :signupStartTime-nowDate, - } + this.timeData = this.TimeInterval(signupStartTime-nowDate); this.isSignup=true } if(signupStopTime>nowDate&&signupStopTime>signupStartTime){ @@ -511,7 +506,8 @@ export default { this.tip=this.detail.signupStopTime+"报名截止" this.btnMsg="立即报名" this.timeMsg="距报名截止" - this.time = signupStopTime-nowDate + // this.time = signupStopTime-nowDate + this.timeData = this.TimeInterval(signupStopTime-nowDate); if(this.getSignupData=="1"){ this.isSignup=true this.btnMsg="已报名" @@ -523,7 +519,8 @@ export default { this.process= "竞价未开始" this.tip=this.detail.biddingStartTime+"开始竞价" this.timeMsg="距竞价开始" - this.time = biddingStartTime-nowDate + // this.time = biddingStartTime-nowDate + this.timeData = this.TimeInterval(biddingStartTime-nowDate); if(this.getSignupData=="1"){ this.isSignup=true; this.btnMsg="立即竞价" @@ -563,6 +560,7 @@ export default { this.isSignup = true this.showBtn=false this.biddingTimeType = 2; + this.timeData = '' } // console.log(s+'---------------'+m) @@ -599,9 +597,9 @@ export default { console.log('有人出价') this.time = null; } - this.detail.biddingStopTime = response.data + // this.detail.biddingStopTime = response.data this.$set(this.detail,'biddingStopTime',response.data); - this.delayPeriodNow = true; + // this.delayPeriodNow = true; // this.time = Date.parse(response.data)+0-nowDate; }); } @@ -990,7 +988,8 @@ export default { var min = Math.floor(second / 60 % 60); // 秒 var sec = Math.floor(second % 60); - return (day?day + "天":'0天') + (hr?hr+ "时":'时') + ( min?min + "分":'0分') + ( sec?sec + "秒":'0秒'); + + return (day?day + "天":'0天') + (hr?hr+ "时":'0时') + ( min?min + "分":'0分') + sec + "秒"; }, },