diff --git a/src/api/API.js b/src/api/API.js index bee602c..85fe151 100644 --- a/src/api/API.js +++ b/src/api/API.js @@ -24,7 +24,7 @@ export const getUserListApi = function (params) { // 查询中奖名单 export const getGetPrizeUserListApi = function (params) { return request({ - url: `${APIurl}/admin/win/list`, + url: `${APIurl}/api/winUser/list`, method: "POST", data: params, }); diff --git a/src/views/choujiang/hxl-cj/cj.vue b/src/views/choujiang/hxl-cj/cj.vue index ab59683..efc26e1 100644 --- a/src/views/choujiang/hxl-cj/cj.vue +++ b/src/views/choujiang/hxl-cj/cj.vue @@ -245,7 +245,7 @@ const closeGetPrize = () => { }; //揭示奖品 -const lookPrize = (item) => { +const lookPrize = async (item) => { // 未进入抽奖禁止揭晓 if (!joinLottery) { addQipao("请先进入抽奖。"); @@ -293,6 +293,8 @@ const lookPrize = (item) => { //点击揭晓 item.isLook = true; } + await nextTick(); + setPrizeData(currentPrizeIndex); }; function setPrizeData(currentPrizeIndex, isInit) { @@ -323,7 +325,8 @@ function setPrizeData(currentPrizeIndex, isInit) { } } - // console.log("currentPrize", currentPrize); + console.log("count", count); + console.log("totalCount", totalCount); let percent = (count / totalCount).toFixed(2); if (elements.bar) { diff --git a/src/views/choujiang/index.vue b/src/views/choujiang/index.vue index 0cddadf..4945b2a 100644 --- a/src/views/choujiang/index.vue +++ b/src/views/choujiang/index.vue @@ -102,12 +102,14 @@ const lotteryEngine = useLotteryEngine(dataManager, { onMounted(async () => { isDisabled.value = true; + + await dataManager.getBasicData(); + + await dataManager.getUsers(); setTimeout(() => { isDisabled.value = false; - }, 4000); + }, 3800); - await dataManager.getBasicData(); - await dataManager.getUsers(); // 将 dataManager 挂载到 window 对象,供子组件使用 window.dataManager = dataManager; @@ -159,7 +161,7 @@ async function handleLotteryClick() { break; case "ready": - if (waitingForNextReveal.value) { + if (waitingForNextReveal.value || lastRevealed.value === 0) { console.log("waitingForNextReveal.value", waitingForNextReveal.value); // 显示弹窗提示 showPrizeExhaustedModal.value = true; @@ -327,30 +329,22 @@ function handleNextPrize() { } .modal-text { + position: fixed !important; + top: 300px; + left: 50% !important; + transform: translate(-50%, -50%) !important; color: #ff0000; - font-size: 18px; + font-size: 50px; font-weight: bold; - text-align: center; margin: 0; white-space: nowrap; + } @keyframes fadeInOut { - 0% { - opacity: 0; - transform: translateY(-20px); - } - 20% { - opacity: 1; - transform: translateY(0); - } - 80% { - opacity: 1; - transform: translateY(0); - } - 100% { - opacity: 0; - transform: translateY(-20px); - } + 0% { opacity: 0; } + 20% { opacity: 1; } + 80% { opacity: 1; } + 100% { opacity: 0; } } \ No newline at end of file diff --git a/src/views/choujiang/lottery/PrizePanel.vue b/src/views/choujiang/lottery/PrizePanel.vue index ccc7052..438d9b4 100644 --- a/src/views/choujiang/lottery/PrizePanel.vue +++ b/src/views/choujiang/lottery/PrizePanel.vue @@ -1,6 +1,9 @@