From 5eb8c33038c68769876f0fad7fe0ed3a90213900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=97=AD?= <850374051@qq.com> Date: Wed, 28 Jun 2023 13:41:18 +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 | 49 +++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/src/views/project/projectDetail.vue b/src/views/project/projectDetail.vue index 2e063fe5..45c97ad9 100644 --- a/src/views/project/projectDetail.vue +++ b/src/views/project/projectDetail.vue @@ -231,10 +231,16 @@ +

出价

{{price}}元

+ + +

出价

+
+
@@ -294,7 +300,8 @@ export default { userId:"", timeConfig:'', biddinglistInformationLength:0, - biddingTimeType:0 + biddingTimeType:0, + isFirst:'' }; }, computed: { @@ -473,7 +480,7 @@ export default { }; getSignup(data).then(r =>{ if(r.data=="1"){ - _this.isSignup=true + _this.isSignup=true; this.btnMsg="立即竞价" // this.price=this.detail.ladderPrice?this.biddinglistInformation[0].money+this.detail.ladderPrice:this.biddinglistInformation[0].money+1 }else{ @@ -507,6 +514,7 @@ export default { _this.isSignup=true this.btnMsg="立即竞价" this.showBtn=true + _this.isFirst = r.signup.isFirst; // this.price=this.detail.ladderPrice?this.biddinglistInformation[0].money+this.detail.ladderPrice:this.biddinglistInformation[0].money+1 }else{ this.btnMsg="未报名" @@ -517,6 +525,7 @@ export default { }) setInterval(function () { + console.log('qweasd') getBiddingList(that.id).then(response =>{ that.biddinglistInformation = response.rows if((response.rows.length != that.biddinglistInformationLength) && that.detail.ladderPrice){ @@ -552,6 +561,42 @@ export default { }) }); }, + + offerFirst(){ + let newMoney; + projectNewBidMoney(this.id).then(response =>{ + if (response.data&&response.code==200){ + newMoney = response.data; + }else{ + newMoney = this.detail.price; + } + + let data= { + projectId:this.id, + memberId:this.memberId, + userId:this.userId, + userAccount:this.userAccount, + userName:this.userName, + money:parseInt(newMoney).toFixed(2), + }; + biddingSubmit(data).then(response =>{ + let _this = this + if(response){ + this.$toast({ + icon: 'success', // 找到自己需要的图标 + message: '出价成功', + duration:"1000", + onClose:function(){ + _this.reload() + } + }) + + } + }) + + }); + }, + offer(){ let newMoney; projectNewBidMoney(this.id).then(response =>{