优化时间展示

This commit is contained in:
yml
2026-05-23 01:56:16 +08:00
parent c9db34ddda
commit 744f572f6c
17 changed files with 85 additions and 24 deletions
@@ -17,6 +17,7 @@ import {
type Order,
} from '@/api/orders'
import { useSessionStore } from '@/stores/session'
import { formatDateTime } from '@/utils/time'
const route = useRoute()
const router = useRouter()
@@ -207,8 +208,8 @@ function readError(error: unknown, fallback: string) {
<div v-if="order" class="order-panel">
<p>租期{{ order.rent_hours }} 小时</p>
<p>开始{{ order.rent_start_at || '未开始' }}</p>
<p>结束{{ order.rent_end_at || '未设置' }}</p>
<p>开始{{ formatDateTime(order.rent_start_at, '未开始') }}</p>
<p>结束{{ formatDateTime(order.rent_end_at, '未设置') }}</p>
<el-button v-if="order.status === 'pending_handoff'" type="danger" :loading="cancelling" @click="handleCancel">
取消订单并释放账号
</el-button>
@@ -220,7 +221,7 @@ function readError(error: unknown, fallback: string) {
<div v-for="record in handoffRecords" :key="record.id" class="timeline-item">
<strong>{{ record.type }}</strong>
<p>{{ record.content }}</p>
<span>{{ record.created_at }}</span>
<span>{{ formatDateTime(record.created_at) }}</span>
</div>
</div>