diff --git a/src/utils/request.js b/src/utils/request.js index b3d7c24b..4f780619 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -79,15 +79,15 @@ service.interceptors.response.use(res => { } } catch (e) { console.log(e); } - if (window.location.href.indexOf('lawEnforcement') != -1) { + if (window.location.href.indexOf('/lawEnforcement') != -1) { window.location.href = '/lawEnforcement/login'; - } else if (window.location.href.indexOf('authenticRight') != -1) { + } else if (window.location.href.indexOf('/authenticRight') != -1) { window.location.href = '/authenticRight/login'; - } else if (window.location.href.indexOf('homesteadSurvey') != -1) { + } else if (window.location.href.indexOf('/homesteadSurvey') != -1) { window.location.href = '/homesteadLogin'; - } else if (window.location.href.indexOf('onlineHome') != -1) { + } else if (window.location.href.indexOf('/onlineHome') != -1) { window.location.href = '/zjdLogin'; - } else if (window.location.href.indexOf('yinnong') != -1) { + } else if (window.location.href.indexOf('/yinnong') != -1) { window.location.href = '/yinnongLogin'; } else if (window.location.href.indexOf('/sunVillage_info/') != -1) { window.location.href = '/sunVillage_info/login'; @@ -95,7 +95,7 @@ service.interceptors.response.use(res => { window.location.href = '/sunVillage/login'; } else if (window.location.href.indexOf('/homestead/') != -1) { window.location.href = '/homestead/login'; - }else if (window.location.href.indexOf('agriculturalTrusteeship') != -1){ + }else if (window.location.href.indexOf('/agriculturalTrusteeship') != -1){ window.location.href = '/agriculturalTrusteeship/login'; } else { window.location.href = '/login'; diff --git a/src/views/project/projectDetail.vue b/src/views/project/projectDetail.vue index 68e34cd1..de6aa044 100644 --- a/src/views/project/projectDetail.vue +++ b/src/views/project/projectDetail.vue @@ -502,14 +502,28 @@ export default { } }) }); - getBiddingList(this.id).then(response =>{ - this.biddinglistInformation = response.rows - this.biddinglistInformationLength = response.total - if (response.rows.length>0&&this.detail.ladderPrice){ - this.price = response.rows[0].money+this.detail.ladderPrice - } + 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 + that.biddinglistInformationLength = response.total + }); + },1000) + }, offer(){ @@ -539,7 +553,7 @@ export default { if (this.detail.biddingType=='阶梯竞价'||this.detail.biddingType=='公开竞价'){ if (this.biddinglistInformation.length>1){ //判断用户出价不能高于当前出价最低价格 - if(this.biddinglistInformation[0].money < this.price){ + if(this.biddinglistInformation[0].money <= this.price){ this.$toast({ icon: 'fail', // 找到自己需要的图标 message: '出价不能高于当前出价最低价格', @@ -567,7 +581,7 @@ export default { if (this.detail.biddingType=='阶梯竞价'||this.detail.biddingType=='公开竞价'){ if (this.biddinglistInformation.length>1){ //判断用户出价不能高于当前出价最低价格 - if(this.biddinglistInformation[0].money > this.price){ + if(this.biddinglistInformation[0].money >= this.price){ this.$toast({ icon: 'fail', // 找到自己需要的图标 message: '出价不能低于当前出价最高价格', @@ -598,7 +612,7 @@ export default { message: '出价成功', duration:"1000", onClose:function(){ - // _this.reload() + _this.reload() } }) @@ -607,8 +621,8 @@ export default { }, add(){ if (this.detail.biddingDirect == '反向竞价'){ - if (this.biddinglistInformation.length<=1){ - if(this.detail.pricethis.biddinglistInformation[0].money){ - this.price-=this.detail.ladderPrice + if (this.detail.biddingDirect == '反向竞价'){ + if (this.biddinglistInformation.length<1){ + if(this.detail.price<=this.price){ + this.$toast({ + icon: 'fail', // 找到自己需要的图标 + message: '出价不能高于挂牌价格', + duration:"1000", + onClose:function(){ + } + }) + return; + } }else{ - this.$toast({ - icon: 'error', // 找到自己需要的图标 - message: '出价不能低于当前最高价', - duration:"1000", - }) + if(this.biddinglistInformation[0].moneythis.biddinglistInformation[0].money){ - this.price-=1 + if (this.biddinglistInformation.length<1){ + if(this.detail.price>=this.price){ + this.$toast({ + icon: 'fail', // 找到自己需要的图标 + message: '出价不能低于挂牌价格', + duration:"1000", + onClose:function(){ + } + }) + return; + } }else{ - this.$toast({ - icon: 'error', // 找到自己需要的图标 - message: '出价不能低于当前最高价', - duration:"1000", - }) + if(this.biddinglistInformation[0].money>=this.price){ + this.$toast({ + icon: 'fail', // 找到自己需要的图标 + message: '出价不能低于当前出价最高价格', + duration:"1000", + onClose:function(){ + } + }) + return; + } } } + + this.price == null?this.price = 0:this.price = this.price; + if (this.price == 0)return; + this.detail.ladderPrice?this.price=parseInt(this.price)-parseInt(this.detail.ladderPrice):this.price -= 1 + // if(this.detail.ladderPrice){ + // if((this.price-this.detail.ladderPrice)>this.biddinglistInformation[0].money){ + // this.price-=this.detail.ladderPrice + // }else{ + // this.$toast({ + // icon: 'error', // 找到自己需要的图标 + // message: '出价不能低于当前最高价', + // duration:"1000", + // }) + // } + // }else{ + // if((this.price-1)>this.biddinglistInformation[0].money){ + // this.price-=1 + // }else{ + // this.$toast({ + // icon: 'error', // 找到自己需要的图标 + // message: '出价不能低于当前最高价', + // duration:"1000", + // }) + // } + // } }, timerChange(value){ let d = value.days; diff --git a/src/views/sunVillage_info/list_signature.vue b/src/views/sunVillage_info/list_signature.vue index 11355ead..fc61da25 100644 --- a/src/views/sunVillage_info/list_signature.vue +++ b/src/views/sunVillage_info/list_signature.vue @@ -45,7 +45,7 @@

预览