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