fix: 荷官端卡住根因修复 — endBet防抖+状态同步+WaybillRemind越界
1. end_bet_error翻译从'停止成功'改为'已停止下注'(误导荷官以为操作成功) 2. endBet()加2秒防抖,防止连按Enter导致重复请求 3. Numpad 0加状态守卫,只在bet_status=1时才调endBet 4. endBet失败时前端自动同步服务端bet_status,不再弹错误框 5. 后端end_bet_error响应附带当前bet_status供前端同步 6. WaybillRemindService路子珠pattern检测加try-catch,消除每日59次offset -1错误
This commit is contained in:
@@ -182,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(){
|
||||
@@ -589,7 +593,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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -775,11 +783,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){
|
||||
|
||||
Reference in New Issue
Block a user