From 38e7fb18b3fa79c400da56e0d220c389b906ecc3 Mon Sep 17 00:00:00 2001 From: Ethereal <3432649580@qq.com> Date: Mon, 21 Jul 2025 19:45:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E6=8A=BD=E5=A5=96=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E7=9A=84=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/lottery.js | 11 +++- src/views/choujiang/index.vue | 89 +++++++++++++++++++++++++--- src/views/choujiang/lottery/Lottery3D.vue | 6 +- src/views/choujiang/lottery/PrizePanel.vue | 10 +++- src/views/choujiang/lottery/dataManager.js | 6 +- src/views/choujiang/lottery/lotteryEngine.js | 38 ++++++++---- 6 files changed, 131 insertions(+), 29 deletions(-) diff --git a/src/store/lottery.js b/src/store/lottery.js index 53e4900..07fceb5 100644 --- a/src/store/lottery.js +++ b/src/store/lottery.js @@ -14,6 +14,9 @@ export const useLotteryStore = defineStore('lottery', () => { const allUsers = ref([]) const isUsersLoaded = ref(false) + const winnerList = ref([]) + + function setWinners(list) { // 如果是数组,则添加到现有数组中;如果是单个项目,则直接添加 if (Array.isArray(list)) { @@ -54,6 +57,10 @@ export const useLotteryStore = defineStore('lottery', () => { return "" } + function setWinnerList(list) { + winnerList.value = list + } + return { lotteryState, setLotteryState, @@ -67,6 +74,8 @@ export const useLotteryStore = defineStore('lottery', () => { allUsers, isUsersLoaded, setAllUsers, - getRandomUserName + getRandomUserName, + winnerList, + setWinnerList } }) \ No newline at end of file diff --git a/src/views/choujiang/index.vue b/src/views/choujiang/index.vue index 89b690a..55f3222 100644 --- a/src/views/choujiang/index.vue +++ b/src/views/choujiang/index.vue @@ -19,6 +19,12 @@ +