backup: 线上最终版本全量备份
包含所有线上运行的改动: - 荷官端倒计时卡顿修复(CountdownService TTL+10/前端watchdog) - 停止下注debounce防重复(8个handle.js) - 洗码量规则重写(单边/双边/开和不计/百家乐+龙虎) - 龙虎和局不杀庄闲(全额退回) - 日志系统(Logger工具类/日志查看/清理脚本) - 好路提醒异常处理(WaybillRemindService try-catch) - 扫牌器连接改进(ScanConnectService) - 牛牛/三卡开牌修复 - .gitignore更新/.DS_Store清理
This commit is contained in:
@@ -51,8 +51,7 @@ var initScanParams = function() {
|
||||
isCardScaned = false;
|
||||
currentPositionToChange = -1;
|
||||
|
||||
$(".countdown").css({"opacity":0,"display":"none"});
|
||||
$(".countdown .grab-count").removeClass("count-active");
|
||||
$("#resultAreaTimer").hide();
|
||||
}
|
||||
// NN修改牌
|
||||
var openAllCardsPanel = function(dom) {
|
||||
@@ -183,7 +182,11 @@ websocket.on('reconnect', (timeout) => {
|
||||
var startBet = function(){
|
||||
websocket.emit('startBet',{table_id : table_id, number_tab_id : number_tab_id});
|
||||
};
|
||||
var isEndingBet = false;
|
||||
var endBet = function (){
|
||||
if(isEndingBet) return;
|
||||
isEndingBet = true;
|
||||
setTimeout(function(){ isEndingBet = false; }, 2000);
|
||||
websocket.emit('endBet',{table_id : table_id, number_tab_id : number_tab_id});
|
||||
};
|
||||
var startRob = function(){
|
||||
@@ -195,7 +198,7 @@ var endRob = function(){
|
||||
var resetNumberTab = function(){
|
||||
isCBoot = true;
|
||||
var betStatus = $("#number_tab_status").val();
|
||||
if(betStatus == 1 || betStatus == 2){
|
||||
if(betStatus == 1 || betStatus == 2 || betStatus == 3){
|
||||
layer.confirm(lang.is_reset_number,{btn: [lang.confirm,lang.cancel],title:lang.message}, function(index){
|
||||
websocket.emit('resetNumberTab',{table_id : table_id});
|
||||
isCBoot = false;
|
||||
@@ -228,7 +231,11 @@ var resetBoot = function(){
|
||||
layer.close(index);
|
||||
});
|
||||
};
|
||||
var isOpening = false;
|
||||
var opening = function(){
|
||||
if(isOpening) return;
|
||||
isOpening = true;
|
||||
setTimeout(function(){ isOpening = false; }, 3000);
|
||||
$('.control-box .btn-box2 span').removeClass('on');
|
||||
if(game_id == 1){
|
||||
websocket.emit('openingBaccarat',{table_id : table_id, number_tab_id : number_tab_id});
|
||||
@@ -463,8 +470,7 @@ websocket.on('resetNumberTab',function(data){
|
||||
}
|
||||
//
|
||||
|
||||
$(".countdown").css({"opacity":0,"display":"none"});
|
||||
$(".countdown .grab-count").removeClass("count-active");
|
||||
$("#resultAreaTimer").hide();
|
||||
$(".begincard .box").animate({"opacity":"0"},function(){
|
||||
$(".begincard").fadeOut();
|
||||
|
||||
@@ -526,9 +532,21 @@ websocket.on('resetBoot',function(data){
|
||||
}
|
||||
}
|
||||
});
|
||||
var _cdTimer = null;
|
||||
var _cdVal = 0;
|
||||
websocket.on('startBetCountDown',function(data){
|
||||
if(data.status == true && data.table_id == table_id){
|
||||
_cdVal = data.count_down;
|
||||
countDown(data.count_down);
|
||||
if(_cdTimer) clearTimeout(_cdTimer);
|
||||
if(_cdVal > 0){
|
||||
_cdTimer = setTimeout(function _tick(){
|
||||
_cdVal--;
|
||||
if(_cdVal >= 0) countDown(_cdVal);
|
||||
if(_cdVal > 0) _cdTimer = setTimeout(_tick, 1000);
|
||||
else _cdTimer = null;
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
});
|
||||
websocket.on('endBet',function(data){
|
||||
@@ -537,15 +555,10 @@ websocket.on('endBet',function(data){
|
||||
var doIntervalTime = parseInt(interval_time) + 1;
|
||||
var intervalTime = setInterval(function(){
|
||||
doIntervalTime--;
|
||||
$(".countdown .num").html(doIntervalTime)
|
||||
$(".countdown").css({"opacity":1,"display":"block"});
|
||||
$(".countdown .grab-count").addClass("count-active");
|
||||
$(".countdown .round-txt-item").addClass("color-red");
|
||||
$("#resultAreaTimer").html(doIntervalTime).show();
|
||||
if(doIntervalTime == 0) {
|
||||
clearInterval(intervalTime);
|
||||
$(".countdown").css({"opacity":0,"display":"none"});
|
||||
$(".countdown .grab-count").removeClass("count-active");
|
||||
$(".countdown .round-txt-item").removeClass("color-red");
|
||||
$("#resultAreaTimer").hide();
|
||||
if(game_id == 4 || game_id == 5){
|
||||
$(".banker_result").html('');
|
||||
$(".player_1_result").html('');
|
||||
@@ -555,29 +568,26 @@ websocket.on('endBet',function(data){
|
||||
$('#opening').val(0);
|
||||
$('#result_banker_pair').val(0);
|
||||
$('#result_player_pair').val(0);
|
||||
$(".countdown").css({"opacity":0,"display":"none"});
|
||||
$(".countdown .grab-count").removeClass("count-active");
|
||||
$("#resultAreaTimer").hide();
|
||||
setBetStatus(data.round.number_tab_status);
|
||||
c = parseInt($('#wait_time').val());
|
||||
}
|
||||
},1000);
|
||||
} else {
|
||||
$(".countdown").css({"opacity":0,"display":"none"});
|
||||
$(".countdown .grab-count").removeClass("count-active");
|
||||
$("#resultAreaTimer").hide();
|
||||
mp3List = ['stop_2.mp3'];
|
||||
audioMp3(mp3List).Play();
|
||||
if(game_id == 4 || game_id == 5){
|
||||
$(".banker_result").html('');
|
||||
$(".player_1_result").html('');
|
||||
$(".player_2_result").html('');
|
||||
$(".player_3_result").html('');
|
||||
$(".player_3_result").html('');
|
||||
}
|
||||
if(game_id == 6){
|
||||
$('#toning_result').val('');
|
||||
$(".toning-result-num").removeClass("active");
|
||||
}
|
||||
$(".countdown").css({"opacity":0,"display":"none"});
|
||||
$(".countdown .grab-count").removeClass("count-active");
|
||||
$("#resultAreaTimer").hide();
|
||||
setBetStatus(data.round.number_tab_status);
|
||||
|
||||
// 识别相关
|
||||
@@ -595,7 +605,11 @@ websocket.on('endBet',function(data){
|
||||
|
||||
}else{
|
||||
if (data.table_id != undefined && data.table_id == table_id) {
|
||||
layer.msg(lang[data.msg]);
|
||||
if(data.msg == 'end_bet_error' && data.bet_status != undefined){
|
||||
$('#number_tab_status').val(data.bet_status);
|
||||
} else {
|
||||
layer.msg(lang[data.msg]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -717,7 +731,7 @@ $(function(){
|
||||
if(!cookieValue){
|
||||
$.cookie("enter_time", 1, { expires: 1/86400*3 });
|
||||
}else{
|
||||
layer.msg('Please hold on');
|
||||
layer.msg('请稍等');
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -740,6 +754,8 @@ $(function(){
|
||||
}else{
|
||||
layer.msg("请稍等!");
|
||||
}
|
||||
}else if (numberTabStatus == 1) {
|
||||
endBet();
|
||||
}else if (numberTabStatus == 2) {
|
||||
opening();
|
||||
}
|
||||
@@ -753,11 +769,6 @@ $(function(){
|
||||
if(e.keyCode == 109){
|
||||
$('#update_ludan').toggle();
|
||||
}
|
||||
//换靴
|
||||
if(e.keyCode == 107){
|
||||
changeBoot();
|
||||
$('#keycode').val('');
|
||||
}
|
||||
//退出登录
|
||||
if(e.keyCode == 106){
|
||||
if(table_type == 1){
|
||||
@@ -784,11 +795,12 @@ $(function(){
|
||||
var number_tab_status=$("#number_tab_status").val();
|
||||
if((number_rob_status==1&&number_tab_status==0)||(number_rob_status==2&&number_tab_status==0)){
|
||||
endRob();
|
||||
}else{
|
||||
}else if(number_tab_status == 1){
|
||||
endBet();
|
||||
}
|
||||
}else{
|
||||
endBet();
|
||||
var _s = $("#number_tab_status").val();
|
||||
if(_s == 1) endBet();
|
||||
}
|
||||
}
|
||||
if(game_id == 6){
|
||||
@@ -869,7 +881,7 @@ $(function(){
|
||||
}
|
||||
})
|
||||
$(window).resize(function(){
|
||||
requestData(ludan);
|
||||
if(ludan) requestData(ludan);
|
||||
})
|
||||
audio.addEventListener("ended", nextAudio);
|
||||
getTime();
|
||||
@@ -923,72 +935,30 @@ function loginout(){
|
||||
});
|
||||
};
|
||||
function showPng(opening, pair){
|
||||
if(opening == 1 && pair == 0) {
|
||||
$('#openingPng').attr('src','/static/result_img/banker.png');
|
||||
mp3List = ['banker_win.mp3'];
|
||||
}
|
||||
if(opening == 1 && pair == 1) {
|
||||
$('#openingPng').attr('src','/static/result_img/banker_bpair.png');
|
||||
mp3List = ['banker_win.mp3','banker_pair.mp3'];
|
||||
}
|
||||
if(opening == 1 && pair == 2) {
|
||||
$('#openingPng').attr('src','/static/result_img/banker_ppair.png');
|
||||
mp3List = ['banker_win.mp3','player_pair.mp3'];
|
||||
}
|
||||
if(opening == 1 && pair == 3) {
|
||||
$('#openingPng').attr('src','/static/result_img/banker_bpair_ppair.png');
|
||||
mp3List = ['banker_win.mp3','banker_pair.mp3','player_pair.mp3'];
|
||||
}
|
||||
if(opening == 2 && pair == 0) {
|
||||
$('#openingPng').attr('src','/static/result_img/player.png');
|
||||
mp3List = ['player_win.mp3'];
|
||||
|
||||
}
|
||||
if(opening == 2 && pair == 1) {
|
||||
$('#openingPng').attr('src','/static/result_img/player_bpair.png');
|
||||
mp3List = ['player_win.mp3','banker_pair.mp3'];
|
||||
}
|
||||
if(opening == 2 && pair == 2) {
|
||||
$('#openingPng').attr('src','/static/result_img/player_ppair.png');
|
||||
mp3List = ['player_win.mp3','player_pair.mp3'];
|
||||
}
|
||||
if(opening == 2 && pair == 3) {
|
||||
$('#openingPng').attr('src','/static/result_img/player_bpair_ppair.png');
|
||||
mp3List = ['player_win.mp3','banker_pair.mp3','player_pair.mp3'];
|
||||
}
|
||||
if(opening == 3 && pair == 0) {
|
||||
$('#openingPng').attr('src','/static/result_img/tie.png');
|
||||
mp3List = ['tie.mp3'];
|
||||
}
|
||||
if(opening == 3 && pair == 1) {
|
||||
$('#openingPng').attr('src','/static/result_img/tie_bpair.png');
|
||||
mp3List = ['tie.mp3','banker_pair.mp3'];
|
||||
}
|
||||
if(opening == 3 && pair == 2) {
|
||||
$('#openingPng').attr('src','/static/result_img/tie_ppair.png');
|
||||
mp3List = ['tie.mp3','player_pair.mp3'];
|
||||
}
|
||||
if(opening == 3 && pair == 3) {
|
||||
$('#openingPng').attr('src','/static/result_img/tie_bpair_ppair.png');
|
||||
mp3List = ['tie.mp3','banker_pair.mp3','player_pair.mp3'];
|
||||
}
|
||||
var winText = '', winColor = '', pairHtml = '';
|
||||
var bpLabel = (lang.banker_pair || lang.banker+'对');
|
||||
var ppLabel = (lang.player_pair || lang.player+'对');
|
||||
if(opening == 1){ winText = lang.banker+'赢'; winColor = '#b20a00'; mp3List = ['banker_win.mp3']; }
|
||||
if(opening == 2){ winText = lang.player+'赢'; winColor = '#0543bc'; mp3List = ['player_win.mp3']; }
|
||||
if(opening == 3){ winText = lang.tie; winColor = '#0A5101'; mp3List = ['tie.mp3']; }
|
||||
if(pair == 1 || pair == 3) { pairHtml += '<span style="color:#b20a00">' + bpLabel + '</span> '; mp3List.push('banker_pair.mp3'); }
|
||||
if(pair == 2 || pair == 3) { pairHtml += '<span style="color:#0543bc">' + ppLabel + '</span>'; mp3List.push('player_pair.mp3'); }
|
||||
audioMp3(mp3List).Play();
|
||||
var html = '<div style="text-align:center"><div style="font-size:3vw;font-weight:bold;color:'+winColor+'">'+winText+'</div>';
|
||||
if(pairHtml) html += '<div style="font-size:2vw;margin-top:4px">'+pairHtml+'</div>';
|
||||
html += '</div>';
|
||||
$("#resultAreaTimer").hide();
|
||||
$("#resultAreaImg").html(html);
|
||||
}
|
||||
|
||||
function showPngDt (opening){
|
||||
if(opening == 1) {
|
||||
$('#openingPng').attr('src','/static/handle/img/dragon_win.png');
|
||||
mp3List = ['dragon_win.mp3'];
|
||||
}
|
||||
if(opening == 2) {
|
||||
$('#openingPng').attr('src','/static/handle/img/tiger_win.png');
|
||||
mp3List = ['tiger_win.mp3'];
|
||||
}
|
||||
if(opening == 3) {
|
||||
$('#openingPng').attr('src','/static/handle/img/tie.png');
|
||||
mp3List = ['tie.mp3'];
|
||||
}
|
||||
var winText = '', winColor = '';
|
||||
if(opening == 1){ winText = lang.dragon+'赢'; winColor = '#b20a00'; mp3List = ['dragon_win.mp3']; }
|
||||
if(opening == 2){ winText = lang.tiger+'赢'; winColor = '#0543bc'; mp3List = ['tiger_win.mp3']; }
|
||||
if(opening == 3){ winText = lang.tie; winColor = '#0A5101'; mp3List = ['tie.mp3']; }
|
||||
audioMp3(mp3List).Play();
|
||||
$("#resultAreaTimer").hide();
|
||||
$("#resultAreaImg").html('<div style="text-align:center;font-size:3vw;font-weight:bold;color:'+winColor+'">'+winText+'</div>');
|
||||
}
|
||||
|
||||
function gameResult(data){
|
||||
@@ -1018,13 +988,8 @@ function gameResult(data){
|
||||
var src='/static/result_img/'+result_imgsrc+'.png'
|
||||
$(".begincard .player-card .draw .text ").html(lang.player_all+' '+data.round.player+' '+lang.point)
|
||||
$(".begincard .banker-card .draw .text ").html(lang.banker_all+' '+data.round.banker+' '+lang.point);
|
||||
$('#openingElement').show();
|
||||
$('#openingElement').addClass("blink");
|
||||
isopentime=true;
|
||||
setTimeout(function(){
|
||||
|
||||
$('#openingElement').removeClass("blink");
|
||||
$('#openingElement').hide();
|
||||
},3000)
|
||||
// 清除状态
|
||||
card_info=[];///清除牌数据
|
||||
@@ -1112,9 +1077,8 @@ function getLang(){
|
||||
}
|
||||
//倒计时
|
||||
function countDown(time) {
|
||||
$(".countdown .num").html(time)
|
||||
$(".countdown").css({"opacity":1,"display":"block"});
|
||||
$(".countdown .grab-count").addClass("count-active");
|
||||
$("#resultAreaTimer").html(time).show();
|
||||
$("#resultAreaImg").empty();
|
||||
if(time == 10){
|
||||
mp3List = ['time_tip_10.mp3'];
|
||||
audioMp3(mp3List).Play();
|
||||
@@ -1126,8 +1090,7 @@ function countDown(time) {
|
||||
if(time<=0){
|
||||
mp3List = ['stop_2.mp3'];
|
||||
audioMp3(mp3List).Play();
|
||||
$(".countdown").css({"opacity":0,"display":"none"});
|
||||
$(".countdown .grab-count").removeClass("count-active");
|
||||
$("#resultAreaTimer").hide();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1567,19 +1530,13 @@ function nextAudio(){
|
||||
}
|
||||
function countDownRob(time) {
|
||||
var table_id = $('#table_id').val();
|
||||
$(".countdown .num").html(time);
|
||||
$(".countdown").css({"opacity":1,"display":"block"});
|
||||
$(".countdown .grab-count").addClass("count-active");
|
||||
//$(".countdown").fadeIn();
|
||||
$("#resultAreaTimer").html(time).show();
|
||||
if(time < 5 && time > 0){
|
||||
mp3List = ['time.mp3'];
|
||||
audioMp3(mp3List).Play();
|
||||
}
|
||||
if(time<=0){
|
||||
// mp3List = ['end_rob.mp3'];
|
||||
// audioMp3(mp3List).Play();
|
||||
$(".countdown").css({"opacity":0,"display":"none"});
|
||||
$(".countdown .grab-count").removeClass("count-active");
|
||||
$("#resultAreaTimer").hide();
|
||||
webSocket.send('{"connect":"space","mode":"endRob","number_tab_id":"'+parseInt(number_tab_id)+'","table_id":"'+parseInt(table_id)+'"}');
|
||||
return;
|
||||
}
|
||||
@@ -1653,6 +1610,9 @@ function waybillFunc(){
|
||||
data:data,
|
||||
success:function(data){
|
||||
ludan = data;
|
||||
if(data && data.waybill && data.waybill.showRoad){
|
||||
console.log('[waybill debug] showRoad sample:', JSON.stringify(data.waybill.showRoad.slice(0,3)));
|
||||
}
|
||||
requestData(ludan);
|
||||
}
|
||||
});
|
||||
@@ -1937,7 +1897,7 @@ function cutRoad(roadType,ctb,unit,roadData,cols,ask,askroad){
|
||||
}
|
||||
$.each(new_roadData,function(i,v){
|
||||
if(roadType=="showWay"){
|
||||
SoloPath(ctb,unit,v.show_x-cut,v.show_y,v.result,v.pair)
|
||||
SoloPath(ctb,unit,v.show_x-cut,v.show_y,v.result,v.pair,v.luck_six||0,v.dragon_seven||0,v.panda_eight||0)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -2002,12 +1962,29 @@ function Font_tie(ctb,num,Font_x,Font_y,fontsize){
|
||||
ctb.stroke();
|
||||
}
|
||||
}
|
||||
function SoloPath(ctb,unit,x,y,type,corners){
|
||||
function SoloPath(ctb,unit,x,y,type,corners,luck_six,dragon_seven,panda_eight){
|
||||
ctb.beginPath();
|
||||
ctb.lineWidth = 0.5;
|
||||
ctb.strokeStyle = "#000";
|
||||
var radius=unit/2||0;
|
||||
if (game_id == 6){
|
||||
var cx = radius+unit*(x-1);
|
||||
var cy = radius+unit*(y-1);
|
||||
if(game_id==1 && luck_six > 0){
|
||||
var color='#8b1a1a';
|
||||
var fonts="6";
|
||||
ctb.strokeStyle = "#a03030";
|
||||
ctb.lineWidth = 2;
|
||||
} else if(game_id==1 && dragon_seven > 0){
|
||||
var color='#b8860b';
|
||||
var fonts="7";
|
||||
ctb.strokeStyle = "#ff2202";
|
||||
ctb.lineWidth = 4;
|
||||
} else if(game_id==1 && panda_eight > 0){
|
||||
var color='#34495e';
|
||||
var fonts="8";
|
||||
ctb.strokeStyle = "#506878";
|
||||
ctb.lineWidth = 2;
|
||||
} else if (game_id == 6){
|
||||
if(type==0){
|
||||
var color='#5A5A5A';
|
||||
var fonts="0";
|
||||
|
||||
Reference in New Issue
Block a user