feat: 添加页面刷新功能

This commit is contained in:
2026-07-16 14:10:04 +08:00
parent 8f0e5fa1d5
commit 6e47575c0b
4 changed files with 127 additions and 40 deletions
+65 -1
View File
@@ -14,12 +14,21 @@
:style="{ width: `${state.qrcodeSize}px`, height: `${state.qrcodeSize}px` }"
:show-menu-by-longpress="true"
/>
<view v-if="isVerifyCompleted" class="verify-mask">
<view class="verify-mask__icon">
<uni-icons type="checkmarkempty" size="40" color="#ffffff" />
</view>
<view class="verify-mask__text">已核销</view>
</view>
</view>
</view>
<view class="gear">
<image :src="sheep.$url.static('/static/img/shop/writeOff.png')"></image>
</view>
<view class="num-wrap" @tap="copyVerifyCode">
<view v-if="isVerifyCompleted" class="num-wrap">
<view class="num num--done">该商品券已完成核销</view>
</view>
<view v-else class="num-wrap" @tap="copyVerifyCode">
<view class="num">{{ orderInfo.pickUpVerifyCode }}</view>
</view>
<view class="rules">
@@ -187,6 +196,18 @@
return sheep.$url.cdn(raw);
});
const isVerifyCompleted = computed(() => {
const info = props.orderInfo || {};
const status = Number(info?.status);
return Boolean(
info?.pickUpVerifyTime ||
info?.verifyTime ||
info?.completedTime ||
status === 30 ||
status === 3,
);
});
const addressText = computed(() => {
const s = props.systemStore || {};
const province = s.province || '';
@@ -309,6 +330,7 @@
}
.order-details .writeOff .grayBg .pictrue {
position: relative;
width: 290rpx;
height: 290rpx;
}
@@ -318,6 +340,35 @@
height: 100%;
}
.order-details .writeOff .grayBg .pictrue .verify-mask {
position: absolute;
inset: 0;
background: rgba(255, 255, 255, 0.82);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.order-details .writeOff .grayBg .pictrue .verify-mask__icon {
width: 112rpx;
height: 112rpx;
border-radius: 56rpx;
background: #56c33b;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 8rpx 20rpx rgba(86, 195, 59, 0.24);
}
.order-details .writeOff .grayBg .pictrue .verify-mask__text {
margin-top: 18rpx;
font-size: 40rpx;
line-height: 56rpx;
color: #2a7c1f;
font-weight: 600;
}
.order-details .writeOff .gear {
width: 590rpx;
height: 30rpx;
@@ -345,6 +396,19 @@
padding-top: 4rpx;
}
.order-details .writeOff .num--done {
height: auto;
min-height: 84rpx;
padding-top: 0;
padding: 22rpx 24rpx;
box-sizing: border-box;
border-radius: 0 0 20rpx 20rpx;
background: #ffffff;
color: #b5b5b5;
font-size: 28rpx;
line-height: 40rpx;
}
.order-details .writeOff .rules {
margin: 46rpx 30rpx 0 30rpx;
border-top: 1px solid #f0f0f0;