| @@ -29,7 +29,9 @@ | |||
| </van-row> | |||
| <van-row> | |||
| <van-col span="5">{{ process }}</van-col> | |||
| <van-col span="19"><van-count-down :time="time" format="DD 天 HH 时 mm 分 ss 秒" @change="timerChange" /></van-col> | |||
| <van-col span="19"> | |||
| <van-count-down :time="time" format="DD 天 HH 时 mm 分 ss 秒" @change="timerChange" /> | |||
| </van-col> | |||
| </van-row> | |||
| <van-row> | |||
| <van-col span="5">挂牌价</van-col> | |||
| @@ -275,7 +277,7 @@ export default { | |||
| process:"", | |||
| tip:"", | |||
| btnMsg:"", | |||
| time:1000000000000000000, | |||
| time:1000000000000000, | |||
| timeMsg:"", | |||
| isSignup:false, | |||
| showBtn:false, | |||
| @@ -402,6 +404,7 @@ export default { | |||
| this.detail.allCountUnit = this.selectDictLabel(res.data,response.data.allCountUnit); | |||
| }); | |||
| this.getDicts("bidding_type").then(res => { | |||
| // debugger; | |||
| this.detail.biddingType = this.selectDictLabel(res.data,response.data.biddingType); | |||
| }); | |||
| this.getDicts("bidding_direct").then(res => { | |||
| @@ -419,33 +422,7 @@ export default { | |||
| }); | |||
| } | |||
| var that = this; | |||
| getBiddingList(that.id).then(response =>{ | |||
| that.biddinglistInformation = response.rows | |||
| that.biddinglistInformationLength = response.total | |||
| if (that.detail.biddingType == '阶梯竞价'){ | |||
| if (response.rows.length>0&&that.detail.ladderPrice){ | |||
| if (that.price == 0){return;} | |||
| if (that.detail.biddingDirect == 2 ||that.detail.biddingDirect == '反向竞价') { | |||
| that.price = parseFloat(response.rows[0].money - that.detail.ladderPrice).toFixed(2) | |||
| }else{ | |||
| that.price = parseFloat(response.rows[0].money + that.detail.ladderPrice).toFixed(2) | |||
| } | |||
| }else if (response.rows.length>0&&!that.detail.ladderPrice){ | |||
| if (that.price == 0){return;} | |||
| that.price = response.rows[0].money | |||
| } | |||
| else{ | |||
| if (that.detail.biddingDirect == 2 ||that.detail.biddingDirect == '反向竞价') { | |||
| that.price = parseFloat(that.detail.price).toFixed(2) | |||
| }else{ | |||
| that.price = parseFloat(that.detail.price).toFixed(2) | |||
| } | |||
| } | |||
| } | |||
| }); | |||
| this.getBidding(); | |||
| let biddingStartTime = Date.parse(this.detail.biddingStartTime)+0 | |||
| let biddingStopTime = Date.parse(this.detail.biddingStopTime)+0 | |||
| @@ -515,7 +492,6 @@ export default { | |||
| }) | |||
| } | |||
| if(biddingStopTime>nowDate&&nowDate>biddingStartTime){ | |||
| console.log('竞价中') | |||
| this.biddingTimeType = 1; | |||
| this.process= "竞价中" | |||
| this.tip=this.detail.biddingStopTime+"结束竞价" | |||
| @@ -548,6 +524,7 @@ export default { | |||
| }) | |||
| }) | |||
| var that = this; | |||
| this.timer = setInterval(function () { | |||
| getBiddingList(that.id).then(response =>{ | |||
| that.biddinglistInformation = response.rows | |||
| @@ -585,6 +562,36 @@ export default { | |||
| }); | |||
| }, | |||
| getBidding(){ | |||
| var that = this; | |||
| getBiddingList(that.id).then(response =>{ | |||
| that.biddinglistInformation = response.rows | |||
| that.biddinglistInformationLength = response.total | |||
| if (that.detail.biddingType == '阶梯竞价'){ | |||
| if (response.rows.length>0&&that.detail.ladderPrice){ | |||
| if (that.price == 0){return;} | |||
| if (that.detail.biddingDirect == 2 ||that.detail.biddingDirect == '反向竞价') { | |||
| that.price = parseFloat(response.rows[0].money - that.detail.ladderPrice).toFixed(2) | |||
| }else{ | |||
| that.price = parseFloat(response.rows[0].money + that.detail.ladderPrice).toFixed(2) | |||
| } | |||
| }else if (response.rows.length>0&&!that.detail.ladderPrice){ | |||
| if (that.price == 0){return;} | |||
| that.price = response.rows[0].money | |||
| } | |||
| else{ | |||
| if (that.detail.biddingDirect == 2 ||that.detail.biddingDirect == '反向竞价') { | |||
| that.price = parseFloat(that.detail.price).toFixed(2) | |||
| }else{ | |||
| that.price = parseFloat(that.detail.price).toFixed(2) | |||
| } | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| offerFirst(){ | |||
| clearInterval(this.timer); | |||
| let newMoney; | |||
| @@ -611,7 +618,7 @@ export default { | |||
| message: '出价成功', | |||
| duration:"1000", | |||
| onClose:function(){ | |||
| _this.reload() | |||
| // _this.reload() | |||
| } | |||
| }) | |||
| @@ -711,14 +718,16 @@ export default { | |||
| biddingSubmit(data).then(response =>{ | |||
| let _this = this | |||
| if(response){ | |||
| clearInterval(this.timer); | |||
| // clearInterval(this.timer); | |||
| this.$toast({ | |||
| icon: 'success', // 找到自己需要的图标 | |||
| message: '出价成功', | |||
| duration:"1000", | |||
| onClose:function(){ | |||
| clearInterval(this.timer); | |||
| _this.reload() | |||
| // _this.reload() | |||
| _this.getBidding(); | |||
| _this.time = null; | |||
| if (_this.detail.biddingType=='自由竞价'||_this.detail.biddingType=='公开竞价'){ | |||
| _this.price = null; | |||
| }else{ | |||
| @@ -866,6 +875,7 @@ export default { | |||
| let h = value.hours; | |||
| let m = value.minutes; | |||
| let s = value.seconds; | |||
| if (d==0 && h==0 && m<2){ | |||
| console.log("竞价剩余两分钟"+"m:"+m+"s:"+s) | |||
| @@ -878,7 +888,7 @@ export default { | |||
| if (response.rows.length>this.biddinglistInformationLength){ | |||
| console.log("有人出价") | |||
| this.biddinglistInformationLength = response.rows.length; | |||
| this.time = 120000 | |||
| this.time = 120000; | |||
| } | |||
| }); | |||