diff --git a/src/api/project/index.js b/src/api/project/index.js index a2d8cdbc..1a6a370a 100644 --- a/src/api/project/index.js +++ b/src/api/project/index.js @@ -92,4 +92,11 @@ export function signUp(data) { data: data }) } +//价格查询 +export function projectNewBidMoney(id){ + return request({ + url:'/transaction/website/projectNewBidMoney/'+id, + method:'get', + }) +} diff --git a/src/views/biddingHall/index.vue b/src/views/biddingHall/index.vue index 954f58ba..515eb1d7 100644 --- a/src/views/biddingHall/index.vue +++ b/src/views/biddingHall/index.vue @@ -149,7 +149,7 @@ '未开始': '#007E72', '已结束': '#848484', '进行中': '#c21F3a', - }[item.timeType]}" v-if="item.biddingType!='自由竞价'&&(item.money!=null||item.money!=0||item.money!=undefined)"> + }[item.timeType]}" v-if="item.biddingType!='自由竞价'&&item.money"> {{item.money}}{{item.priceUnit}} @@ -158,7 +158,7 @@ '未开始': '#007E72', '已结束': '#848484', '进行中': '#c21F3a', - }[item.timeType]}" v-if="item.biddingType!='自由竞价'&&(item.money==null||item.money==0||item.money==undefined)"> + }[item.timeType]}" v-if="item.biddingType!='自由竞价'&&!item.money"> 暂无出价 diff --git a/src/views/project/projectDetail.vue b/src/views/project/projectDetail.vue index 3155fdc4..ce981418 100644 --- a/src/views/project/projectDetail.vue +++ b/src/views/project/projectDetail.vue @@ -244,7 +244,8 @@ import { getMember, getOutProjectDetail, getSignup, - getWebConfig + getWebConfig, + projectNewBidMoney } from "../../api/project"; import {getInfo} from "../../api/login"; @@ -382,6 +383,23 @@ export default { i.areaUnit = this.selectDictLabel(res.data,i.areaUnit); }); } + + var that = this; + getBiddingList(that.id).then(response =>{ + that.biddinglistInformation = response.rows + that.biddinglistInformationLength = response.total + if (response.rows.length>0&&that.detail.ladderPrice){ + console.log(that.detail.biddingDirect) + if (that.price == 0){return;} + if (that.detail.biddingDirect == 2 ||that.detail.biddingDirect == '反向竞价') { + that.price = response.rows[0].money - that.detail.ladderPrice + }else{ + that.price = response.rows[0].money + that.detail.ladderPrice + } + + } + }); + let biddingStartTime = Date.parse(this.detail.biddingStartTime)+0 let biddingStopTime = Date.parse(this.detail.biddingStopTime)+0 let signupStartTime = Date.parse(this.detail.signupStartTime)+0 @@ -481,9 +499,24 @@ export default { }) }) }) + + setInterval(function () { + getBiddingList(that.id).then(response =>{ + that.biddinglistInformation = response.rows + if((response.rows.length != that.biddinglistInformationLength) && that.detail.ladderPrice){ + + if (that.detail.biddingDirect == 2 ||that.detail.biddingDirect == '反向竞价') { + that.price = parseInt(response.rows[0].money) - parseInt(that.detail.ladderPrice) + }else{ + that.price = parseInt(response.rows[0].money) + parseInt(that.detail.ladderPrice) + } + } + that.biddinglistInformationLength = response.total + }); + },10000) } if(nowDate>biddingStopTime){ - console.log('竞价结束111111111') + console.log('竞价结束') this.process= "竞价结束" this.tip=this.detail.biddingStopTime+"结束竞价" this.btnMsg="竞价结束" @@ -502,38 +535,16 @@ export default { } }) }); - var that = this; - getBiddingList(that.id).then(response =>{ - that.biddinglistInformation = response.rows - that.biddinglistInformationLength = response.total - if (response.rows.length>0&&that.detail.ladderPrice){ - console.log(that.detail.biddingDirect) - if (that.price == 0){return;} - if (that.detail.biddingDirect == 2 ||that.detail.biddingDirect == '反向竞价') { - that.price = response.rows[0].money - that.detail.ladderPrice - }else{ - that.price = response.rows[0].money + that.detail.ladderPrice - } - - } - }); - setInterval(function () { - getBiddingList(that.id).then(response =>{ - that.biddinglistInformation = response.rows - if((response.rows.length != that.biddinglistInformationLength) && that.detail.ladderPrice){ - - if (that.detail.biddingDirect == 2 ||that.detail.biddingDirect == '反向竞价') { - that.price = parseInt(response.rows[0].money) - parseInt(that.detail.ladderPrice) - }else{ - that.price = parseInt(response.rows[0].money) + parseInt(that.detail.ladderPrice) - } - } - that.biddinglistInformationLength = response.total - }); - },1000) - }, offer(){ + let newMoney; + projectNewBidMoney(this.id).then(response =>{ + if (response.msg&&response.code==200){ + newMoney = response.msg; + }else{ + newMoney = this.detail.price; + } + }); if (this.price==''||this.price==0||this.price<0||this.price == null){ this.$toast({ @@ -561,7 +572,7 @@ export default { if (this.detail.biddingType=='阶梯竞价'||this.detail.biddingType=='公开竞价'){ if (this.biddinglistInformation.length>1){ //判断用户出价不能高于当前出价最低价格 - if(this.biddinglistInformation[0].money <= this.price){ + if(newMoney <= this.price){ this.$toast({ icon: 'fail', // 找到自己需要的图标 message: '出价不能高于当前出价最低价格', @@ -589,7 +600,7 @@ export default { if (this.detail.biddingType=='阶梯竞价'||this.detail.biddingType=='公开竞价'){ if (this.biddinglistInformation.length>1){ //判断用户出价不能高于当前出价最低价格 - if(this.biddinglistInformation[0].money >= this.price){ + if(newMoney >= this.price){ this.$toast({ icon: 'fail', // 找到自己需要的图标 message: '出价不能低于当前出价最高价格', @@ -621,7 +632,7 @@ export default { duration:"1000", onClose:function(){ _this.reload() - _this.price = 0; + _this.price = _this.price-_this.detail.ladderPrice; } }) diff --git a/src/views/register/companyRegister.vue b/src/views/register/companyRegister.vue index 6eb4f4f6..3c3cdd82 100644 --- a/src/views/register/companyRegister.vue +++ b/src/views/register/companyRegister.vue @@ -37,7 +37,7 @@ - + 银行信息