feat(listings): 订单和账号详情展示可租时长与每日消耗
租客在订单列表和详情标题能看到每个号的租期、消耗。账号详情把这两项拆成独立格子。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import { useCheckoutSimulator } from '@/features/orders/composables/useCheckoutS
|
||||
import { useOrderActions, CONFIRMABLE_ACTIONS } from '@/features/orders/composables/useOrderActions'
|
||||
import { useMobilePaymentCashier } from '@/features/orders/composables/useMobilePaymentCashier'
|
||||
import { useMobilePayWaySelect } from '@/features/orders/composables/useMobilePayWaySelect'
|
||||
import { amountYuan, money } from '@/features/orders/composables/useOrderSnapshot'
|
||||
import { amountYuan, money, orderRentalTerms } from '@/features/orders/composables/useOrderSnapshot'
|
||||
import {
|
||||
OrderAccountSnapshot,
|
||||
OrderCheckoutSummary,
|
||||
@@ -119,6 +119,8 @@ const {
|
||||
onCreateDisputeSuccess: () => (showDisputePopup.value = false),
|
||||
})
|
||||
|
||||
const rentalTerms = computed(() => orderRentalTerms(order.value))
|
||||
|
||||
// Mobile 独有 UI 状态:各类 popup 显隐。
|
||||
const showDisputePopup = ref(false)
|
||||
const showCounterPopup = ref(false)
|
||||
@@ -204,6 +206,14 @@ async function copyListingCode() {
|
||||
商品编号 {{ listingCode }}
|
||||
</button>
|
||||
<h2 class="order-title">{{ order.title }}</h2>
|
||||
<p v-if="rentalTerms.rentalDays || rentalTerms.dailyLossText" class="order-terms">
|
||||
<span v-if="rentalTerms.rentalDays" class="term-rental"
|
||||
>租期 {{ rentalTerms.rentalDays }}天</span
|
||||
>
|
||||
<span v-if="rentalTerms.dailyLossText" class="term-loss"
|
||||
>消耗 {{ rentalTerms.dailyLossText }}</span
|
||||
>
|
||||
</p>
|
||||
<div class="order-meta-grid">
|
||||
<div class="meta-item">
|
||||
<span class="meta-label">{{ orderAmountLabel }}</span>
|
||||
|
||||
Reference in New Issue
Block a user