master
yin5th 2021-12-02 13:50:21 +08:00
parent ea7a0d2555
commit ece771e72e
1 changed files with 3 additions and 16 deletions

View File

@ -131,27 +131,14 @@ function receiveMessage(event)
// 解析消息
let dataList = JSON.parse(event.data)
// 弹幕消息
let data = dataList.dm
// 房间号
let roomId = dataList.roomId
// 当前获取榜单类型 高能榜|大航海列表
let activeType = dataList.activeType
// 保存高能榜
if (activeType == 'high') {
sessionStorage.setItem(roomId+':highList', dataList.high)
}
// 保存大航海列表
if (activeType == 'admin') {
sessionStorage.setItem(roomId+':adminList', dataList.admin)
}
// 舰长
let adminList = sessionStorage.getItem(roomId+':adminList') ? sessionStorage.getItem(roomId+':adminList').split(',') : []
let adminList = dataList.admin
// 高能榜top3
let highList = sessionStorage.getItem(roomId+':highList') ? sessionStorage.getItem(roomId+':highList').split(',') : []
let highList = dataList.high
// console.log(adminList, '舰长列表')
// console.log(highList, '高能榜列表')