master
yin5th 2021-12-08 18:10:21 +08:00
parent 7bb5537109
commit 6e80e45b6e
1 changed files with 8 additions and 3 deletions

View File

@ -228,7 +228,7 @@ function receiveMessage(event)
if (giftList.length > 0) { if (giftList.length > 0) {
updateUserCell(giftList) updateUserCell(giftList)
// console.log(userCell, '用户礼物记录') console.log(userCell, '用户电池记录')
} }
// console.log(adminList, '舰长列表') // console.log(adminList, '舰长列表')
@ -472,9 +472,14 @@ function createVirtual() {
function updateUserCell(list) { function updateUserCell(list) {
$.each(list, function (index, item) { $.each(list, function (index, item) {
let cell = 0 let cell = 0
if (giftObj[item.gift] != undefined) { // console.log(item.gift, '礼物名称')
cell = giftObj[item.gift] * item.num // console.log(giftObj, '礼物对象')
let giftCellNum = giftObj[item.gift]
// console.log(giftCellNum)
if (giftCellNum != undefined) {
cell = giftCellNum * item.num
} }
// console.log(cell, '本次电池数量')
if (cell > 0) { if (cell > 0) {
if (userCell[item.uname] == undefined) { if (userCell[item.uname] == undefined) {
userCell[item.uname] = cell userCell[item.uname] = cell