From ac497ce163ec19fccc725285ffa7200220460d62 Mon Sep 17 00:00:00 2001 From: tsui110 Date: Fri, 2 Jan 2026 20:07:24 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=94=AF=E6=8C=81=E5=86=8D?= =?UTF-8?q?=E6=9D=A5=E4=B8=80=E6=AC=A1=E7=9A=84=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/activity/LotteryResultPopup.vue | 70 +++++++++++++++++-- pages-activity/activity/wuxianshang/index.vue | 31 +++++++- 2 files changed, 95 insertions(+), 6 deletions(-) diff --git a/components/activity/LotteryResultPopup.vue b/components/activity/LotteryResultPopup.vue index 98441fa..0b979d2 100644 --- a/components/activity/LotteryResultPopup.vue +++ b/components/activity/LotteryResultPopup.vue @@ -54,7 +54,21 @@ - + + + + + + 🔄 + 再来一次 + + + + 知道了 + + + + @@ -71,10 +85,11 @@ import { computed } from 'vue' const props = defineProps({ visible: { type: Boolean, default: false }, - results: { type: Array, default: () => [] } + results: { type: Array, default: () => [] }, + showRetryButton: { type: Boolean, default: false } // 是否显示"再来一次"按钮 }) -const emit = defineEmits(['update:visible', 'close']) +const emit = defineEmits(['update:visible', 'close', 'retry']) function cleanUrl(u) { if (!u) return '/static/logo.png' @@ -147,6 +162,11 @@ function handleClose() { emit('close') } +function handleRetry() { + emit('update:visible', false) + emit('retry') +} + function previewImage(url) { if (url) uni.previewImage({ urls: [url], current: url }) } @@ -373,12 +393,54 @@ function previewImage(url) { display: flex; align-items: center; justify-content: center; - + &:active .btn-inner { transform: scale(0.96); } } +.retry-buttons { + display: flex; + gap: 16rpx; + width: 100%; +} + +.retry-btn { + position: relative; + flex: 2; + height: 110rpx; + display: flex; + align-items: center; + justify-content: center; + + &:active .btn-inner { + transform: scale(0.96); + } +} + +.secondary-btn { + flex: 1; + height: 110rpx; + background: rgba(255, 255, 255, 0.2); + border: 2rpx solid rgba(255, 255, 255, 0.3); + border-radius: 55rpx; + display: flex; + align-items: center; + justify-content: center; + + &:active { + background: rgba(255, 255, 255, 0.3); + transform: scale(0.96); + } + + .btn-text { + font-size: 30rpx; + font-weight: 700; + color: #fff; + text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.2); + } +} + .btn-glow { position: absolute; inset: 0; diff --git a/pages-activity/activity/wuxianshang/index.vue b/pages-activity/activity/wuxianshang/index.vue index 085d7ae..e757968 100644 --- a/pages-activity/activity/wuxianshang/index.vue +++ b/pages-activity/activity/wuxianshang/index.vue @@ -60,7 +60,9 @@ 0) { + // 使用次数卡直接抽奖 + useGamePassFlag.value = true + selectedCoupon.value = null + selectedCard.value = null + onMachineDraw(lastDrawCount.value) + } else { + // 次数卡已用完,打开支付弹窗 + openPayment(lastDrawCount.value) + } +} + function openPayment(count) { const times = Math.max(1, Number(count || 1)) pendingCount.value = times @@ -419,10 +441,15 @@ async function onMachineDraw(count) { // 隐藏加载弹窗 showDrawLoading.value = false - + const items = mapResultsToFlipItems(resultRes, currentIssueRewards.value) - + drawResults.value = items + + // 记录最后一次抽奖是否使用了次数卡,用于"再来一次"按钮 + lastDrawUsedGamePass.value = useGamePassFlag.value + lastDrawCount.value = times + showResultPopup.value = true } catch (e) { showDrawLoading.value = false