master
yin5th 2021-12-08 19:23:26 +08:00
parent dd4a8422c9
commit e6013ecb93
1 changed files with 3 additions and 5 deletions

View File

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