修复定价错误
This commit is contained in:
@@ -36,7 +36,16 @@ async function offline(id: number) {
|
||||
}
|
||||
|
||||
function listingPrice(row: Listing) {
|
||||
return `¥${Number(row.price_daily || row.price_hourly || 0).toFixed(2)}`
|
||||
return `¥${readSellerPrice(row).toFixed(2)}`
|
||||
}
|
||||
|
||||
function readSellerPrice(row: Listing) {
|
||||
const breakdown = row.asset_summary?.price_breakdown
|
||||
if (typeof breakdown === 'object' && breakdown !== null) {
|
||||
const price = Number((breakdown as Record<string, unknown>).seller_total_price)
|
||||
if (Number.isFinite(price) && price > 0) return price
|
||||
}
|
||||
return Number(row.price_daily || row.price_hourly || 0)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user