fix:优化入园码的显示和无预约时去预约的调整

This commit is contained in:
jacobxu666
2026-07-07 11:47:29 +08:00
parent 6d89d1049f
commit 45a74578fc
3 changed files with 16 additions and 9 deletions
+13 -7
View File
@@ -98,7 +98,7 @@
<view class="code-modal">
<text class="code-modal__title">入园码</text>
<view class="qr-box">
<image v-if="codeSrc" class="qr-img" :src="codeSrc" mode="aspectFit" />
<image v-if="codeSrc" class="qr-img" :src="codeSrc" mode="widthFix" />
</view>
<text class="code-modal__desc">入园时请出示此二维码+本人身份证</text>
<text class="code-modal__countdown">{{ countdown }}秒后自动刷新</text>
@@ -395,7 +395,7 @@ async function fetchCode(r: ReserveRecord) {
try {
const res = await post<any>(`${BASE_URL}/zhy-api/cardBag/getQrByAppointmentId?appointmentId=${r.id}`)
if (res.qrType == 1) {
codeSrc.value = 'data:image/png;base64,' + res.qrCode
codeSrc.value = res.qrCode.startsWith('data:') ? res.qrCode : 'data:image/png;base64,' + res.qrCode
} else if (res.qrType == 2) {
codeSrc.value = res.qrUrl
} else {
@@ -469,7 +469,7 @@ async function onLoadMore() {
}
function goReserve() {
uni.navigateTo({ url: '/packages/user/pages/reserve/index' })
uni.navigateTo({ url: '/packages/content/pages/scenic-list' })
}
function previewPhoto(url: string) {
@@ -666,22 +666,28 @@ function previewPhoto(url: string) {
/* ===== Code Modal ===== */
.code-modal {
width: 560rpx; background: $color-card; border-radius: $radius-lg; padding: 40rpx;
width: 80vw; max-width: 700rpx; background: $color-card; border-radius: $radius-lg; padding: 40rpx;
display: flex; flex-direction: column; align-items: center;
}
.code-modal__title { font-family: $font-family-body; font-size: 32rpx; font-weight: $font-weight-bold; color: $uv-main-color; margin-bottom: 32rpx; }
.qr-box {
width: 360rpx; height: 360rpx; background: #F8FAFC;
width: 100%; background: #F8FAFC;
border-radius: 16rpx; display: flex; align-items: center;
justify-content: center; border: 1rpx solid #E2E8F0;
justify-content: center; border: 1rpx solid #E2E8F0; padding: 20rpx;
box-sizing: border-box;
}
.qr-img { width: 300rpx; height: 300rpx; }
.qr-img { width: 100%; height: auto; }
.code-modal__desc { font-family: $font-family-body; font-size: $font-size-sm; color: $uv-tips-color; }
.code-modal__tip {
font-family: $font-family-body; font-size: $font-size-sm; color: $uv-warning;
font-weight: $font-weight-medium; margin-top: 16rpx;
}
.code-modal__countdown {
font-family: $font-family-body;
font-size: 24rpx;