波哥修改
parent
1692cdac9b
commit
a0ad95dc60
10
js/handle.js
10
js/handle.js
|
@ -157,7 +157,7 @@ function receiveMessage(event)
|
||||||
let randomEvent = eventTextList[mathIndex] ? eventTextList[mathIndex] : ''
|
let randomEvent = eventTextList[mathIndex] ? eventTextList[mathIndex] : ''
|
||||||
// TODO 测试后 删除弹幕随机附加事件
|
// TODO 测试后 删除弹幕随机附加事件
|
||||||
let dm = {text: data.danmaku, uid: data.uid, uname: data.uname,
|
let dm = {text: data.danmaku, uid: data.uid, uname: data.uname,
|
||||||
event: getEvent(getFirstEventKeyword(data.danmaku+randomEvent)),
|
event: getEvent(getFirstEventKeyword(data.danmaku)),
|
||||||
is_new: isNew, is_admin: 0, is_exit: random2, is_leader: isLeader}
|
is_new: isNew, is_admin: 0, is_exit: random2, is_leader: isLeader}
|
||||||
// console.log(dm,"")//
|
// console.log(dm,"")//
|
||||||
// TODO 测试后 删除领舞随机
|
// TODO 测试后 删除领舞随机
|
||||||
|
@ -175,16 +175,18 @@ function receiveMessage(event)
|
||||||
|
|
||||||
// console.log(leader, '当前领舞')
|
// console.log(leader, '当前领舞')
|
||||||
// console.log(leaderRandomEvent, '领舞随机事件')
|
// console.log(leaderRandomEvent, '领舞随机事件')
|
||||||
let actionIndex = Math.floor(Math.random()*actionArr.length);
|
// let actionIndex = Math.floor(Math.random()*actionArr.length);
|
||||||
let moveIndex = Math.floor(Math.random()*moveArr.length);
|
// let moveIndex = Math.floor(Math.random()*moveArr.length);
|
||||||
if(dm.is_new==1){
|
if(dm.is_new==1){
|
||||||
peopleObj(dm.uname,dm.uid,dm.text,actionArr[actionIndex]);
|
peopleObj(dm.uname,dm.uid,dm.text,dm.event);
|
||||||
|
console.log(dm.event, '当前触发事件')
|
||||||
} else {
|
} else {
|
||||||
$(`#${dm.uid} .speak`).html(dm.text);
|
$(`#${dm.uid} .speak`).html(dm.text);
|
||||||
$(`#${dm.uid} .speak`).removeClass("dn");
|
$(`#${dm.uid} .speak`).removeClass("dn");
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
$(`#${dm.uid} .speak`).addClass("dn");
|
$(`#${dm.uid} .speak`).addClass("dn");
|
||||||
},3000)
|
},3000)
|
||||||
|
console.log(dm.event, '当前触发事件')
|
||||||
peopleAction(`${dm.uid}`,dm.event);
|
peopleAction(`${dm.uid}`,dm.event);
|
||||||
}
|
}
|
||||||
num++;
|
num++;
|
||||||
|
|
Loading…
Reference in New Issue