彻底优化数据库字段
This commit is contained in:
@@ -58,7 +58,7 @@ function money(value: number) {
|
||||
}
|
||||
|
||||
function listingPrice(row: Listing) {
|
||||
return money(row.price || row.price_daily || row.price_hourly)
|
||||
return money(row.price)
|
||||
}
|
||||
|
||||
function extractObjectKey(url: string) {
|
||||
|
||||
@@ -63,7 +63,7 @@ function openEvidence(row: Listing) {
|
||||
}
|
||||
|
||||
function listingPrice(row: Listing) {
|
||||
return `¥${Number(row.price || row.price_daily || row.price_hourly || 0).toFixed(2)}`
|
||||
return `¥${Number(row.price || 0).toFixed(2)}`
|
||||
}
|
||||
|
||||
function extractObjectKey(url: string) {
|
||||
|
||||
@@ -43,7 +43,7 @@ function money(value: number) {
|
||||
}
|
||||
|
||||
function listingPrice(row: Listing) {
|
||||
return money(row.price || row.price_daily || row.price_hourly)
|
||||
return money(row.price)
|
||||
}
|
||||
|
||||
function ownerName(row: Listing) {
|
||||
|
||||
@@ -65,12 +65,11 @@ function readError(error: unknown, fallback: string) {
|
||||
}
|
||||
|
||||
function orderRentedAt() {
|
||||
return order.value?.rented_at || order.value?.rent_start_at
|
||||
return order.value?.rented_at
|
||||
}
|
||||
|
||||
function orderEstimatedEndAt() {
|
||||
if (!order.value) return undefined
|
||||
if (order.value.rent_end_at) return order.value.rent_end_at
|
||||
const rentedAt = orderRentedAt()
|
||||
const durationHours = Number(order.value.estimated_duration_hours || 0)
|
||||
if (!rentedAt || durationHours <= 0) return undefined
|
||||
@@ -108,6 +107,10 @@ function orderEstimatedEndAt() {
|
||||
<span>订单金额</span>
|
||||
<strong>¥{{ order.rent_amount }}</strong>
|
||||
</div>
|
||||
<div class="metric-card">
|
||||
<span>平台费用</span>
|
||||
<strong>¥{{ order.platform_fee }}</strong>
|
||||
</div>
|
||||
<div class="metric-card">
|
||||
<span>押金</span>
|
||||
<strong>¥{{ order.deposit_amount }}</strong>
|
||||
|
||||
Reference in New Issue
Block a user