瀏覽代碼

产权交易

rongxin_prod
庞东旭 1 年之前
父節點
當前提交
8af5bad3f0
共有 2 個文件被更改,包括 31 次插入19 次删除
  1. +23
    -19
      src/views/project/projectDetail.vue
  2. +8
    -0
      src/views/user/index.vue

+ 23
- 19
src/views/project/projectDetail.vue 查看文件

@@ -70,7 +70,7 @@
<van-row>
<van-col span="24"><span>竞价方向:</span>{{ detail.biddingDirect }}</van-col>
</van-row>
<van-row v-if="detail.ladderPrice">
<van-row v-if="detail.ladderPrice&&detail.biddingType=='阶梯竞价'">
<van-col span="24"><span>阶梯价(增减幅度):</span>¥{{ detail.ladderPrice }}</van-col>
</van-row>
<van-row>
@@ -206,9 +206,9 @@
</van-button>
</van-col>
</van-row>
<van-field v-if="showBtn&&!detail.ladderPrice" v-model="price" type="number" input-align="center" placeholder="请输入出价金额" />
<van-field v-if="showBtn&&detail.biddingType=='自由竞价'" v-model="price" type="number" input-align="center" placeholder="请输入出价金额" />
<van-row v-if="showBtn" type="flex" justify="space-around">
<van-col span="4" v-if="detail.ladderPrice" style="text-align: center;line-height: 1rem">
<van-col span="4" v-if="detail.ladderPrice&&detail.biddingType!='自由竞价'" style="text-align: center;line-height: 1rem">
<van-button color="#e2e2e2" icon="minus" size="small" @click="sub"></van-button>
</van-col>
<van-col span="16">
@@ -216,7 +216,7 @@
<div style="display: flex;">
<van-button round color="#C21F3A" block @click="offer">
<p>出价</p>
<p v-if="detail.ladderPrice">{{price}}元</p>
<p v-if="detail.ladderPrice&&detail.biddingType!='自由竞价'">{{price}}元</p>
</van-button>

<van-button v-if="isFirst == 'Y'" round color="#C21F3A" block @click="offerFirst" style="margin-left: 10px;">
@@ -224,7 +224,7 @@
</van-button>
</div>
</van-col>
<van-col span="4" v-if="detail.ladderPrice" style="text-align: center;line-height: 1rem">
<van-col span="4" v-if="detail.ladderPrice&&detail.biddingType!='自由竞价'" style="text-align: center;line-height: 1rem">
<van-button color="#e2e2e2" icon="plus" size="small" @click="add"></van-button>
</van-col>
</van-row>
@@ -400,23 +400,27 @@ export default {
getBiddingList(that.id).then(response =>{
that.biddinglistInformation = response.rows
that.biddinglistInformationLength = response.total
if (response.rows.length>0&&that.detail.ladderPrice){
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
}
}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 = that.detail.price - that.detail.ladderPrice
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{
that.price = that.detail.price + that.detail.ladderPrice
if (that.detail.biddingDirect == 2 ||that.detail.biddingDirect == '反向竞价') {
that.price = parseFloat(that.detail.price - that.detail.ladderPrice).toFixed(2)
}else{
that.price = parseFloat(that.detail.price + that.detail.ladderPrice).toFixed(2)
}
}
}


});

let biddingStartTime = Date.parse(this.detail.biddingStartTime)+0


+ 8
- 0
src/views/user/index.vue 查看文件

@@ -27,6 +27,8 @@
<script>
import { getMember , supplyList , deleteSupply} from "@/api/user/index";
import { logout ,getInfo } from "@/api/login/index";
import Cookies from "js-cookie";

export default {
name: "user",
data() {
@@ -41,6 +43,11 @@ export default {
methods: {
loginOut(){
logout().then(response => {
var keys = document.cookie.match(/[^ =;]+(?=\=)/g);
if(keys) {
for(var i = keys.length; i--;)
document.cookie = keys[i] + '=0;expires=' + new Date(0).toUTCString()
}
this.$router.push({name:'index'})
});
},
@@ -50,6 +57,7 @@ export default {
this.user = response.user;
getMember(response.user.userId).then(response => {
console.log(response)
Cookies.set('memberId',response.data.id)
this.phone = response.data.phone;
});
});


Loading…
取消
儲存