Commit 67b789a7 by yancanhua

fix: 代码优化

1 parent 1a97cade
...@@ -90,6 +90,7 @@ export default class RoundBidPopup extends Vue { ...@@ -90,6 +90,7 @@ export default class RoundBidPopup extends Vue {
toNextAucVeh() { toNextAucVeh() {
this.popupRef.close('center'); this.popupRef.close('center');
uni.navigateTo({ url: '/module/auction/AuctionVehiclePage?aucvehId=' + this.nextAucVehData.aucvehId }); uni.navigateTo({ url: '/module/auction/AuctionVehiclePage?aucvehId=' + this.nextAucVehData.aucvehId });
this.isClose = true;
} }
closePopup() { closePopup() {
......
...@@ -27,13 +27,14 @@ ...@@ -27,13 +27,14 @@
<view class="tag-item"> <view class="tag-item">
<template v-if="auctionVehicle.auctionState==='PREVIEW'"> <template v-if="auctionVehicle.auctionState==='PREVIEW'">
<template v-if="previewLessThen24h"> <template v-if="previewLessThen24h">
<van-count-down v-if="auctionVehicle.auction.auctionMode!=2" class="white-small-count-down" :time="previewCountDown" format="HH:mm:ss 后开拍" @finish="countDownBidStart"/> <van-count-down v-if="Number(previewCountDown) > 0 " class="white-small-count-down" :time="previewCountDown" format="HH:mm:ss 后开拍" @finish="countDownBidStart"/>
</template> </template>
<template v-else> <template v-else>
{{ previewStatus }} {{ previewStatus }}
</template> </template>
</template> </template>
<template v-if="auctionVehicle.auctionState==='AUCTIONING'"> <template v-if="auctionVehicle.auctionState==='AUCTIONING'">
<template v-if="auctionVehicle.auction.auctionMode==1">
<template v-if="remaining5m"> <template v-if="remaining5m">
<van-count-down class="white-small-count-down" :time="endRemaining" format="距离结束 mm:ss" @finish="countDownBidEnd"/> <van-count-down class="white-small-count-down" :time="endRemaining" format="距离结束 mm:ss" @finish="countDownBidEnd"/>
</template> </template>
...@@ -41,6 +42,7 @@ ...@@ -41,6 +42,7 @@
<van-count-down class="white-small-count-down" :time="endRemaining" format="距离结束 HH:mm:ss" @finish="countDownBidEnd"/> <van-count-down class="white-small-count-down" :time="endRemaining" format="距离结束 HH:mm:ss" @finish="countDownBidEnd"/>
</template> </template>
</template> </template>
</template>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -315,6 +315,7 @@ export default class roundBidBottom extends Vue { ...@@ -315,6 +315,7 @@ export default class roundBidBottom extends Vue {
} }
} else if (data.auctionState == 'AUCTIONING') { //竞拍中 } else if (data.auctionState == 'AUCTIONING') { //竞拍中
this.pageState = 'AUCTIONING'; this.pageState = 'AUCTIONING';
this.newRemainSecond = 0;
this.getBidRemainSecData(); this.getBidRemainSecData();
} }
}); });
...@@ -345,7 +346,9 @@ export default class roundBidBottom extends Vue { ...@@ -345,7 +346,9 @@ export default class roundBidBottom extends Vue {
}, 600); }, 600);
} }
if (data.significantPriceIncrease) { if (data.significantPriceIncrease) {
setTimeout(() => {
uni.showToast({ title: '有用户大幅度加价!最新价升至' + this.resultPrice + '万', icon: 'none' }); uni.showToast({ title: '有用户大幅度加价!最新价升至' + this.resultPrice + '万', icon: 'none' });
}, 300);
} }
const pages = getCurrentPages(); const pages = getCurrentPages();
const currentPage = pages[pages.length - 1]; const currentPage = pages[pages.length - 1];
...@@ -363,7 +366,7 @@ export default class roundBidBottom extends Vue { ...@@ -363,7 +366,7 @@ export default class roundBidBottom extends Vue {
setNewRemainSecond() { setNewRemainSecond() {
let newTime = this.pageData.remainSecond; let newTime = this.pageData.remainSecond;
if (this.newRemainSecond != newTime && this.newRemainSecond < (newTime - 1)) { if (newTime && this.newRemainSecond != newTime && this.newRemainSecond < (newTime - 1)) {
this.newRemainSecond = newTime; this.newRemainSecond = newTime;
} }
if (this.pageData.remainSecond) { if (this.pageData.remainSecond) {
...@@ -401,7 +404,9 @@ export default class roundBidBottom extends Vue { ...@@ -401,7 +404,9 @@ export default class roundBidBottom extends Vue {
const bidRequest = { aucvehId: this.auctionVehicle.aucvehId, bidPrice: bidPrice }; const bidRequest = { aucvehId: this.auctionVehicle.aucvehId, bidPrice: bidPrice };
uni.showLoading({ title: '正在提交竞价信息...', mask: true }); uni.showLoading({ title: '正在提交竞价信息...', mask: true });
BidController.addBid(this.axios, bidRequest).then(res => { BidController.addBid(this.axios, bidRequest).then(res => {
setTimeout(() => {
uni.showToast({ title: '出价成功', icon: 'success' }); uni.showToast({ title: '出价成功', icon: 'success' });
}, 300);
}).finally(() => { }).finally(() => {
uni.hideLoading(); uni.hideLoading();
}); });
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!