This commit is contained in:
lcj
2026-09-04 16:20:56 +08:00
parent 08e2f6888b
commit 4ed72056a9
6 changed files with 304 additions and 68 deletions
+27 -19
View File
@@ -58,7 +58,7 @@
</view>
<!-- 预约入园日期 -->
<view class="record-info">
<text class="record-date">预约入园日期:{{ r.date }}</text>
<text class="record-date">预约入园日期:<text class="record-date--value">{{ formatDateOnly(r.date) }}</text></text>
</view>
<!-- 操作 -->
<view class="record-actions">
@@ -124,7 +124,7 @@
</uni-popup>
<!-- 详情弹窗 -->
<uni-popup ref="detailPopup" type="bottom" :mask-click="true">
<uni-popup ref="detailPopup" type="center" :mask-click="true">
<view class="detail-sheet">
<view class="sheet-header">
<text class="sheet-title">使用详情</text>
@@ -137,17 +137,9 @@
<text class="sheet-label">预约景区</text>
<text class="sheet-value">{{ detailRecord?.scenicName }}</text>
</view>
<view class="sheet-row">
<text class="sheet-label">卡种</text>
<text class="sheet-value">{{ detailRecord?.cardType }}</text>
</view>
<view class="sheet-row">
<text class="sheet-label">卡号</text>
<text class="sheet-value">{{ detailRecord?.cardNo }}</text>
</view>
<view class="sheet-row">
<text class="sheet-label">预约入园日期</text>
<text class="sheet-value">{{ detailRecord?.date }}</text>
<text class="sheet-value sheet-value--date">{{ formatDateOnly(detailRecord?.date) }}</text>
</view>
<view v-if="detailRecord?.session" class="sheet-row">
<text class="sheet-label">预约场次</text>
@@ -157,10 +149,6 @@
<text class="sheet-label">预约人</text>
<text class="sheet-value">{{ detailRecord?.userName }}</text>
</view>
<view class="sheet-row">
<text class="sheet-label">证件号</text>
<text class="sheet-value">{{ detailRecord?.maskedId }}</text>
</view>
<view class="sheet-row">
<text class="sheet-label">预约状态</text>
<text class="sheet-value">{{ detailStatusLabel(detailRecord?.status || '') }}</text>
@@ -177,6 +165,11 @@
<text class="sheet-label">取消时间</text>
<text class="sheet-value">{{ detailRecord.cancelTime }}</text>
</view>
<!-- 人脸图片 -->
<view v-if="detailRecord?.photo" class="sheet-photo">
<text class="sheet-label">人脸图片</text>
<image class="sheet-photo-avatar" :src="detailRecord.photo" mode="aspectFill" @tap="previewPhoto(detailRecord.photo)" />
</view>
<!-- 核销人脸照片 -->
<view v-if="detailRecord?.verifyPhoto" class="sheet-photo">
<text class="sheet-label">核销照片</text>
@@ -213,6 +206,7 @@ interface ReserveRecord {
cancelTime?: string
verifyTime?: string
verifyPhoto?: string
photo?: string
cardInstruction?: string
cardModelId?: string
canCancel?: boolean
@@ -288,6 +282,7 @@ async function fetchRecords(append = false) {
cancelTime: item.cancelTime || '',
verifyTime: item.verifyTime || '',
verifyPhoto: item.verifyPhoto || '',
photo: item.photo || '',
cardInstruction: item.cardInstruction || '',
cardModelId: item.cardModelId || item.thirdId || '',
canCancel: !!item.canCancel,
@@ -332,6 +327,12 @@ function formatReserveDate(date?: string): string {
return `${m[1]} 年 ${Number(m[2])} 月 ${Number(m[3])} 日`
}
/** 日期去除时分秒(如 2026-08-05 10:00:00 → 2026-08-05) */
function formatDateOnly(date?: string): string {
if (!date) return ''
return date.split(' ')[0]
}
function showCancelModal(r: ReserveRecord) {
cancelRecord.value = r
cancelPopup.value?.open()
@@ -449,6 +450,7 @@ async function viewDetail(r: ReserveRecord) {
cancelTime: res.cancelTime || r.cancelTime,
verifyTime: res.verifyTime || r.verifyTime,
verifyPhoto: res.verifyPhoto || r.verifyPhoto,
photo: res.photo || r.photo,
cardInstruction: res.cardInstruction || r.cardInstruction || '',
cardModelId: res.cardModelId || r.cardModelId || '',
}
@@ -622,6 +624,11 @@ function previewPhoto(url: string) {
color: $uv-tips-color;
}
.record-date--value {
color: $uv-error;
font-weight: $font-weight-medium;
}
.record-actions {
display: flex;
justify-content: flex-end;
@@ -743,7 +750,7 @@ function previewPhoto(url: string) {
/* ===== Detail Sheet ===== */
.detail-sheet {
background: $color-card; border-radius: $radius-lg $radius-lg 0 0; max-height: 75vh;
width: 640rpx; background: $color-card; border-radius: $radius-lg; max-height: 75vh;
display: flex; flex-direction: column;
}
@@ -778,6 +785,7 @@ function previewPhoto(url: string) {
.sheet-label { font-family: $font-family-body; font-size: $font-size-sm; color: $uv-main-color; }
.sheet-value { font-family: $font-family-body; font-size: $font-size-sm; color: $uv-content-color; text-align: right; }
.sheet-value--date { color: $uv-error; font-weight: $font-weight-medium; }
.sheet-photo {
display: flex;
@@ -788,9 +796,9 @@ function previewPhoto(url: string) {
}
.sheet-photo-avatar {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
width: 200rpx;
height: 200rpx;
border-radius: 8rpx;
}
.sheet-tip {