feat(新年活动): 完善页面

This commit is contained in:
hzj 2025-12-31 10:59:35 +08:00
parent d11798266d
commit 88fdb55d82

View File

@ -517,10 +517,10 @@
<div
style="
width: 100%;
height: 60.5vw;
height: 61vw;
align-self: stretch;
margin: 43vw 0 0;
margin: 42.5vw 0 0;
padding: 0 18vw;
display: grid;
grid-template-columns: repeat(3, 1fr);
@ -558,7 +558,6 @@
style="
display: block;
width: 100%;
aspect-ratio: 1/1;
position: absolute;
inset: 0;
@ -647,7 +646,7 @@
>
<div style="display: flex; justify-content: space-between; align-items: center">
<div style="font-size: 1.2em; font-weight: 700">
Total Spins:({{ totalDraw?.totalCount || 0 }}/100)
Total Spins:({{ totalDraw?.usedCount || 0 }}/100)
</div>
</div>
<div style="display: flex; justify-content: space-between; align-items: center">
@ -1347,12 +1346,24 @@
"
>
<!-- 上一个奖品 -->
<div style="width: 8vw; align-self: stretch">
<div
v-if="result.length > 1 && resultShowIndex > 0"
style="width: 100%; height: 100%"
<div
style="
width: 8vw;
align-self: stretch;
display: flex;
justify-content: center;
align-items: center;
"
>
<img
v-smart-img
v-show="result.length > 1 && resultShowIndex > 0"
:src="imageUrl('rewardBack')"
alt=""
style="display: block; width: 100%; object-fit: cover"
@click="resultShowIndex--"
></div>
/>
</div>
<!-- 奖品 -->
<img
@ -1362,12 +1373,24 @@
style="display: block"
/>
<!-- 下一个奖品 -->
<div style="width: 8vw; align-self: stretch">
<div
v-if="result.length > 1 && resultShowIndex + 1 < result.length"
style="width: 100%; height: 100%"
<div
style="
width: 8vw;
align-self: stretch;
display: flex;
justify-content: center;
align-items: center;
"
>
<img
v-smart-img
v-show="result.length > 1 && resultShowIndex + 1 < result.length"
:src="imageUrl('rewardNext')"
alt=""
style="display: block; width: 100%; object-fit: cover"
@click="resultShowIndex++"
></div>
/>
</div>
</div>
@ -1451,12 +1474,12 @@
>
<div style="display: flex; align-items: center; gap: 4px">
<img
:src="record.prize.prizeImage || ''"
:alt="record.prize.prizeName || ''"
:src="record.prize?.prizeImage || ''"
alt=""
style="width: 10vw; object-fit: cover; display: block; aspect-ratio: 1/1"
/>
<div style="font-weight: 590; font-size: 0.9em">
{{ record.prize.prizeName }}
{{ record.prize?.prizeName }}
</div>
</div>
<div style="font-weight: 510; font-size: 0.8em">
@ -1510,7 +1533,7 @@ import {
myRecharge, //
activityRewardConfigs, //
myTickets, //
myTotalDrawCount, //
myTotalDrawCount, //
onceDraw, //
multiDraw, //
drawRecords, //
@ -1967,6 +1990,9 @@ const sweepstakes = async (consecutive = 1) => {
if (consecutive == 1) {
const resOnceDraw = await onceDraw(data)
if (resOnceDraw.status && resOnceDraw.body) {
getTotalDrawCount() //
getTickets() //
result.value.push(resOnceDraw.body)
const resItem = resOnceDraw.body //
@ -1982,6 +2008,9 @@ const sweepstakes = async (consecutive = 1) => {
else {
const resMultiDraw = await multiDraw(data)
if (resMultiDraw.status && resMultiDraw.body) {
getTotalDrawCount() //
getTickets() //
result.value = resMultiDraw.body.results
//
@ -1992,7 +2021,6 @@ const sweepstakes = async (consecutive = 1) => {
await startLottery(index)
}
}
getTickets() //
getDrawRecords() //
resultShow.value = true
isRolling.value = false
@ -2184,7 +2212,7 @@ const getTickets = async () => {
}
}
//
//
const getTotalDrawCount = async () => {
const resTotalDrawCount = await myTotalDrawCount()
if (resTotalDrawCount.status && resTotalDrawCount.body) {
@ -2269,7 +2297,7 @@ const initData = async () => {
getMyRecharge(), //
getActivityReward(), //
getTickets(), //
getTotalDrawCount(), //
getTotalDrawCount(), //
getTaskList(), //
getWinners(), //
])