Commit 6b82acf8 by yancanhua

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

1 parent c3ab50ed
...@@ -125,14 +125,29 @@ export default class ViewAuctionVehicle extends Vue { ...@@ -125,14 +125,29 @@ export default class ViewAuctionVehicle extends Vue {
handleAddBid(): void { handleAddBid(): void {
const that = this; const that = this;
if (that.isDestroyed) return; if (!this.bidPrice) {
if (!that.bidPrice) {
message.error('请输入出价金额'); message.error('请输入出价金额');
return; return
} }
AuctionController.addBid(that.axios, { aucvehId: that.auctionVehicle.aucvehId, bidPrice: that.bidPrice }).then(() => { if (isNaN(Number(this.bidPrice))) {
if (that.isDestroyed) return; 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('操作成功!'); message.success('操作成功!');
} else {
message.error(data.message || '操作失败');
}
}); });
} }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<view class="tag-item"> <view class="tag-item">
<template v-if="auctionVehicle.auctionState==='PREVIEW'"> <template v-if="auctionVehicle.auctionState==='PREVIEW'">
<template v-if="previewLessThen24h"> <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>
<template v-else> <template v-else>
{{ previewStatus }} {{ previewStatus }}
......
...@@ -41,6 +41,8 @@ import {BACKGROUND_IMAGE_1} from "@/static/ResourceConstants"; ...@@ -41,6 +41,8 @@ import {BACKGROUND_IMAGE_1} from "@/static/ResourceConstants";
import AuctionVehicleFilter from "@/components/filter/AuctionVehicleFilter"; import AuctionVehicleFilter from "@/components/filter/AuctionVehicleFilter";
import SearchQueryFilter from "@/components/filter/SearchQueryFilter.vue"; import SearchQueryFilter from "@/components/filter/SearchQueryFilter.vue";
import VehiclePriceRangeFilter from "@/components/filter/VehiclePriceRangeFilter.vue"; import VehiclePriceRangeFilter from "@/components/filter/VehiclePriceRangeFilter.vue";
import {AuctionVehicle} from "lib/src/entity/auction/entity/AuctionVehicle";
@Component({ @Component({
components: {VehiclePriceRangeFilter, SearchQueryFilter, CustomNavBar, AuctionVehicleItem} components: {VehiclePriceRangeFilter, SearchQueryFilter, CustomNavBar, AuctionVehicleItem}
...@@ -109,6 +111,14 @@ export default class AuctionSessionPage extends AuctionVehicleFilter { ...@@ -109,6 +111,14 @@ export default class AuctionSessionPage extends AuctionVehicleFilter {
return this.searchQuery != null ? 120 : 85; 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() { loadAuctionVehicles() {
AuctionController.getAuctionById(this.axios, this.auctionId).then(res => { AuctionController.getAuctionById(this.axios, this.auctionId).then(res => {
this.auction = res.data; this.auction = res.data;
......
<template> <template>
<view> <view v-if="pageState">
<view v-if="pageState == 'PREVIEW'" class="bottom_action"> <view v-if="pageState == 'PREVIEW'" class="bottom_action">
<view class="awaitbut">等待竞拍</view> <view class="awaitbut">等待竞拍</view>
</view> </view>
...@@ -196,7 +196,7 @@ export default class roundBidBottom extends Vue { ...@@ -196,7 +196,7 @@ export default class roundBidBottom extends Vue {
@Prop({ type: Object, required: true }) @Prop({ type: Object, required: true })
auctionVehicle: any; auctionVehicle: any;
//页面状态 认证 COMMON 充值 NOTOPUP 等待开始 PREVIEW 进行中 AUCTIONING 结束 END 结束自动跳转 JUMP //页面状态 认证 COMMON 充值 NOTOPUP 等待开始 PREVIEW 进行中 AUCTIONING 结束 END 结束自动跳转 JUMP
pageState = 'COMMON'; pageState = '';
endState = '1'; // 1 未成交 2 已中拍 3 未中拍 endState = '1'; // 1 未成交 2 已中拍 3 未中拍
//页面显示数据 //页面显示数据
pageData = { pageData = {
...@@ -219,7 +219,7 @@ export default class roundBidBottom extends Vue { ...@@ -219,7 +219,7 @@ export default class roundBidBottom extends Vue {
progressValue = 100; // 进度值 progressValue = 100; // 进度值
isAudio = false; // 是否是语音出价 isAudio = true; // 是否是语音出价
//自定义金额 //自定义金额
operationButList = [{ value: '100', }, { value: '300', }, { value: '500', }, { value: '1000', }, { value: '自定义', }]; operationButList = [{ value: '100', }, { value: '300', }, { value: '500', }, { value: '1000', }, { value: '自定义', }];
...@@ -378,7 +378,7 @@ export default class roundBidBottom extends Vue { ...@@ -378,7 +378,7 @@ export default class roundBidBottom extends Vue {
handleAudio() { handleAudio() {
const that = this; const that = this;
if (!that.isAudio) { if (!that.isAudio) {
console.log('播放音频isAudio', that.isAudio); console.log('播放音频');
that.isAudio = true; that.isAudio = true;
const innerAudioContext = uni.createInnerAudioContext(); const innerAudioContext = uni.createInnerAudioContext();
innerAudioContext.autoplay = true; innerAudioContext.autoplay = true;
...@@ -386,8 +386,10 @@ export default class roundBidBottom extends Vue { ...@@ -386,8 +386,10 @@ export default class roundBidBottom extends Vue {
innerAudioContext.onEnded(() => { innerAudioContext.onEnded(() => {
innerAudioContext.destroy(); innerAudioContext.destroy();
that.isAudio = false; 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!