backup: 线上最终版本全量备份
包含所有线上运行的改动: - 荷官端倒计时卡顿修复(CountdownService TTL+10/前端watchdog) - 停止下注debounce防重复(8个handle.js) - 洗码量规则重写(单边/双边/开和不计/百家乐+龙虎) - 龙虎和局不杀庄闲(全额退回) - 日志系统(Logger工具类/日志查看/清理脚本) - 好路提醒异常处理(WaybillRemindService try-catch) - 扫牌器连接改进(ScanConnectService) - 牛牛/三卡开牌修复 - .gitignore更新/.DS_Store清理
This commit is contained in:
Regular → Executable
+1
-1
@@ -1 +1 @@
|
||||
open_basedir=/www/wwwroot/tnt-game-socket/:/tmp/
|
||||
open_basedir=/www/wwwroot/Socket/:/tmp/
|
||||
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
//花式
|
||||
$pattern = intval(substr(113,0,1));
|
||||
//点数
|
||||
$number = intval(substr(413,1,2));
|
||||
var_dump($pattern);
|
||||
var_dump($number);
|
||||
@@ -419,11 +419,11 @@ margin-left: 0;
|
||||
}
|
||||
.table-data .title li strong{
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
font-size: 13px;
|
||||
text-shadow: 0px 1px 0px #fff;
|
||||
}
|
||||
.table-data .title li small{
|
||||
font-size: 12px;
|
||||
font-size: 10px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@@ -434,9 +434,10 @@ margin-left: 0;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
border-radius: 2px;
|
||||
margin-top: 0.8vh;
|
||||
line-height: 3vh;
|
||||
margin-top: 0.3vh;
|
||||
line-height: 2.2vh;
|
||||
font-weight: 500;
|
||||
font-size: 13px;
|
||||
-webkit-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3) inset;
|
||||
-moz-box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3) inset;
|
||||
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.3) inset;
|
||||
@@ -452,10 +453,50 @@ margin-left: 0;
|
||||
|
||||
|
||||
|
||||
.countdown{ display: none !important; }
|
||||
.countdown .num{ display: none !important; }
|
||||
.result-box{ display: none !important; }
|
||||
|
||||
.bottom-row{
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 4px;
|
||||
}
|
||||
.table-data .limit-box{
|
||||
width: 95%;
|
||||
flex: 1;
|
||||
padding: 0 2.5%;
|
||||
}
|
||||
.result-area{
|
||||
width: 40%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 12vh;
|
||||
background: rgba(0,0,0,0.15);
|
||||
border-radius: 6px;
|
||||
padding: 4px;
|
||||
}
|
||||
.result-area-timer{
|
||||
font-size: 4vw;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
background: rgba(0,0,0,0.6);
|
||||
border-radius: 50%;
|
||||
width: 7vw;
|
||||
height: 7vw;
|
||||
line-height: 7vw;
|
||||
margin-bottom: 6px;
|
||||
display: none;
|
||||
}
|
||||
.result-area-img{
|
||||
text-align: center;
|
||||
}
|
||||
.result-area-img img{
|
||||
max-width: 100%;
|
||||
max-height: 14vh;
|
||||
}
|
||||
|
||||
|
||||
.table-data .lan-box{
|
||||
@@ -471,12 +512,12 @@ margin-left: 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
.limit-box .list{
|
||||
padding: 0.6vh 0;
|
||||
padding: 1vh 0;
|
||||
padding-left: 50px;
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
font-size: 16px;
|
||||
color: #3c180a;
|
||||
line-height: 3vh;
|
||||
line-height: 3.5vh;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
@@ -674,16 +715,17 @@ margin-left: 0;
|
||||
|
||||
.countdown{ z-index: 999;
|
||||
|
||||
position:absolute;
|
||||
display: none;
|
||||
top: 28%;
|
||||
left: 37%;
|
||||
position:fixed;
|
||||
display: none !important;
|
||||
bottom: 22vh;
|
||||
right: 1vw;
|
||||
left: auto;
|
||||
}
|
||||
.countdown .grab-count{
|
||||
background: url(../img/count.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
width: 27vw;
|
||||
height: 27vw;
|
||||
width: 6vw;
|
||||
height: 6vw;
|
||||
}
|
||||
.round-txt-item { position: absolute;width: 100%; top:0; }
|
||||
.top-sec .count-active{animation: myMove1 6s 0s linear infinite;}
|
||||
@@ -711,13 +753,13 @@ margin-left: 0;
|
||||
|
||||
|
||||
.countdown .num{
|
||||
font-size: 13vw;
|
||||
font-size: 3vw;
|
||||
position: absolute;
|
||||
font-weight: 500;
|
||||
z-index: 999;
|
||||
text-align: center;
|
||||
text-shadow: 0px 1px 0px #555;
|
||||
line-height: 27vw;
|
||||
line-height: 6vw;
|
||||
color: #eee;
|
||||
border-radius: 50%;
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
@@ -782,16 +824,9 @@ margin-left: 0;
|
||||
}
|
||||
|
||||
|
||||
/*结果弹窗*/
|
||||
/*结果弹窗 - 隐藏原始大 overlay,结果在右侧面板 .result-area 显示*/
|
||||
.result-box{
|
||||
position: fixed;
|
||||
z-index: 1000;
|
||||
top: 40%;
|
||||
left: 40%;
|
||||
width: 320px;
|
||||
|
||||
/* -webkit-animation: bounceIn .5s 0s ease both;
|
||||
-moz-animation: bounceIn .5s 0s ease both;*/
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.result-box.blink{
|
||||
|
||||
@@ -288,8 +288,6 @@ body{
|
||||
|
||||
.canvas-box canvas{
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -585,13 +583,12 @@ body{
|
||||
|
||||
.countdown{
|
||||
display: none;
|
||||
position: absolute;
|
||||
position: fixed;
|
||||
z-index: 999;
|
||||
width: 210px;
|
||||
height: 210px;
|
||||
/*background: rgba(21, 34, 34, 0.71);*/
|
||||
bottom: 5px;
|
||||
right: 5px;
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
bottom: 22vh;
|
||||
right: 1vw;
|
||||
}
|
||||
.countdown .roll{
|
||||
position: absolute;
|
||||
@@ -611,12 +608,12 @@ body{
|
||||
|
||||
.countdown .num{
|
||||
color: #fff;
|
||||
font-size: 60px;
|
||||
font-size: 28px;
|
||||
position: relative;
|
||||
font-weight: 500;
|
||||
z-index: 999;
|
||||
text-align: center;
|
||||
line-height: 210px;
|
||||
line-height: 80px;
|
||||
text-shadow: 0px 1px 0px #555;
|
||||
}
|
||||
|
||||
@@ -1051,28 +1048,57 @@ body{
|
||||
}
|
||||
|
||||
.countdown{
|
||||
/*background: url(../new_img/countdown.png) no-repeat center center;*/
|
||||
height: 100vh;
|
||||
width: 60%;
|
||||
overflow: hidden;
|
||||
-webkit-background-size: 100%;
|
||||
background-size: 100%;
|
||||
position:absolute;
|
||||
float: left;
|
||||
display: block;
|
||||
opacity: 0;
|
||||
margin-left: 1vw;
|
||||
top:50%;
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.countdown .num{
|
||||
line-height: 60vh;
|
||||
font-size: 60vh;
|
||||
color: #000000;
|
||||
opacity: 0.4;
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.result-box{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.bottom-row{
|
||||
display: flex;
|
||||
width: 100%;
|
||||
gap: 4px;
|
||||
}
|
||||
.table-data .limit-box{
|
||||
flex: 1;
|
||||
padding: 0 2.5%;
|
||||
}
|
||||
.result-area{
|
||||
width: 40%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 12vh;
|
||||
background: rgba(0,0,0,0.15);
|
||||
border-radius: 6px;
|
||||
padding: 4px;
|
||||
}
|
||||
.result-area-timer{
|
||||
font-size: 4vw;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
background: rgba(0,0,0,0.6);
|
||||
border-radius: 50%;
|
||||
width: 7vw;
|
||||
height: 7vw;
|
||||
line-height: 7vw;
|
||||
margin-bottom: 6px;
|
||||
display: none;
|
||||
}
|
||||
.result-area-img{
|
||||
text-align: center;
|
||||
}
|
||||
.result-area-img img{
|
||||
max-width: 100%;
|
||||
max-height: 14vh;
|
||||
}
|
||||
|
||||
.section .head .box .list .date span{
|
||||
margin-right: 10px;
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
(function() {
|
||||
var reportUrl = '/log/report';
|
||||
var queue = [];
|
||||
var sending = false;
|
||||
var ignorePatterns = [
|
||||
'play() request was interrupted',
|
||||
'The play() request was interrupted',
|
||||
'NotAllowedError',
|
||||
'AbortError'
|
||||
];
|
||||
|
||||
function shouldIgnore(msg) {
|
||||
if (!msg) return false;
|
||||
for (var i = 0; i < ignorePatterns.length; i++) {
|
||||
if (msg.indexOf(ignorePatterns[i]) !== -1) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function send(data) {
|
||||
if (queue.length >= 10) return;
|
||||
if (shouldIgnore(data.message)) return;
|
||||
data.source = 'handle';
|
||||
data.time = new Date().toISOString();
|
||||
data.url = location.href;
|
||||
queue.push(data);
|
||||
flush();
|
||||
}
|
||||
|
||||
function flush() {
|
||||
if (sending || queue.length === 0) return;
|
||||
sending = true;
|
||||
var item = queue.shift();
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', reportUrl);
|
||||
xhr.setRequestHeader('Content-Type', 'application/json');
|
||||
xhr.onloadend = function() { sending = false; flush(); };
|
||||
xhr.onerror = function() { sending = false; };
|
||||
xhr.timeout = 3000;
|
||||
xhr.send(JSON.stringify(item));
|
||||
}
|
||||
|
||||
window.onerror = function(message, source, lineno, colno, error) {
|
||||
send({
|
||||
type: 'error',
|
||||
message: String(message),
|
||||
stack: error && error.stack ? error.stack.substring(0, 2000) : '',
|
||||
file: source,
|
||||
line: lineno,
|
||||
col: colno
|
||||
});
|
||||
};
|
||||
|
||||
window.addEventListener('unhandledrejection', function(event) {
|
||||
var reason = event.reason;
|
||||
send({
|
||||
type: 'unhandledrejection',
|
||||
message: reason && reason.message ? reason.message : String(reason),
|
||||
stack: reason && reason.stack ? reason.stack.substring(0, 2000) : ''
|
||||
});
|
||||
});
|
||||
})();
|
||||
@@ -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";
|
||||
|
||||
+167
-199
@@ -34,7 +34,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(){
|
||||
@@ -46,7 +50,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;
|
||||
@@ -79,14 +83,21 @@ 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){
|
||||
var opening = $('#opening').val();
|
||||
var banker_pair = $('#result_banker_pair').val();
|
||||
var player_pair = $('#result_player_pair').val();
|
||||
var luck_six = parseInt($('#lucky_six').val()) || 0;
|
||||
var dragon_seven = parseInt($('#dragon_seven').val()) || 0;
|
||||
var panda_eight = parseInt($('#panda_eight').val()) || 0;
|
||||
if(opening > 0){
|
||||
websocket.emit('openingBaccarat',{table_id : table_id, number_tab_id : number_tab_id,opening : opening,banker_pair : banker_pair,player_pair:player_pair,luck_six:0});
|
||||
websocket.emit('openingBaccarat',{table_id : table_id, number_tab_id : number_tab_id,opening : opening,banker_pair : banker_pair,player_pair:player_pair,luck_six:luck_six,dragon_seven:dragon_seven,panda_eight:panda_eight});
|
||||
}
|
||||
}else if(game_id == 2){
|
||||
var opening = $('#opening').val();
|
||||
@@ -108,7 +119,10 @@ var retreated = function(){
|
||||
if(game_id == 1){
|
||||
var opening = result_arr[0];
|
||||
var pair = result_arr[1];
|
||||
websocket.emit('resetBaccarat',{table_id : table_id, number_tab_id : number_tab_id,opening : opening,pair : pair,luck_six:0});
|
||||
var luck_six = parseInt(result_arr[2]) || 0;
|
||||
var dragon_seven = parseInt(result_arr[3]) || 0;
|
||||
var panda_eight = parseInt(result_arr[4]) || 0;
|
||||
websocket.emit('resetBaccarat',{table_id : table_id, number_tab_id : number_tab_id,opening : opening,pair : pair,luck_six:luck_six,dragon_seven:dragon_seven,panda_eight:panda_eight});
|
||||
|
||||
}else if(game_id == 2){
|
||||
var opening = result_arr[0];
|
||||
@@ -199,8 +213,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();
|
||||
|
||||
@@ -246,9 +259,21 @@ websocket.on('resetBoot',function(data){
|
||||
layer.msg(lang[data.msg]);
|
||||
}
|
||||
});
|
||||
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){
|
||||
@@ -257,15 +282,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('');
|
||||
@@ -275,15 +295,13 @@ 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){
|
||||
@@ -296,8 +314,7 @@ websocket.on('endBet',function(data){
|
||||
$('#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);
|
||||
|
||||
// 识别相关
|
||||
@@ -315,7 +332,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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -384,7 +405,7 @@ $(function(){
|
||||
if(!cookieValue){
|
||||
$.cookie("enter_time", 1, { expires: 1/86400*3 });
|
||||
}else{
|
||||
layer.msg('Please hold on');
|
||||
layer.msg('请稍等');
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -407,6 +428,8 @@ $(function(){
|
||||
}else{
|
||||
layer.msg("请稍等!");
|
||||
}
|
||||
}else if (numberTabStatus == 1) {
|
||||
endBet();
|
||||
}else if (numberTabStatus == 2) {
|
||||
opening();
|
||||
}
|
||||
@@ -420,11 +443,6 @@ $(function(){
|
||||
if(e.keyCode == 109){
|
||||
$('#update_ludan').toggle();
|
||||
}
|
||||
//换靴
|
||||
if(e.keyCode == 107){
|
||||
changeBoot();
|
||||
$('#keycode').val('');
|
||||
}
|
||||
//退出登录
|
||||
if(e.keyCode == 106){
|
||||
if(table_type == 1){
|
||||
@@ -452,14 +470,19 @@ $(function(){
|
||||
}
|
||||
// 停止倒计时
|
||||
if(e.keyCode == 96){
|
||||
endBet();
|
||||
var _s = $("#number_tab_status").val();
|
||||
if(_s == 1) endBet();
|
||||
}
|
||||
var betStatus = $("#number_tab_status").val();
|
||||
if(betStatus == 2){
|
||||
if(e.keyCode == 105){
|
||||
// Numpad 1(97)=庄 Numpad 2(98)=闲 Numpad 3(99)=和
|
||||
if(e.keyCode == 97){
|
||||
$('#opening').val('1');
|
||||
$('#result_banker_pair').val('0');
|
||||
$('#result_player_pair').val('0');
|
||||
$('#lucky_six').val('0');
|
||||
$('#dragon_seven').val('0');
|
||||
$('#panda_eight').val('0');
|
||||
$('#dt_pair').val('0');
|
||||
$('#openingElement').show();
|
||||
if(game_id == 1){
|
||||
@@ -468,10 +491,13 @@ $(function(){
|
||||
showPngDt(1,0);
|
||||
}
|
||||
}
|
||||
if(e.keyCode == 103){
|
||||
if(e.keyCode == 98){
|
||||
$('#opening').val('2');
|
||||
$('#result_banker_pair').val('0');
|
||||
$('#result_player_pair').val('0');
|
||||
$('#lucky_six').val('0');
|
||||
$('#dragon_seven').val('0');
|
||||
$('#panda_eight').val('0');
|
||||
$('#dt_pair').val('0');
|
||||
$('#openingElement').show();
|
||||
if(game_id == 1){
|
||||
@@ -480,67 +506,98 @@ $(function(){
|
||||
showPngDt(2,0)
|
||||
}
|
||||
}
|
||||
if(e.keyCode == 104){
|
||||
if(e.keyCode == 99){
|
||||
$('#opening').val('3');
|
||||
$('#result_banker_pair').val('0');
|
||||
$('#result_player_pair').val('0');
|
||||
$('#lucky_six').val('0');
|
||||
$('#dragon_seven').val('0');
|
||||
$('#panda_eight').val('0');
|
||||
$('#dt_pair').val('0');
|
||||
$('#openingElement').show();
|
||||
showPng(3,0,0);
|
||||
}
|
||||
if(e.keyCode == 102){
|
||||
if(game_id == 1){
|
||||
var result = $('#opening').val();
|
||||
$('#result_banker_pair').val('1');
|
||||
$('#result_player_pair').val('0');
|
||||
if(result == 1){
|
||||
showPng(1,1,0);
|
||||
}
|
||||
if(result == 2){
|
||||
showPng(2,1,0);
|
||||
}
|
||||
if(result == 3){
|
||||
showPng(3,1,0);
|
||||
}
|
||||
showPng(3,0,0);
|
||||
}else{
|
||||
showPngDt(3,0);
|
||||
}
|
||||
}
|
||||
// Numpad 6(102)=幸运6(庄赢+标记,切换:2张牌→3张牌→取消)
|
||||
if(e.keyCode == 102){
|
||||
if(game_id == 1){
|
||||
var curLs = parseInt($('#lucky_six').val()) || 0;
|
||||
if(curLs == 0){ curLs = 2; }
|
||||
else if(curLs == 2){ curLs = 3; }
|
||||
else { curLs = 0; }
|
||||
$('#opening').val(curLs > 0 ? '1' : '0');
|
||||
$('#result_banker_pair').val('0');
|
||||
$('#result_player_pair').val('0');
|
||||
$('#lucky_six').val(curLs);
|
||||
$('#dragon_seven').val('0');
|
||||
$('#panda_eight').val('0');
|
||||
$('#openingElement').show();
|
||||
if(curLs > 0) showPng(1,0,0);
|
||||
}
|
||||
}
|
||||
// Numpad 7(103)=龙7(庄赢+标记)
|
||||
if(e.keyCode == 103){
|
||||
if(game_id == 1){
|
||||
$('#opening').val('1');
|
||||
$('#result_banker_pair').val('0');
|
||||
$('#result_player_pair').val('0');
|
||||
$('#lucky_six').val('0');
|
||||
$('#dragon_seven').val('1');
|
||||
$('#panda_eight').val('0');
|
||||
$('#openingElement').show();
|
||||
showPng(1,0,0);
|
||||
}
|
||||
}
|
||||
// Numpad 8(104)=熊8(闲赢+标记)
|
||||
if(e.keyCode == 104){
|
||||
if(game_id == 1){
|
||||
$('#opening').val('2');
|
||||
$('#result_banker_pair').val('0');
|
||||
$('#result_player_pair').val('0');
|
||||
$('#lucky_six').val('0');
|
||||
$('#dragon_seven').val('0');
|
||||
$('#panda_eight').val('1');
|
||||
$('#openingElement').show();
|
||||
showPng(2,0,0);
|
||||
}
|
||||
}
|
||||
// Numpad 4(100)=庄对(可叠加)
|
||||
if(e.keyCode == 100){
|
||||
if(game_id == 1){
|
||||
var result = $('#opening').val();
|
||||
$('#result_player_pair').val('2');
|
||||
$('#result_banker_pair').val('0');
|
||||
if(result == 1){
|
||||
showPng(1,2,0);
|
||||
}
|
||||
if(result == 2){
|
||||
showPng(2,2,0);
|
||||
}
|
||||
if(result == 3){
|
||||
showPng(3,2,0);
|
||||
}
|
||||
var bp = $('#result_banker_pair').val();
|
||||
bp = (bp == '1') ? '0' : '1';
|
||||
$('#result_banker_pair').val(bp);
|
||||
var pp = $('#result_player_pair').val();
|
||||
var pair = 0;
|
||||
if(bp == '1' && pp == '2') pair = 3;
|
||||
else if(bp == '1') pair = 1;
|
||||
else if(pp == '2') pair = 2;
|
||||
if(result > 0) showPng(parseInt(result),pair,0);
|
||||
}
|
||||
}
|
||||
// Numpad 5(101)=闲对(可叠加)
|
||||
if(e.keyCode == 101){
|
||||
if(game_id == 1){
|
||||
var result = $('#opening').val();
|
||||
$('#result_banker_pair').val('1');
|
||||
$('#result_player_pair').val('2');
|
||||
if(result == 1){
|
||||
showPng(1,3,0);
|
||||
}
|
||||
if(result == 2){
|
||||
showPng(2,3,0);
|
||||
}
|
||||
if(result == 3){
|
||||
showPng(3,3,0);
|
||||
}
|
||||
var pp = $('#result_player_pair').val();
|
||||
pp = (pp == '2') ? '0' : '2';
|
||||
$('#result_player_pair').val(pp);
|
||||
var bp = $('#result_banker_pair').val();
|
||||
var pair = 0;
|
||||
if(bp == '1' && pp == '2') pair = 3;
|
||||
else if(bp == '1') pair = 1;
|
||||
else if(pp == '2') pair = 2;
|
||||
if(result > 0) showPng(parseInt(result),pair,0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
$(window).resize(function(){
|
||||
requestData(ludan);
|
||||
if(ludan) requestData(ludan);
|
||||
})
|
||||
audio.addEventListener("ended", nextAudio);
|
||||
getTime();
|
||||
@@ -594,119 +651,30 @@ function loginout(){
|
||||
});
|
||||
};
|
||||
function showPng(opening, pair,isVoice){
|
||||
if(opening == 1 && pair == 0) {
|
||||
$('#openingPng').attr('src','/static/result_img/3in1/banker.png');
|
||||
if(isVoice){
|
||||
mp3List = ['banker_win.mp3'];
|
||||
}
|
||||
|
||||
}
|
||||
if(opening == 1 && pair == 1) {
|
||||
$('#openingPng').attr('src','/static/result_img/3in1/banker_bpair.png');
|
||||
if(isVoice){
|
||||
mp3List = ['banker_win.mp3','banker_pair.mp3'];
|
||||
}
|
||||
|
||||
}
|
||||
if(opening == 1 && pair == 2) {
|
||||
$('#openingPng').attr('src','/static/result_img/3in1/banker_ppair.png');
|
||||
if(isVoice){
|
||||
mp3List = ['banker_win.mp3','player_pair.mp3'];
|
||||
}
|
||||
|
||||
}
|
||||
if(opening == 1 && pair == 3) {
|
||||
$('#openingPng').attr('src','/static/result_img/3in1/banker_bpair_ppair.png');
|
||||
if(isVoice){
|
||||
mp3List = ['banker_win.mp3','banker_pair.mp3','player_pair.mp3'];
|
||||
}
|
||||
|
||||
}
|
||||
if(opening == 2 && pair == 0) {
|
||||
$('#openingPng').attr('src','/static/result_img/3in1/player.png');
|
||||
if(isVoice){
|
||||
mp3List = ['player_win.mp3'];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if(opening == 2 && pair == 1) {
|
||||
$('#openingPng').attr('src','/static/result_img/3in1/player_bpair.png');
|
||||
if(isVoice){
|
||||
mp3List = ['player_win.mp3','banker_pair.mp3'];
|
||||
}
|
||||
|
||||
}
|
||||
if(opening == 2 && pair == 2) {
|
||||
$('#openingPng').attr('src','/static/result_img/3in1/player_ppair.png');
|
||||
if(isVoice){
|
||||
mp3List = ['player_win.mp3','player_pair.mp3'];
|
||||
}
|
||||
|
||||
}
|
||||
if(opening == 2 && pair == 3) {
|
||||
$('#openingPng').attr('src','/static/result_img/3in1/player_bpair_ppair.png');
|
||||
if(isVoice){
|
||||
mp3List = ['player_win.mp3','banker_pair.mp3','player_pair.mp3'];
|
||||
}
|
||||
|
||||
}
|
||||
if(opening == 3 && pair == 0) {
|
||||
$('#openingPng').attr('src','/static/result_img/3in1/tie.png');
|
||||
if(isVoice){
|
||||
mp3List = ['tie.mp3'];
|
||||
}
|
||||
|
||||
}
|
||||
if(opening == 3 && pair == 1) {
|
||||
$('#openingPng').attr('src','/static/result_img/3in1/tie_bpair.png');
|
||||
if(isVoice){
|
||||
mp3List = ['tie.mp3','banker_pair.mp3'];
|
||||
}
|
||||
|
||||
}
|
||||
if(opening == 3 && pair == 2) {
|
||||
$('#openingPng').attr('src','/static/result_img/3in1/tie_ppair.png');
|
||||
if(isVoice){
|
||||
mp3List = ['tie.mp3','player_pair.mp3'];
|
||||
}
|
||||
|
||||
}
|
||||
if(opening == 3 && pair == 3) {
|
||||
$('#openingPng').attr('src','/static/result_img/3in1/tie_bpair_ppair.png');
|
||||
if(isVoice){
|
||||
mp3List = ['tie.mp3','banker_pair.mp3','player_pair.mp3'];
|
||||
}
|
||||
|
||||
}
|
||||
if(isVoice){
|
||||
audioMp3(mp3List).Play();
|
||||
}
|
||||
|
||||
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> '; if(isVoice) mp3List.push('banker_pair.mp3'); }
|
||||
if(pair == 2 || pair == 3) { pairHtml += '<span style="color:#0543bc">' + ppLabel + '</span>'; if(isVoice) mp3List.push('player_pair.mp3'); }
|
||||
if(isVoice){ 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,isVoice){
|
||||
if(opening == 1) {
|
||||
$('#openingPng').attr('src','/static/result_img/3in1/drogon.png');
|
||||
if(isVoice){
|
||||
mp3List = ['dragon_win.mp3'];
|
||||
}
|
||||
}
|
||||
if(opening == 2) {
|
||||
$('#openingPng').attr('src','/static/result_img/3in1/tiger.png');
|
||||
if(isVoice){
|
||||
mp3List = ['tiger_win.mp3'];
|
||||
}
|
||||
}
|
||||
if(opening == 3) {
|
||||
$('#openingPng').attr('src','/static/handle/result_img/3in1/tie.png');
|
||||
if(isVoice){
|
||||
mp3List = ['tie.mp3'];
|
||||
}
|
||||
}
|
||||
if(isVoice){
|
||||
audioMp3(mp3List).Play();
|
||||
}
|
||||
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']; }
|
||||
if(isVoice){ 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){
|
||||
@@ -764,9 +732,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();
|
||||
@@ -778,8 +745,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;
|
||||
}
|
||||
}
|
||||
@@ -1170,19 +1136,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;
|
||||
}
|
||||
@@ -1400,7 +1360,7 @@ function cutRoad(roadType,ctb,unit,roadData,cols,ask,askroad){
|
||||
}else if(roadType=="bigeyeWay"){
|
||||
BigeyePath(ctb,unit,v.show_x-cut,v.show_y,v.result)
|
||||
}else if(roadType=="showWay"){
|
||||
SoloPath(ctb,unit,v.show_x-cut,v.show_y,v.result,v.pair,v.lucky_six)
|
||||
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)
|
||||
}else if(roadType=="bigWay"){
|
||||
BigPath(ctb,unit,v.show_x-cut,v.show_y,v.result,v.tie_num,v.pair)
|
||||
}else if(roadType=="sanxingWay"){
|
||||
@@ -1420,21 +1380,29 @@ function Font_tie(ctb,num,Font_x,Font_y,fontsize){
|
||||
ctb.stroke();
|
||||
}
|
||||
}
|
||||
function SoloPath(ctb,unit,x,y,type,corners,luckySix){
|
||||
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(type==1){
|
||||
if(game_id==1 && luck_six > 0){
|
||||
var color='#8b1a1a', fonts="6";
|
||||
ctb.strokeStyle = "#a03030";
|
||||
ctb.lineWidth = 2;
|
||||
}else if(game_id==1 && dragon_seven > 0){
|
||||
var color='#b8860b', fonts="7";
|
||||
ctb.strokeStyle = "#ff2202";
|
||||
ctb.lineWidth = 4;
|
||||
}else if(game_id==1 && panda_eight > 0){
|
||||
var color='#34495e', fonts="8";
|
||||
ctb.strokeStyle = "#506878";
|
||||
ctb.lineWidth = 2;
|
||||
}else if(type==1){
|
||||
var color='#b20a00';
|
||||
if(game_id == 2){
|
||||
var fonts = lang.dragon;
|
||||
}else{
|
||||
if(luckySix == 1){
|
||||
var fonts = 6;
|
||||
}else{
|
||||
var fonts = lang.banker;
|
||||
}
|
||||
var fonts = lang.banker;
|
||||
}
|
||||
ctb.strokeStyle = "#ff4a68";
|
||||
}else if(type==2){
|
||||
|
||||
@@ -137,7 +137,11 @@ var startBet = function(){
|
||||
sbSocket.emit("stop",{"tableCode":casinoTableId, "type":"SYS"});
|
||||
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(){
|
||||
@@ -160,7 +164,7 @@ var stopSB = 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;
|
||||
@@ -193,7 +197,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});
|
||||
@@ -496,9 +504,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){
|
||||
@@ -538,7 +558,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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -805,7 +829,7 @@ $(function(){
|
||||
if(!cookieValue){
|
||||
$.cookie("enter_time", 1, { expires: 1/86400*3 });
|
||||
}else{
|
||||
layer.msg('Please hold on');
|
||||
layer.msg('请稍等');
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -828,6 +852,8 @@ $(function(){
|
||||
}else{
|
||||
layer.msg("请稍等!");
|
||||
}
|
||||
}else if (numberTabStatus == 1) {
|
||||
endBet();
|
||||
}else if (numberTabStatus == 2) {
|
||||
opening();
|
||||
}
|
||||
@@ -841,11 +867,6 @@ $(function(){
|
||||
if(e.keyCode == 109){
|
||||
$('#update_ludan').toggle();
|
||||
}
|
||||
//换靴
|
||||
if(e.keyCode == 107){
|
||||
changeBoot();
|
||||
$('#keycode').val('');
|
||||
}
|
||||
//退出登录
|
||||
if(e.keyCode == 106){
|
||||
if(table_type == 1){
|
||||
@@ -872,11 +893,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){
|
||||
@@ -2031,7 +2053,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)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -2096,11 +2118,13 @@ 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;
|
||||
var cx = radius+unit*(x-1);
|
||||
var cy = radius+unit*(y-1);
|
||||
if (game_id == 6){
|
||||
if(type==0){
|
||||
var color='#5A5A5A';
|
||||
@@ -2123,6 +2147,21 @@ function SoloPath(ctb,unit,x,y,type,corners){
|
||||
var fonts="4";
|
||||
ctb.strokeStyle = "#E35C4C";
|
||||
}
|
||||
} else 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 = 3;
|
||||
} else if(game_id==1 && panda_eight > 0){
|
||||
var color='#34495e';
|
||||
var fonts="8";
|
||||
ctb.strokeStyle = "#506878";
|
||||
ctb.lineWidth = 2;
|
||||
} else {
|
||||
if(type==1){
|
||||
var color='#ff002a';
|
||||
@@ -2145,14 +2184,14 @@ function SoloPath(ctb,unit,x,y,type,corners){
|
||||
}
|
||||
}
|
||||
|
||||
ctb.arc(radius+unit*(x-1), radius+unit*(y-1), unit*0.45, 0, Math.PI * 2);
|
||||
ctb.arc(cx, cy, unit*0.45, 0, Math.PI * 2);
|
||||
ctb.fillStyle=color;
|
||||
ctb.fill();
|
||||
ctb.font=unit*0.6+"px Arial";
|
||||
ctb.fillStyle ="#fff" ; // 颜色
|
||||
ctb.fillStyle ="#fff" ;
|
||||
ctb.textAlign = 'center';
|
||||
ctb.textBaseline = 'middle';
|
||||
ctb.fillText(fonts,radius+unit*(x-1),radius+unit*(y-1));
|
||||
ctb.fillText(fonts,cx,cy);
|
||||
ctb.stroke();
|
||||
var corner_xy=unit/3.5
|
||||
if(corners==1){
|
||||
|
||||
@@ -137,7 +137,11 @@ var startBet = function(){
|
||||
sbSocket.emit("stop",{"tableCode":casinoTableId, "type":"SYS"});
|
||||
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(){
|
||||
@@ -161,7 +165,7 @@ var stopSB = 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;
|
||||
@@ -194,7 +198,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});
|
||||
@@ -512,9 +520,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){
|
||||
@@ -555,7 +575,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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -932,7 +956,7 @@ $(function(){
|
||||
if(!cookieValue){
|
||||
$.cookie("enter_time", 1, { expires: 1/86400*3 });
|
||||
}else{
|
||||
layer.msg('Please hold on');
|
||||
layer.msg('请稍等');
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -955,6 +979,8 @@ $(function(){
|
||||
}else{
|
||||
layer.msg("请稍等!");
|
||||
}
|
||||
}else if (numberTabStatus == 1) {
|
||||
endBet();
|
||||
}else if (numberTabStatus == 2) {
|
||||
opening();
|
||||
}
|
||||
@@ -968,11 +994,6 @@ $(function(){
|
||||
if(e.keyCode == 109){
|
||||
$('#update_ludan').toggle();
|
||||
}
|
||||
//换靴
|
||||
if(e.keyCode == 107){
|
||||
changeBoot();
|
||||
$('#keycode').val('');
|
||||
}
|
||||
//退出登录
|
||||
if(e.keyCode == 106){
|
||||
if(table_type == 1){
|
||||
@@ -999,11 +1020,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){
|
||||
|
||||
@@ -28,13 +28,17 @@ 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 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;
|
||||
@@ -71,7 +75,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');
|
||||
let result = $('#dice_result').val();
|
||||
websocket.emit('openingDice',{table_id : table_id, number_tab_id : number_tab_id, result : result});
|
||||
@@ -189,9 +197,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){
|
||||
@@ -211,7 +231,11 @@ websocket.on('endBet',function(data){
|
||||
setBetStatus(data.round.number_tab_status);
|
||||
}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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -241,7 +265,7 @@ $(function(){
|
||||
if(!cookieValue){
|
||||
$.cookie("enter_time", 1, { expires: 1/86400*3 });
|
||||
}else{
|
||||
layer.msg('Please hold on');
|
||||
layer.msg('请稍等');
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -264,6 +288,8 @@ $(function(){
|
||||
}else{
|
||||
layer.msg("请稍等!");
|
||||
}
|
||||
}else if (numberTabStatus == 1) {
|
||||
endBet();
|
||||
}else if (numberTabStatus == 2) {
|
||||
opening();
|
||||
}
|
||||
@@ -277,11 +303,6 @@ $(function(){
|
||||
if(e.keyCode == 109){
|
||||
$('#update_ludan').toggle();
|
||||
}
|
||||
//换靴
|
||||
if(e.keyCode == 107){
|
||||
changeBoot();
|
||||
$('#keycode').val('');
|
||||
}
|
||||
//退出登录
|
||||
if(e.keyCode == 106){
|
||||
if(table_type == 1){
|
||||
@@ -308,11 +329,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();
|
||||
}
|
||||
}
|
||||
// 骰宝结果选择
|
||||
|
||||
@@ -123,7 +123,11 @@ var startBet = function(){
|
||||
sbSocket.emit("stop",{"tableCode":casinoTableId, "type":"SYS"});
|
||||
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(){
|
||||
@@ -146,7 +150,7 @@ var stopSB = 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;
|
||||
@@ -179,7 +183,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});
|
||||
@@ -487,9 +495,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){
|
||||
@@ -527,7 +547,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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -774,7 +798,7 @@ $(function(){
|
||||
if(!cookieValue){
|
||||
$.cookie("enter_time", 1, { expires: 1/86400*3 });
|
||||
}else{
|
||||
layer.msg('Please hold on');
|
||||
layer.msg('请稍等');
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -797,6 +821,8 @@ $(function(){
|
||||
}else{
|
||||
layer.msg("请稍等!");
|
||||
}
|
||||
}else if (numberTabStatus == 1) {
|
||||
endBet();
|
||||
}else if (numberTabStatus == 2) {
|
||||
opening();
|
||||
}
|
||||
@@ -810,11 +836,6 @@ $(function(){
|
||||
if(e.keyCode == 109){
|
||||
$('#update_ludan').toggle();
|
||||
}
|
||||
//换靴
|
||||
if(e.keyCode == 107){
|
||||
changeBoot();
|
||||
$('#keycode').val('');
|
||||
}
|
||||
//退出登录
|
||||
if(e.keyCode == 106){
|
||||
if(table_type == 1){
|
||||
@@ -841,11 +862,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){
|
||||
|
||||
@@ -184,7 +184,11 @@ var startBet = function(){
|
||||
sbSocket.emit("stop",{"tableCode":casinoTableId, "type":"SYS"});
|
||||
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(){
|
||||
@@ -207,7 +211,7 @@ var stopSB = 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;
|
||||
@@ -240,7 +244,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});
|
||||
@@ -557,9 +565,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){
|
||||
@@ -602,7 +622,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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -908,7 +932,7 @@ $(function(){
|
||||
if(!cookieValue){
|
||||
$.cookie("enter_time", 1, { expires: 1/86400*3 });
|
||||
}else{
|
||||
layer.msg('Please hold on');
|
||||
layer.msg('请稍等');
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -931,6 +955,8 @@ $(function(){
|
||||
}else{
|
||||
layer.msg("请稍等!");
|
||||
}
|
||||
}else if (numberTabStatus == 1) {
|
||||
endBet();
|
||||
}else if (numberTabStatus == 2) {
|
||||
opening();
|
||||
}
|
||||
@@ -944,11 +970,6 @@ $(function(){
|
||||
if(e.keyCode == 109){
|
||||
$('#update_ludan').toggle();
|
||||
}
|
||||
//换靴
|
||||
if(e.keyCode == 107){
|
||||
changeBoot();
|
||||
$('#keycode').val('');
|
||||
}
|
||||
//退出登录
|
||||
if(e.keyCode == 106){
|
||||
if(table_type == 1){
|
||||
@@ -975,11 +996,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){
|
||||
|
||||
@@ -28,13 +28,17 @@ 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 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;
|
||||
@@ -69,7 +73,11 @@ var resetBoot = function(){
|
||||
layer.close(index);
|
||||
});
|
||||
};
|
||||
var isOpening = false;
|
||||
var opening = function(){
|
||||
if(isOpening) return;
|
||||
isOpening = true;
|
||||
setTimeout(function(){ isOpening = false; }, 3000);
|
||||
let result = $('#roulette_result').val();
|
||||
websocket.emit('openingRoulette',{table_id : table_id, number_tab_id : number_tab_id, result : result});
|
||||
};
|
||||
@@ -169,9 +177,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){
|
||||
@@ -185,7 +205,11 @@ websocket.on('endBet',function(data){
|
||||
setBetStatus(data.round.number_tab_status);
|
||||
}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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -216,7 +240,7 @@ $(function(){
|
||||
if(!cookieValue){
|
||||
$.cookie("enter_time", 1, { expires: 1/86400*3 });
|
||||
}else{
|
||||
layer.msg('Please hold on');
|
||||
layer.msg('请稍等');
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -239,6 +263,8 @@ $(function(){
|
||||
}else{
|
||||
layer.msg("请稍等!");
|
||||
}
|
||||
}else if (numberTabStatus == 1) {
|
||||
endBet();
|
||||
}else if (numberTabStatus == 2) {
|
||||
var result = $('#roulette_result').val();
|
||||
if(result.length == 0){
|
||||
@@ -256,11 +282,6 @@ $(function(){
|
||||
if(e.keyCode == 109){
|
||||
$('#update_ludan').toggle();
|
||||
}
|
||||
//换靴
|
||||
if(e.keyCode == 107){
|
||||
changeBoot();
|
||||
$('#keycode').val('');
|
||||
}
|
||||
//退出登录
|
||||
if(e.keyCode == 106){
|
||||
if(table_type == 1){
|
||||
@@ -287,11 +308,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();
|
||||
}
|
||||
}
|
||||
// 骰宝结果选择
|
||||
|
||||
Reference in New Issue
Block a user