Commit 2ebfbfd0 by yancanhua

fix: 轮巡出价测试问题修改

1 parent c9e83d68
......@@ -59,6 +59,7 @@ export default class AuctionVehicleItem extends AbstractVehicleItem {
setTimeout(() => {
uni.showToast({title: this.auctionVehicle.favorite ? '收藏成功' : '取消收藏 '});
}, 300);
this.$emit('emitLoadList');
}).finally(() => uni.hideLoading());
}
......
......@@ -20,7 +20,7 @@
<scroll-view class="scroll-content" scroll-y :refresher-enabled="true" :refresher-triggered="loading" @scrolltolower="doInfinite()" @refresherrefresh="pageReload">
<view class="car-list">
<template v-if="contents.length>0" v-for="(car, index) in contents" :key="index">
<auction-vehicle-item :auction-vehicle="car"></auction-vehicle-item>
<auction-vehicle-item :auction-vehicle="car" @emitLoadList="pageReload"></auction-vehicle-item>
</template>
<van-empty class="search-empty" v-else image="https://img02.glsx.com.cn/aus/images/empty_2.png" width="100" height="100" description="未找到相关车源,为你推荐以下车源"/>
</view>
......
......@@ -945,7 +945,7 @@ export default class AuctionVehiclePage extends Vue {
// 使用 selector 方式滚动,更准确
uni.pageScrollTo({
selector: `#${sectionId}`,
offset: -47, // 偏移量,减去头部锚点的高度
offsetTop: -40, // 偏移量,减去头部锚点的高度
duration: 300
});
// 延迟更新当前激活的锚点
......
......@@ -38,7 +38,7 @@
<view v-if="isNextAucVeh" class="dialog-footer">
<van-button class="dialog-footer_but" type="default" round block @click="handleClose()">取消</van-button>
<van-button class="dialog-footer_but" type="primary" style="margin-left: 12px;" hairline round block>
<van-button class="dialog-footer_but" type="primary" style="margin-left: 12px;" hairline round block @click="toNextAucVeh()">
继续参拍
<text v-if="nextAucVehData.remainSecond">({{ nextAucVehData.remainSecond || 0 }}s)</text>
</van-button>
......
......@@ -28,7 +28,7 @@
<view class="car-list">
<template v-if="contents.length>0" v-for="(car, index) in contents" :key="index">
<!-- 车辆项 -->
<auction-vehicle-item :auction-vehicle="car"></auction-vehicle-item>
<auction-vehicle-item :auction-vehicle="car" @emitLoadList="pageReload"></auction-vehicle-item>
<!-- 广告横幅 -->
<!-- <view class="banner" v-if="index%5===4">-->
<!-- <image src="/static/images/banner.png" mode="aspectFill" class="banner-image"/>-->
......
......@@ -226,6 +226,9 @@ export default class roundBidBottom extends Vue {
//自定义金额
operationButList = [{ value: '100', }, { value: '300', }, { value: '500', }, { value: '1000', }, { value: '自定义', }];
IsDebounce = false; // 是否防抖
created(): void {
console.log('auctionVehicleauctionVehicleauctionVehicleauctionVehicle1111', this.auctionVehicle)
setTimeout(() => {
......@@ -387,14 +390,18 @@ export default class roundBidBottom extends Vue {
//点击提交价格
handleAddBid() {
const that = this;
if (!this.addPrice) return uni.showToast({ title: '请输入加价金额', icon: 'none' });
if (this.IsDebounce) return console.log('重复提交');
this.IsDebounce = true;
setTimeout(() => {
that.IsDebounce = false
}, 1000);
const bidPrice = Number(this.pageData.price || 0) + Number(this.addPrice);
const bidRequest = { aucvehId: this.auctionVehicle.aucvehId, bidPrice: bidPrice };
uni.showLoading({ title: '正在提交竞价信息...', mask: true });
BidController.addBid(this.axios, bidRequest).then(res => {
setTimeout(() => {
uni.showToast({ title: '出价成功', icon: 'success' });
}, 300);
uni.showToast({ title: '出价成功', icon: 'success' });
}).finally(() => {
uni.hideLoading();
});
......@@ -459,6 +466,7 @@ export default class roundBidBottom extends Vue {
//自定义确认出价
handleCustomBidConfirm() {
const that = this;
if (!this.customBid) {
return uni.showToast({ title: '请输入自定义加价金额', icon: 'none' })
}
......@@ -474,13 +482,16 @@ export default class roundBidBottom extends Vue {
if (Number(this.customBid) % 100 != 0) {
return uni.showToast({ title: '自定义加价金额必须是100的倍数', icon: 'none' })
}
if (this.IsDebounce) return console.log('重复提交');
that.IsDebounce = true;
setTimeout(() => {
that.IsDebounce = false
}, 1000);
const bidPrice = Number(this.pageData.price || 0) + Number(this.customBid);
const bidRequest = { aucvehId: this.auctionVehicle.aucvehId, bidPrice: bidPrice };
uni.showLoading({ title: '正在提交竞价信息...', mask: true });
BidController.addBid(this.axios, bidRequest).then(res => {
setTimeout(() => {
uni.showToast({ title: '出价成功', icon: 'success' });
}, 300);
uni.showToast({ title: '出价成功', icon: 'success' });
}).finally(() => {
uni.hideLoading();
});
......
......@@ -12,7 +12,7 @@
<template v-if="contents.length>0" v-for="(favorite, index) in contents" :key="index">
<!-- 车辆项 -->
<van-swipe-cell :right-width="65" :async-close="false" class="van-swipe-cell">
<auction-vehicle-item :auction-vehicle="favorite.auctionVehicle" :show-favorite="false"></auction-vehicle-item>
<auction-vehicle-item :auction-vehicle="favorite.auctionVehicle" :show-favorite="false" @emitLoadList="pageReload"></auction-vehicle-item>
<view slot="right" class="van-swipe-cell__right" @click="removeFavorite(favorite)">删除</view>
</van-swipe-cell>
</template>
......
......@@ -11,7 +11,7 @@
<view class="car-list">
<template v-if="contents.length>0" v-for="(favorite, index) in contents" :key="index">
<!-- 车辆项 -->
<auction-vehicle-item :auction-vehicle="favorite.auctionVehicle" :show-favorite="false"></auction-vehicle-item>
<auction-vehicle-item :auction-vehicle="favorite.auctionVehicle" :show-favorite="false" @emitLoadList="pageReload"></auction-vehicle-item>
</template>
<van-empty v-else image="https://img02.glsx.com.cn/aus/images/empty.png" style="margin-top: 100px" description="暂无浏览记录"/>
<view v-if="contents.length>0&&pagination.isLast()" class="empty-tip">
......
......@@ -20,7 +20,7 @@
<scroll-view class="scroll-content" scroll-y :refresher-enabled="true" :refresher-triggered="loading" @scrolltolower="doInfinite()" @refresherrefresh="pageReload">
<view v-if="pagination.content.length>0" class="car-list">
<template v-for="(car, index) in contents" :key="index">
<auction-vehicle-item :auction-vehicle="car"></auction-vehicle-item>
<auction-vehicle-item :auction-vehicle="car" @emitLoadList="pageRefresh" ></auction-vehicle-item>
</template>
</view>
<van-empty v-else image="https://img02.glsx.com.cn/aus/images/empty_2.png" description="未找到相关车源"/>
......
......@@ -2,7 +2,7 @@
<scroll-view class="scroll-content" :refresher-enabled="true" scroll-y :refresher-triggered="loading" @scrolltolower="doInfinite()" @refresherrefresh="pageReload">
<view v-if="pagination.content.length>0" class="car-list">
<template v-for="(car, index) in contents">
<auction-vehicle-item :auction-vehicle="car"></auction-vehicle-item>
<auction-vehicle-item :auction-vehicle="car" @emitLoadList="pageRefresh"></auction-vehicle-item>
</template>
</view>
<van-empty v-else image="https://img02.glsx.com.cn/aus/images/empty_2.png" description="未找到相关车源"/>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!