Commit c8a397b4 by yancanhua

fix: 代码优化

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