From f06dd4daf5630d11f0cbd73655ceca85c44c485c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BA=9E=E4=B8=9C=E6=97=AD?= <850374051@qq.com>
Date: Fri, 17 Mar 2023 13:42:53 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E6=9D=83=E4=BA=A4=E6=98=93=E9=97=AE?=
=?UTF-8?q?=E9=A2=98=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/project/index.js | 2 +-
src/views/project/projectDetail.vue | 71 +++++++++++++++++++++++------
src/views/project/signUp.vue | 17 +++++--
src/views/register/userRegister.vue | 9 +++-
4 files changed, 80 insertions(+), 19 deletions(-)
diff --git a/src/api/project/index.js b/src/api/project/index.js
index e4a2adf4..6a894275 100644
--- a/src/api/project/index.js
+++ b/src/api/project/index.js
@@ -78,7 +78,7 @@ export function getSignup (params) {
// 出价
export function biddingSubmit (params) {
return request({
- url:'/transaction/bidding',
+ url:'/transaction/bidding/add',
method: 'post',
data:params
})
diff --git a/src/views/project/projectDetail.vue b/src/views/project/projectDetail.vue
index ee7ed722..3858e1e5 100644
--- a/src/views/project/projectDetail.vue
+++ b/src/views/project/projectDetail.vue
@@ -191,7 +191,7 @@
-
+
@@ -205,6 +205,7 @@
+
@@ -212,7 +213,7 @@
出价
- {{price}}元
+
@@ -266,7 +267,7 @@ export default {
timeMsg:"",
isSignup:false,
showBtn:false,
- price:0,
+ price:null,
userAccount:"",
userName:"",
userId:""
@@ -353,19 +354,23 @@ export default {
let signupStopTime = Date.parse(this.detail.signupStopTime)+0
let nowDate = Date.parse(new Date());
- console.log('biddingStartTime'+biddingStartTime)
- console.log('biddingStopTime'+biddingStopTime)
- console.log('signupStartTime'+signupStartTime)
- console.log('signupStopTime'+signupStopTime)
+ console.log('竞价开始时间'+biddingStartTime)
+ console.log('竞价截止时间'+biddingStopTime)
+ console.log('报名开始时间'+signupStartTime)
+ console.log('报名截止时间'+signupStopTime)
+ console.log('当前时间'+nowDate)
if(signupStartTime>nowDate){
+ console.log('未开始')
this.process= "报名未开始"
this.tip=this.detail.signupStartTime+"开始报名"
this.btnMsg="立即报名"
this.timeMsg="距报名开始"
this.time = signupStartTime-nowDate
this.isSignup=true
- }else if(signupStopTime>nowDate&&signupStopTime>signupStartTime){
+ }
+ if(signupStopTime>nowDate&&signupStopTime>signupStartTime){
+ console.log('报名中')
this.process= "报名中"
this.tip=this.detail.signupStopTime+"报名截止"
this.btnMsg="立即报名"
@@ -387,7 +392,9 @@ export default {
})
})
})
- }else if(biddingStartTime>nowDate&&nowDate>signupStopTime){
+ }
+ if(biddingStartTime>nowDate&&nowDate>signupStopTime){
+ console.log('竞价未开始')
this.process= "竞价未开始"
this.tip=this.detail.biddingStartTime+"开始竞价"
this.timeMsg="距竞价开始"
@@ -403,14 +410,16 @@ export default {
if(r.data=="1"){
_this.isSignup=true
this.btnMsg="立即竞价"
- this.price=this.detail.ladderPrice?this.biddinglistInformation[0].money+this.detail.ladderPrice:this.biddinglistInformation[0].money+1
+ // this.price=this.detail.ladderPrice?this.biddinglistInformation[0].money+this.detail.ladderPrice:this.biddinglistInformation[0].money+1
}else{
this.btnMsg="未报名"
}
})
})
})
- }else if(biddingStopTime>nowDate&&nowDate>biddingStartTime){
+ }
+ if(biddingStopTime>nowDate&&nowDate>biddingStartTime){
+ console.log('竞价中')
this.process= "竞价中"
this.tip=this.detail.biddingStopTime+"结束竞价"
this.timeMsg="距竞价结束"
@@ -431,7 +440,7 @@ export default {
_this.isSignup=true
this.btnMsg="立即竞价"
this.showBtn=true
- this.price=this.detail.ladderPrice?this.biddinglistInformation[0].money+this.detail.ladderPrice:this.biddinglistInformation[0].money+1
+ // this.price=this.detail.ladderPrice?this.biddinglistInformation[0].money+this.detail.ladderPrice:this.biddinglistInformation[0].money+1
}else{
this.btnMsg="未报名"
_this.isSignup=true
@@ -439,7 +448,9 @@ export default {
})
})
})
- }else if(nowDate>biddingStopTime){
+ }
+ if(nowDate>biddingStopTime){
+ console.log('竞价结束')
this.process= "竞价结束"
this.tip=this.detail.biddingStopTime+"结束竞价"
this.btnMsg="竞价结束"
@@ -460,6 +471,40 @@ export default {
});
},
offer(){
+
+ if (this.price==''||this.price<1||this.price == null){
+ this.$toast({
+ icon: 'fail', // 找到自己需要的图标
+ message: '请输入出价金额',
+ duration:"1000",
+ onClose:function(){
+ }
+ })
+ return;
+ }
+ if (this.detail.biddingDirect == '递减竞价'){
+ if(this.detail.pricethis.price){
+ this.$toast({
+ icon: 'fail', // 找到自己需要的图标
+ message: '出价不能低于挂牌价',
+ duration:"1000",
+ onClose:function(){
+ }
+ })
+ return;
+ }
+ }
let data= {
projectId:this.id,
memberId:this.memberId,
diff --git a/src/views/project/signUp.vue b/src/views/project/signUp.vue
index 94dbe751..622ee185 100644
--- a/src/views/project/signUp.vue
+++ b/src/views/project/signUp.vue
@@ -30,8 +30,8 @@
2.竞买人身份确认
+ {
getMember(response.user.userId).then(res => {
- this.nickName = res.data.realname
+ this.realname = res.data.realname
+ this.bankCardName = res.data.bankCardName
this.idCardNum = res.data.idCardNum
this.bankAddress = res.data.bankAddress
this.bankCardNum = res.data.bankCardNum
diff --git a/src/views/register/userRegister.vue b/src/views/register/userRegister.vue
index 07f95de3..16aaeaa1 100644
--- a/src/views/register/userRegister.vue
+++ b/src/views/register/userRegister.vue
@@ -85,7 +85,14 @@ export default {
getSubmit(){
console.log(this.form)
userRegister(this.form).then((res) => {
- console.log(res)
+ this.$toast({
+ icon: 'success', // 找到自己需要的图标
+ message: '注册成功',
+ duration:"2000",
+ onClose:function(){
+ this.$router.push({path: '/login'})
+ }
+ })
});
}
},