fix: 兼容原有不含配置单次抽奖人数的数据

This commit is contained in:
ex_zhangwenlei@exiot.cmcc
2024-01-24 23:01:59 +08:00
parent 00655fa3fd
commit f1a56a80c9
3 changed files with 6 additions and 6 deletions

View File

@@ -408,7 +408,7 @@ const stopLottery = async () => {
let leftover = currentPrize.value.count - currentPrize.value.isUsedCount
const customCount=currentPrize.value.separateCount
if(customCount.enable&&customCount.countList.length>0){
if(customCount&&customCount.enable&&customCount.countList.length>0){
for(let i=0;i<customCount.countList.length;i++){
if(customCount.countList[i].isUsedCount<customCount.countList[i].count){
leftover=customCount.countList[i].count-customCount.countList[i].isUsedCount
@@ -466,7 +466,7 @@ const continueLottery = async () => {
}
const customCount=currentPrize.value.separateCount
if(customCount.enable&&customCount.countList.length>0){
if(customCount&&customCount.enable&&customCount.countList.length>0){
for(let i=0;i<customCount.countList.length;i++){
if(customCount.countList[i].isUsedCount<customCount.countList[i].count){
customCount.countList[i].isUsedCount+= luckyCount.value