master
parent
ea7a0d2555
commit
ece771e72e
19
js/handle.js
19
js/handle.js
|
@ -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, '高能榜列表')
|
||||
|
|
Loading…
Reference in New Issue