一起动作
parent
66a46bd31c
commit
61e30220d0
11
js/handle.js
11
js/handle.js
|
@ -134,13 +134,13 @@ function receiveMessage(event)
|
|||
// 大航海列表
|
||||
if (adminList.length > 0) {
|
||||
// 获取当前领舞人
|
||||
let leader = getLeader()
|
||||
let currentLeader = getLeader()
|
||||
let now = (new Date).getTime()/1000
|
||||
if (leader['name'] === '') {
|
||||
if (currentLeader['name'] === '') {
|
||||
setLeader(adminList[0], leaderTime)
|
||||
} else {
|
||||
//领舞人存在 检查过期时间
|
||||
if (leader['time'] === 0 || leader['time'] < now) {
|
||||
if (currentLeader['time'] === 0 || currentLeader['time'] < now) {
|
||||
// 切换领舞
|
||||
|
||||
// 当前领舞人
|
||||
|
@ -184,12 +184,15 @@ function receiveMessage(event)
|
|||
let leader = {
|
||||
uid: 0, uname: leaderInfo, text: '', event: ''
|
||||
}
|
||||
|
||||
if (isLeader) {
|
||||
let leaderEvent = getLeaderEvent(dm.text)
|
||||
leader.uid = dm.uid
|
||||
leader.uname = dm.uname
|
||||
leader.text = dm.text
|
||||
leader.event = getLeaderEvent(dm.text)
|
||||
leader.event = eventName ? eventName : leaderEvent
|
||||
}
|
||||
|
||||
// 新用户
|
||||
if(dm.is_new==1){
|
||||
// if(dm.uname!=leader.uname){//如果弹幕的人的名字不等于领舞者的名字,就创建一个人物
|
||||
|
|
Loading…
Reference in New Issue