feat: ✨ 首页取消单次10人抽奖人数限制
This commit is contained in:
@@ -499,10 +499,8 @@ export function useViewModel() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
luckyCount.value = leftover
|
luckyCount.value = leftover
|
||||||
console.log('抽取的幸运人数量', luckyCount.value, leftover)
|
|
||||||
// 重构抽奖函数
|
// 重构抽奖函数
|
||||||
luckyTargets.value = getRandomElements(personPool.value, luckyCount.value)
|
luckyTargets.value = getRandomElements(personPool.value, luckyCount.value)
|
||||||
console.log('抽取的幸运人', luckyTargets.value.length, luckyTargets.value)
|
|
||||||
luckyTargets.value.forEach((item) => {
|
luckyTargets.value.forEach((item) => {
|
||||||
const index = personPool.value.findIndex(person => person.id === item.id)
|
const index = personPool.value.findIndex(person => person.id === item.id)
|
||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user