张泽亮 1 year ago
parent
commit
24b866aff8
5 changed files with 97 additions and 42 deletions
  1. +7
    -0
      src/api/project/index.js
  2. +2
    -2
      src/views/biddingHall/index.vue
  3. +46
    -35
      src/views/project/projectDetail.vue
  4. +17
    -1
      src/views/register/companyRegister.vue
  5. +25
    -4
      src/views/register/userRegister.vue

+ 7
- 0
src/api/project/index.js View File

@@ -92,4 +92,11 @@ export function signUp(data) {
data: data
})
}
//价格查询
export function projectNewBidMoney(id){
return request({
url:'/transaction/website/projectNewBidMoney/'+id,
method:'get',
})
}


+ 2
- 2
src/views/biddingHall/index.vue View File

@@ -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}}
</span>

@@ -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">
暂无出价
</span>



+ 46
- 35
src/views/project/projectDetail.vue View File

@@ -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;
}
})



+ 17
- 1
src/views/register/companyRegister.vue View File

@@ -37,7 +37,7 @@
<van-uploader :after-read="afterReadYYZZ" :before-delete="deleteFileYYZZ" v-model="fileListYYZZ" multiple :max-count="1" />
</template>
</van-field>
<van-divider>银行信息</van-divider>
<van-field name="uploader" label="开户证明" required>
<template #input>
@@ -346,6 +346,22 @@ export default {
}
depositList(data).then(response => {
if (response.rows.length<1){
if (this.sheng==''||this.shi==''){
this.$toast({
icon: 'fail', // 找到自己需要的图标
message: '请选择省市',
duration:"1000",
})
return;
}
if (this.bankDeposit==''){
this.$toast({
icon: 'fail', // 找到自己需要的图标
message: '请输入关键词',
duration:"1000",
})
return;
}
realtimeBackList(data).then(response2 => {
console.log(response2)
this.bankAddressOption = response2.data;


+ 25
- 4
src/views/register/userRegister.vue View File

@@ -145,7 +145,7 @@

<script>
import { getCodeImg } from "@/api/login";
import { userRegister,base64Upload,realtimeBackList } from "@/api/register/index";
import {userRegister, base64Upload, realtimeBackList, depositList} from "@/api/register/index";
import {deleteUserImg, options, realtimeList} from "@/api/user";
export default {
name: "userRegister",
@@ -307,9 +307,30 @@ export default {
bankType:this.form.bankType,
bankDeposit:this.form.bankDeposit,
}
realtimeBackList(data).then(response => {
console.log(response)
this.bankAddressOption = response.data;
depositList(data).then(response => {
if (response.rows.length<1){
if (this.sheng==''||this.shi==''){
this.$toast({
icon: 'fail', // 找到自己需要的图标
message: '请选择省市',
duration:"1000",
})
return;
}
if (this.bankDeposit==''){
this.$toast({
icon: 'fail', // 找到自己需要的图标
message: '请输入关键词',
duration:"1000",
})
return;
}
realtimeBackList(data).then(response2 => {
this.bankAddressOption = response2.data;
});
}else{
this.bankAddressOption = response.rows;
}
});
},



Loading…
Cancel
Save