VehicleCoverWrapper.vue
4.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<template>
<view class="car-image-wrapper">
<van-image use-error-slot width="120" fit="cover" radius="16rpx" height="90" :src="vehicle.cover?.url"></van-image>
<view class="light-status light-preview" v-if="auctionVehicle.auctionState==='PREVIEW'">
等待竞价
</view>
<template v-else-if="auctionVehicle.auctionState==='AUCTIONING'">
<view class="light-status">
竞价中
</view>
</template>
<template v-else>
<image src="/static/images/close.png" class="close-icon" mode="aspectFit"></image>
</template>
<!-- <template v-if="auctionVehicle.auction.auctionType==='DARK'">-->
<!-- <text class="dark-status" v-if="auctionVehicle.auctionState==='PREVIEW'">-->
<!-- 等待竞拍-->
<!-- </text>-->
<!-- <template v-else-if="auctionVehicle.auctionState==='AUCTIONING'">-->
<!-- <text class="dark-status">-->
<!-- 竞拍中-->
<!-- </text>-->
<!-- </template>-->
<!-- </template>-->
<view class="car-tags">
<view class="tag-item">
<template v-if="auctionVehicle.auctionState==='PREVIEW'">
<template v-if="previewLessThen24h">
<view v-show="auctionVehicle.auction.auctionMode == 1">
<van-count-down v-if="Number(previewCountDown) > 0 " class="white-small-count-down" :time="previewCountDown" format="HH:mm:ss 后开拍" @finish="finishCountDownBidStart"/>
</view>
<view v-show="auctionVehicle.auction.auctionMode == 2">
{{ (auctionVehicle.auction.auctionStartTime || '').slice(0, 16) }}
</view>
</template>
<template v-else>
{{ previewStatus }}
</template>
</template>
<template v-if="auctionVehicle.auctionState==='AUCTIONING'">
<template v-if="auctionVehicle.auction.auctionMode==1">
<template v-if="remaining5m">
<van-count-down class="white-small-count-down" :time="endRemaining" format="距离结束 mm:ss" @finish="countDownBidEnd"/>
</template>
<template v-else>
<van-count-down class="white-small-count-down" :time="endRemaining" format="距离结束 HH:mm:ss" @finish="countDownBidEnd"/>
</template>
</template>
</template>
</view>
</view>
</view>
</template>
<script lang="ts">
import {Component} from "vue-facing-decorator";
import AbstractVehicleItem from "@/components/AbstractVehicleItem";
@Component({
components: {}
})
export default class VehicleCoverWrapper extends AbstractVehicleItem {
finishCountDownBidStart(): void {
this.countDownBidStart();
this.$emit('emitLoadListData');
}
}
</script>
<style lang="scss" scoped>
.car-image-wrapper {
min-width: 120px;
height: 90px;
position: relative;
}
.car-image {
width: 100%;
height: 100%;
border-radius: 12px;
}
.car-tags {
position: absolute;
width: 100%;
text-align: center;
bottom: 0;
background-color: #00000080;
border-radius: 0 0 12px 12px;
//opacity: 0.5;
}
.tag-item {
color: #fff;
font-size: 10px;
position: relative;
bottom: 1px;
}
.light-status {
position: absolute;
top: 0;
left: 0;
border-radius: 8px 0px 10px 0px;
background: linear-gradient(228.31deg, #F23204CC 0%, #FF9F82CC 100%);
font-size: 10px;
color: #fff;
padding: 2px 4px;
}
.light-preview {
background: linear-gradient(143.43deg, #75BCFFCC 0%, #2C66F7CC 100%);
}
.dark-status {
position: absolute;
bottom: 24px;
left: 46px;
font-size: 10px;
color: #EE3140;
}
.close-icon {
position: absolute;
top: 20px;
left: 36px;
width: 48px;
height: 48px;
}
</style>