|
|
@ -64,30 +64,7 @@ |
|
|
|
> |
|
|
|
获奖名单 |
|
|
|
</button> |
|
|
|
<!-- <div |
|
|
|
v-if="showWinnerList" |
|
|
|
class="winner-modal-mask" |
|
|
|
@click="closeWinnerList" |
|
|
|
> |
|
|
|
<div |
|
|
|
class="winner-modal" |
|
|
|
:style="{ |
|
|
|
position: 'absolute', |
|
|
|
left: modalLeft + 'px', |
|
|
|
top: modalTop + 'px', |
|
|
|
}" |
|
|
|
@click.stop |
|
|
|
> |
|
|
|
<div class="winner-modal-title">Homily ID</div> |
|
|
|
<ul class="winner-list"> |
|
|
|
<li v-for="(user, idx) in fakeWinners" :key="idx"> |
|
|
|
<span>{{ user.id }}</span> |
|
|
|
<span>{{ user.prize }}</span> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</div> --> |
|
|
|
<!-- </div> --> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -95,7 +72,7 @@ |
|
|
|
<div v-else> |
|
|
|
<div class="prize-panel-root"> |
|
|
|
<div |
|
|
|
class="prize-panel-list" |
|
|
|
class="prize-panel-list1" |
|
|
|
v-if="prizes && prizes.length && lastRevealedIdx >= 0" |
|
|
|
> |
|
|
|
<div |
|
|
@ -134,23 +111,9 @@ |
|
|
|
prizes[lastRevealedIdx].count |
|
|
|
}} |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="prize-panel-footer"> |
|
|
|
</div> <div class="prize-panel-footer"> |
|
|
|
<div class="arrow-down" @click="toggleWinnerList"></div> |
|
|
|
<!-- <div class="arrow-up " @click="openWinnerList"> </div> |
|
|
|
<button |
|
|
|
|
|
|
|
ref="winnerBtnRef" |
|
|
|
class="winner-btn" |
|
|
|
@click="toggleWinnerList" |
|
|
|
> |
|
|
|
获奖名单 |
|
|
|
</button> --> |
|
|
|
<div |
|
|
|
<div |
|
|
|
v-if="showWinnerList" |
|
|
|
class="winner-modal-mask" |
|
|
|
@click="closeWinnerList" |
|
|
@ -196,8 +159,14 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -273,6 +242,7 @@ function canRevealPrize(idx) { |
|
|
|
// 卡片点击事件 |
|
|
|
function handleReveal(idx) { |
|
|
|
// 检查是否可以揭秘这个奖品 |
|
|
|
if (idx !== nextRevealIdx.value ) {alert("请按顺序揭秘奖品!"); return;} |
|
|
|
if (idx === nextRevealIdx.value && canRevealPrize(idx)) { |
|
|
|
revealedCount.value++; |
|
|
|
lastRevealedIdx.value = idx; // 记录最新揭秘的索引 |
|
|
@ -333,15 +303,6 @@ async function openWinnerList() { |
|
|
|
if (lastRevealedIdx.value >= 0) { |
|
|
|
showOne.value = false; |
|
|
|
} |
|
|
|
// 设置弹窗位置 |
|
|
|
// nextTick(() => { |
|
|
|
// const btn = winnerBtnRef.value; |
|
|
|
// if (btn) { |
|
|
|
// const rect = btn.getBoundingClientRect(); |
|
|
|
// modalLeft.value = rect.left - 23; |
|
|
|
// modalTop.value = rect.bottom + 18; // 4px间距 |
|
|
|
// } |
|
|
|
// }); |
|
|
|
} |
|
|
|
function closeWinnerList() { |
|
|
|
showWinnerList.value = false; |
|
|
@ -380,15 +341,6 @@ async function toggleWinnerList() { |
|
|
|
showOne.value = false; |
|
|
|
console.log("设置 showOne 为 false"); |
|
|
|
} |
|
|
|
// 设置弹窗位置 |
|
|
|
// nextTick(() => { |
|
|
|
// const btn = winnerBtnRef.value; |
|
|
|
// if (btn) { |
|
|
|
// const rect = btn.getBoundingClientRect(); |
|
|
|
// modalLeft.value = rect.left - 23; |
|
|
|
// modalTop.value = rect.bottom + 18; // 4px间距 |
|
|
|
// } |
|
|
|
// }); |
|
|
|
} else { |
|
|
|
// 当关闭获奖名单且showOne为false时,将其切换回true |
|
|
|
if (!showOne.value) { |
|
|
@ -425,9 +377,36 @@ function getProgressPercent(prize) { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
gap: 18px; |
|
|
|
height: 400px; |
|
|
|
overflow-x: hidden !important; |
|
|
|
overflow-y: auto; |
|
|
|
max-height: 700px; |
|
|
|
|
|
|
|
padding-right: 10px; |
|
|
|
scrollbar-width: thin; |
|
|
|
scrollbar-color: #ffd283 rgba(255, 210, 131, 0.3); /* Firefox */ |
|
|
|
} |
|
|
|
.prize-panel-list1 { |
|
|
|
position: absolute; |
|
|
|
top: 20px; |
|
|
|
left: 20px; |
|
|
|
background: none; |
|
|
|
z-index: 10; |
|
|
|
min-width: 320px; |
|
|
|
max-width: 342px; |
|
|
|
text-align: left; |
|
|
|
display: flex;} |
|
|
|
|
|
|
|
.prize-panel-list::-webkit-scrollbar { |
|
|
|
width: 6px; |
|
|
|
} |
|
|
|
|
|
|
|
.prize-panel-list::-webkit-scrollbar-track { |
|
|
|
background: rgba(255, 210, 131, 0.3); |
|
|
|
border-radius: 3px; |
|
|
|
} |
|
|
|
|
|
|
|
.prize-panel-list::-webkit-scrollbar-thumb { |
|
|
|
background-color: #ffd283; |
|
|
|
border-radius: 3px; |
|
|
|
} |
|
|
|
.prize-panel-item { |
|
|
|
background: #ffd283; |
|
|
@ -525,20 +504,21 @@ function getProgressPercent(prize) { |
|
|
|
font-weight: bold; |
|
|
|
} |
|
|
|
.prize-panel-footer { |
|
|
|
position: absolute; |
|
|
|
left: 0; |
|
|
|
bottom: -26px; |
|
|
|
position: fixed; |
|
|
|
right: 750px; |
|
|
|
bottom: 435px; |
|
|
|
width: 100%; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
align-items: center; |
|
|
|
z-index: 20; |
|
|
|
/* 移除 move-up 相关 */ |
|
|
|
padding: 10px 0; |
|
|
|
border-radius: 0 0 6px 6px; |
|
|
|
} |
|
|
|
.arrow-up { |
|
|
|
position: relative; |
|
|
|
width: 36px; |
|
|
|
height: 24px; |
|
|
|
width: 50px; |
|
|
|
height: 30px; |
|
|
|
margin-bottom: 4px; |
|
|
|
cursor: pointer; |
|
|
|
background-image: url("../../../assets/展开.png"); |
|
|
@ -548,10 +528,10 @@ function getProgressPercent(prize) { |
|
|
|
} |
|
|
|
.arrow-down { |
|
|
|
position: fixed; |
|
|
|
top: 120px; |
|
|
|
left: 181px; |
|
|
|
width: 36px; |
|
|
|
height: 38px; |
|
|
|
top: 100px; |
|
|
|
left: 150px; |
|
|
|
width: 47px; |
|
|
|
height: 28px; |
|
|
|
margin-bottom: 4px; |
|
|
|
cursor: pointer; |
|
|
|
background-image: url("../../../assets/展开.png"); |
|
|
@ -572,8 +552,8 @@ function getProgressPercent(prize) { |
|
|
|
} |
|
|
|
.winner-modal-mask { |
|
|
|
position: fixed; |
|
|
|
top: 155px; |
|
|
|
left:33px; |
|
|
|
top: 142px; |
|
|
|
left:-4px; |
|
|
|
width: 100vw; |
|
|
|
height: 100vh; |
|
|
|
background: rgba(0, 0, 0, 0.01); |
|
|
|