Commit 6b82acf8 by yancanhua

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

1 parent c3ab50ed
......@@ -125,14 +125,29 @@ export default class ViewAuctionVehicle extends Vue {
handleAddBid(): void {
const that = this;
if (that.isDestroyed) return;
if (!that.bidPrice) {
if (!this.bidPrice) {
message.error('请输入出价金额');
return;
return
}
AuctionController.addBid(that.axios, { aucvehId: that.auctionVehicle.aucvehId, bidPrice: that.bidPrice }).then(() => {
if (that.isDestroyed) return;
message.success('操作成功!');
if (isNaN(Number(this.bidPrice))) {
message.error('请输入正确的加价金额');
return
}
if (Number(this.bidPrice) < 100) {
message.error('自定义加价金额不能小于100');
return
}
if (Number(this.bidPrice) % 100 != 0) {
message.error('自定义加价金额必须是100的倍数');
return
}
AuctionController.addBid(that.axios, { aucvehId: that.auctionVehicle.aucvehId, bidPrice: that.bidPrice }).then((response) => {
const data = response.data || {};
if (data && data.success) {
message.success('操作成功!');
} else {
message.error(data.message || '操作失败');
}
});
}
......
......@@ -27,7 +27,7 @@
<view class="tag-item">
<template v-if="auctionVehicle.auctionState==='PREVIEW'">
<template v-if="previewLessThen24h">
<van-count-down class="white-small-count-down" :time="previewCountDown" format="HH:mm:ss 后开拍" @finish="countDownBidStart"/>
<van-count-down v-if="auctionVehicle.auction.auctionMode!=2" class="white-small-count-down" :time="previewCountDown" format="HH:mm:ss 后开拍" @finish="countDownBidStart"/>
</template>
<template v-else>
{{ previewStatus }}
......
......@@ -14,7 +14,7 @@
</van-dropdown-menu>
<search-query-filter :search-query="searchQuery" @clear-all="clearAllFilters" @change="pageFilterReload"></search-query-filter>
</view>
</view>
<view class="auction-session-container" :style="{ paddingTop: statusBarHeight+filterHeight + 'px' }">
<!-- 车辆列表 -->
<scroll-view class="scroll-content" scroll-y :refresher-enabled="true" :refresher-triggered="loading" @scrolltolower="doInfinite()" @refresherrefresh="pageReload">
......@@ -41,6 +41,8 @@ import {BACKGROUND_IMAGE_1} from "@/static/ResourceConstants";
import AuctionVehicleFilter from "@/components/filter/AuctionVehicleFilter";
import SearchQueryFilter from "@/components/filter/SearchQueryFilter.vue";
import VehiclePriceRangeFilter from "@/components/filter/VehiclePriceRangeFilter.vue";
import {AuctionVehicle} from "lib/src/entity/auction/entity/AuctionVehicle";
@Component({
components: {VehiclePriceRangeFilter, SearchQueryFilter, CustomNavBar, AuctionVehicleItem}
......@@ -109,6 +111,14 @@ export default class AuctionSessionPage extends AuctionVehicleFilter {
return this.searchQuery != null ? 120 : 85;
}
get contents(): AuctionVehicle[] {
const list = (this.pagination.content || []).map(item => {
const vehicleObj = item.vehicle || {};
return { ...item, auctionState: vehicleObj.vehicleState || item.auctionState }
});
return list;
}
loadAuctionVehicles() {
AuctionController.getAuctionById(this.axios, this.auctionId).then(res => {
this.auction = res.data;
......
<template>
<view>
<view v-if="pageState">
<view v-if="pageState == 'PREVIEW'" class="bottom_action">
<view class="awaitbut">等待竞拍</view>
</view>
......@@ -196,7 +196,7 @@ export default class roundBidBottom extends Vue {
@Prop({ type: Object, required: true })
auctionVehicle: any;
//页面状态 认证 COMMON 充值 NOTOPUP 等待开始 PREVIEW 进行中 AUCTIONING 结束 END 结束自动跳转 JUMP
pageState = 'COMMON';
pageState = '';
endState = '1'; // 1 未成交 2 已中拍 3 未中拍
//页面显示数据
pageData = {
......@@ -219,7 +219,7 @@ export default class roundBidBottom extends Vue {
progressValue = 100; // 进度值
isAudio = false; // 是否是语音出价
isAudio = true; // 是否是语音出价
//自定义金额
operationButList = [{ value: '100', }, { value: '300', }, { value: '500', }, { value: '1000', }, { value: '自定义', }];
......@@ -378,7 +378,7 @@ export default class roundBidBottom extends Vue {
handleAudio() {
const that = this;
if (!that.isAudio) {
console.log('播放音频isAudio', that.isAudio);
console.log('播放音频');
that.isAudio = true;
const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = true;
......@@ -386,8 +386,10 @@ export default class roundBidBottom extends Vue {
innerAudioContext.onEnded(() => {
innerAudioContext.destroy();
that.isAudio = false;
console.log('音频播放完成isAudio', that.isAudio);
console.log('音频播放完成');
});
} else {
that.isAudio = false;
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!