Commit c8a397b4 by yancanhua

fix: 代码优化

1 parent 04190250
......@@ -310,7 +310,7 @@
<van-button v-else type="primary" hairline round block @click="submitBid">支付保证金【{{ auctionVehicle.auction.deposit }}元】参拍</van-button>
</view>
<!-- 同意规则 -->
<view class="agreement-container">
<!-- <view class="agreement-container">
<view class="checkbox-item">
<van-checkbox :value="isAgreed" shape="square" @change="toggleAgreement"></van-checkbox>
<view class="agreement-text">
......@@ -318,7 +318,7 @@
<text @click="navigateTo('/module/profile/AgreementPage?key=VIOLATION')">《违规扣款规则》</text>
</view>
</view>
</view>
</view> -->
</view>
</view>
</uni-popup>
......
......@@ -369,20 +369,18 @@ export default class roundBidBottom extends Vue {
setNewRemainSecond() {
let newTime = this.pageData.remainSecond;
if (newTime && this.newRemainSecond != newTime && this.newRemainSecond < (newTime - 1)) {
this.newRemainSecond = newTime;
if (newTime) {
this.newRemainSecond = Math.max(0, newTime);
}
if (newTime && this.newRemainSecond != newTime && (Number(this.newRemainSecond) - 3) > newTime) {
this.newRemainSecond = newTime;
}
if (this.pageData.remainSecond && !this.pageData.over) {
if (newTime && !this.pageData.over) {
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
if (currentPage.route == 'module/auction/AuctionVehiclePage') {
setTimeout(() => {
this.newRemainSecond = Number(this.newRemainSecond) - 1;
this.newRemainSecond = Math.max(0, Number(this.newRemainSecond) - 1);
if (this.newRemainSecond <= 0 || this.pageData.over) {
this.newRemainSecond = 0;
}
this.setNewRemainSecond();
}, 1000);
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!