Commit 53b6e965 by gonglei

加入框架代码

1 parent 168e8b9e
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<view class="car-item" @click="viewCarDetail(bid)"> <view class="car-item" @click="viewCarDetail(bid)">
<vehicle-cover-wrapper :auction-vehicle="bid.auctionVehicle"></vehicle-cover-wrapper> <vehicle-cover-wrapper :auction-vehicle="bid.auctionVehicle"></vehicle-cover-wrapper>
<view class="recharge-info"> <view class="recharge-info">
<text class="car-name">【{{ geCityName(bid.auctionVehicle.vehicle) }}】{{ bid.auctionVehicle.vehicle.baseInfo.carSeriesName }} <text class="car-name">【{{ getCityName(bid.auctionVehicle.vehicle) }}】{{ bid.auctionVehicle.vehicle.baseInfo.carSeriesName }}
{{ bid.auctionVehicle.vehicle.baseInfo.carTypeName }} {{ bid.auctionVehicle.vehicle.baseInfo.carTypeName }}
</text> </text>
...@@ -73,7 +73,7 @@ export default class BidPage extends PaginationComponent<Bid> { ...@@ -73,7 +73,7 @@ export default class BidPage extends PaginationComponent<Bid> {
return vehicle.baseInfo?.licensePlate.substring(0, 2); return vehicle.baseInfo?.licensePlate.substring(0, 2);
} }
geCityName(vehicle: Vehicle): string { getCityName(vehicle: Vehicle): string {
if (vehicle.ownership.carCityName) { if (vehicle.ownership.carCityName) {
return vehicle.ownership.carCityName.replace("市", ""); return vehicle.ownership.carCityName.replace("市", "");
} }
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
height="90" :src="vehicle.cover?.url"> height="90" :src="vehicle.cover?.url">
</van-image> </van-image>
<view class="recharge-details"> <view class="recharge-details">
<view class="car-title">【{{ licensePlate }}】{{ vehicle.baseInfo.carSeriesName }} {{ vehicle.baseInfo.carTypeName }}</view> <view class="car-title">【{{ cityName }}】{{ vehicle.baseInfo.carSeriesName }} {{ vehicle.baseInfo.carTypeName }}</view>
<view class="car-specs">{{ productionYear }}年 | {{ mileage }}万公里 | 国{{ vehicle.coreSpecs.emissionStandard }}</view> <view class="car-specs">{{ productionYear }}年 | {{ mileage }}万公里 | 国{{ vehicle.coreSpecs.emissionStandard }}</view>
<view class="car-tags"> <view class="car-tags">
<text class="tag" v-for="(feature, featureIndex) in vehicle.baseInfo?.tags">{{ feature }}</text> <text class="tag" v-for="(feature, featureIndex) in vehicle.baseInfo?.tags">{{ feature }}</text>
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
import {Component, Prop, Vue} from 'vue-facing-decorator'; import {Component, Prop, Vue} from 'vue-facing-decorator';
import {AuctionOrder} from "lib/src/entity/auction/entity/AuctionOrder"; import {AuctionOrder} from "lib/src/entity/auction/entity/AuctionOrder";
import dayjs from "dayjs"; import dayjs from "dayjs";
import {Vehicle} from "lib/src/entity/vehicle/entity/Vehicle";
@Component({}) @Component({})
export default class OrderVehicleItem extends Vue { export default class OrderVehicleItem extends Vue {
...@@ -37,6 +38,14 @@ export default class OrderVehicleItem extends Vue { ...@@ -37,6 +38,14 @@ export default class OrderVehicleItem extends Vue {
return this.vehicle.baseInfo?.licensePlate.substring(0, 2); return this.vehicle.baseInfo?.licensePlate.substring(0, 2);
} }
get cityName(): string {
if (this.vehicle.ownership.carCityName) {
return this.vehicle.ownership.carCityName.replace("市", "");
}
return this.vehicle.ownership.carCityName;
}
get productionYear(): number { get productionYear(): number {
return dayjs(this.vehicle.coreSpecs.productionDate as string).year(); return dayjs(this.vehicle.coreSpecs.productionDate as string).year();
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!