|
@@ -97,17 +97,15 @@
|
|
};
|
|
};
|
|
|
|
|
|
var barrage = new Barrage();
|
|
var barrage = new Barrage();
|
|
-
|
|
|
|
var shakeClientWebsocket = new ShakeClientWebsocket(addr,token,room,user,true);
|
|
var shakeClientWebsocket = new ShakeClientWebsocket(addr,token,room,user,true);
|
|
-
|
|
|
|
- shakeClientWebsocket.client.onmessage = function(res){
|
|
|
|
|
|
+ shakeClientWebsocket.client.onmessage = function(res)
|
|
|
|
+ {
|
|
var datas = JSON.parse(res.data);
|
|
var datas = JSON.parse(res.data);
|
|
if(datas.op == 'shake') {
|
|
if(datas.op == 'shake') {
|
|
barrage.add(datas.content).send();
|
|
barrage.add(datas.content).send();
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
-
|
|
|
|
var shake_start = document.getElementById('shake_start');
|
|
var shake_start = document.getElementById('shake_start');
|
|
var shake_null = document.getElementById('shake_null');
|
|
var shake_null = document.getElementById('shake_null');
|
|
var shake_success = document.getElementById('shake_success');
|
|
var shake_success = document.getElementById('shake_success');
|
|
@@ -228,8 +226,8 @@
|
|
shakeClientWebsocket.shake_bonus(bonus.info.money);
|
|
shakeClientWebsocket.shake_bonus(bonus.info.money);
|
|
|
|
|
|
html += '<div class="head_icon">' + avatar + '</div>' +
|
|
html += '<div class="head_icon">' + avatar + '</div>' +
|
|
- '<div class="name_box">' + '<div class="name">' + bonus.bonuses[i].name + '</div>' +
|
|
|
|
- '<div class="results_msg">' + msg + '</div>' + '</div>';
|
|
|
|
|
|
+ '<div class="name_box">' + '<div class="name">' + bonus.bonuses[i].name + '</div>' +
|
|
|
|
+ '<div class="results_msg">' + msg + '</div>' + '</div>';
|
|
html += '<div class="arrow_icon"></div>';
|
|
html += '<div class="arrow_icon"></div>';
|
|
html += '<input type="hidden" value="'+ bonus.bonuses[i].url + '" id="url">';
|
|
html += '<input type="hidden" value="'+ bonus.bonuses[i].url + '" id="url">';
|
|
}
|
|
}
|
|
@@ -249,9 +247,6 @@
|
|
shaker.run(eventData)
|
|
shaker.run(eventData)
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
if(isMobile.iOS()) {
|
|
if(isMobile.iOS()) {
|
|
init_ios_bridge(function(bridge) { });
|
|
init_ios_bridge(function(bridge) { });
|
|
shaker.init(30);
|
|
shaker.init(30);
|