Commit 67b789a7 by yancanhua

fix: 代码优化

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