Browse Source

Merge branch 'wangyi/feature-20250710191445-抽奖' into milestone-20250722-抽奖

songtongtong/feature-20250717104937-众筹
Ethereal 4 weeks ago
parent
commit
f6f878775f
  1. 23
      src/views/choujiang/index.vue
  2. 2
      src/views/choujiang/lottery/CardItem.vue
  3. 2
      src/views/choujiang/lottery/Lottery3D.vue
  4. 2
      src/views/choujiang/lottery/PrizePanel.vue

23
src/views/choujiang/index.vue

@ -25,6 +25,12 @@
</div> </div>
</div> </div>
<div v-if="showPrizeExhaustedModal2" class="prize-exhausted-modal">
<div class="modal-content">
<p class="modal-text">该礼品已抽取完毕</p>
</div>
</div>
<!-- <UserList <!-- <UserList
:lucky-users=" :lucky-users="
dataManager.state.basicData.luckyUsers[ dataManager.state.basicData.luckyUsers[
@ -56,6 +62,7 @@ const qipaoText = ref("");
const showQipao = ref(false); const showQipao = ref(false);
const showPrizeExhaustedModal = ref(false); const showPrizeExhaustedModal = ref(false);
const showPrizeExhaustedModal1 = ref(false); const showPrizeExhaustedModal1 = ref(false);
const showPrizeExhaustedModal2 = ref(false);
// const lotteryState = ref('idle'); // idle, ready, rotating, result // const lotteryState = ref('idle'); // idle, ready, rotating, result
@ -161,7 +168,7 @@ async function handleLotteryClick() {
break; break;
case "ready": case "ready":
if (waitingForNextReveal.value || lastRevealed.value === 0) {
if (waitingForNextReveal.value) {
console.log("waitingForNextReveal.value", waitingForNextReveal.value); console.log("waitingForNextReveal.value", waitingForNextReveal.value);
// //
showPrizeExhaustedModal.value = true; showPrizeExhaustedModal.value = true;
@ -184,6 +191,20 @@ async function handleLotteryClick() {
break; break;
} }
if (lastRevealed.value === 0 && dataManager.state.basicData.prizes[lastRevealed.value].remainNum === 0) {
// 0
// const currentPrize = dataManager.state.basicData.prizes[lastRevealed.value];
// if (currentPrize && currentPrize.remainNum === 0) {
showPrizeExhaustedModal2.value = true;
setTimeout(() => {
showPrizeExhaustedModal2.value = false;
}, 1000);
isDisabled.value = false;
break;
// }
}
console.log("lotteryState 变更前:", lotteryState.value, "-> rotating"); console.log("lotteryState 变更前:", lotteryState.value, "-> rotating");
lotteryState.value = "rotating"; lotteryState.value = "rotating";
console.log("lotteryState 变更后:", lotteryState.value); console.log("lotteryState 变更后:", lotteryState.value);

2
src/views/choujiang/lottery/CardItem.vue

@ -173,7 +173,7 @@ onBeforeUnmount(() => {
/* ... */ /* ... */
} }
.details { .details {
font-size: 26px;
font-size: 24px;
color: white; color: white;
text-align: center; text-align: center;
display: flex; display: flex;

2
src/views/choujiang/lottery/Lottery3D.vue

@ -571,7 +571,7 @@ function changeCard(cardIndex, user) {
const username = user.username || user[1] || ""; const username = user.username || user[1] || "";
const company = user.company || user[2] || "PSST"; const company = user.company || user[2] || "PSST";
card.innerHTML = `<div style="font-size: 30px; font-weight: bold; color: #ffffff; text-align: center; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%;">${jwcode}</div>`;
card.innerHTML = `<div style="font-size: 20px; font-weight: bold; color: #ffffff; text-align: center; display: flex; justify-content: center; align-items: center; width: 100%; height: 100%;">${jwcode}</div>`;
// //
card.classList.add("prize"); card.classList.add("prize");

2
src/views/choujiang/lottery/PrizePanel.vue

@ -400,7 +400,7 @@ onMounted(() => {
gap: 18px; gap: 18px;
max-height: 700px; max-height: 700px;
overflow-x: hidden !important; overflow-x: hidden !important;
overflow-y: auto;
/* overflow-y: auto; */
padding-right: 10px; padding-right: 10px;
padding-left: 10px; padding-left: 10px;
scrollbar-width: thin; scrollbar-width: thin;

Loading…
Cancel
Save