init: 从宝塔同步到 Gitea

This commit is contained in:
root
2026-02-25 01:50:31 +08:00
commit e633c8e27d
2444 changed files with 399341 additions and 0 deletions
+915
View File
@@ -0,0 +1,915 @@
html{
min-width: 100vw;
min-height: 100vh;
background: #fff;
min-width: 1024px;
}
.noselect{
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.niuniu .head{
width: 100%;
height: 92px;
background:url(../img/hd_bg.png) repeat-x;
-webkit-background-size: auto 100%;
background-size: auto 100%;
position: relative;
}
.niuniu .head .left_bg{
width: 220px;
height: 92px;
position: absolute;
left: 0;
top: 0;
background: url(../img/hd_lbg.png) no-repeat;
-webkit-background-size:100% 100%;
background-size:100% 100%;
z-index: 9;
}
.niuniu .head .right_bg{
width: 220px;
height: 92px;
position: absolute;
right: 0;
top: 0;
background: url(../img/hd_rbg.png) no-repeat;
-webkit-background-size:100% 100%;
background-size:100% 100%;
z-index: 9;
}
.niuniu .head .right_bg .goback{
position: absolute;
width: 40px;
height: 36px;
background: url(../img/goback.png) center right no-repeat;
-webkit-background-size: 25px;
background-size: 25px;
right: 25px;
top:50%;
margin-top: -18px;
cursor: pointer;
z-index: 10;
font-size: 20px;
padding-right: 32px;
line-height: 34px;
}
.niuniu .head .left_bg .leftnav_btn{
position: absolute;
width: 40px;
height: 36px;
/*background: url(../img/goback.png) center right no-repeat;*/
-webkit-background-size: 25px;
background-size: 25px;
left: 25px;
top:50%;
margin-top: -18px;
cursor: pointer;
z-index: 10;
font-size: 20px;
padding-right: 32px;
line-height: 34px;
}
.head .info{
margin:0 220px;
height: 100%;
position: relative;
color: #feecc9;
font-size: 20px;
font-weight: 500;
}
.head .info .item{
display: inline-block;
vertical-align: middle;
padding: 0 15px;
line-height: 92px;
}
.head .info .item .c_name{
font-size: 24px;
background-image: -webkit-linear-gradient(bottom,#613c0f,#ffaf5b,#ffffff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-weight: normal;
}
.head .info .item .c_name img{
width: 67px;
padding-right: 11px;
padding-bottom: 10px
}
.head .info .tab-title{
position: absolute;
right: 0;
top: 0;
line-height: 92px;
}
.list-left-nav{
position: fixed;
width: 250px;
height: 100vh;
top: 0;
left: -100%;
background: rgba(0,0,0,0.8);
z-index: 999;
-ms-transition: all .3s ease .1s;
-moz-transition: all .3s ease .1s;
-webkit-transition: all .3s ease .1s;
-o-transition: all .3s ease .1s;
transition: all .3s ease .1s;
}
.list-left-nav .logo{
padding-top: 15vh;
width: 230px;
margin: 0 auto;
}
.list-left-nav .item{
color: #d9b660;
display: block;
font-weight: 600;
font-size: 22px;
text-align: center;
width: 164px;
line-height: 45px;
background: url(../img/list-btn-bg.png);
-webkit-background-size: 100% 100%;
background-size: 100% 100%;
margin: 0 auto;
margin-bottom: 25px;
}
.list-left-nav .item:last-child{
margin-bottom: 0;
margin-top: 10vh;
}
.list-left-nav .item:hover,.list-left-nav .item.active{
background: url(../img/list-btn-bgactive.png);
-webkit-background-size: 100% 100%;
background-size: 100% 100%;
color: #000;
}
.main{
width: 100%;
background: url(../img/tab_bg.jpg) no-repeat;
-webkit-background-size: 100% 100%;
background-size: 100% 100%;
position: relative;
}
.main .bet-tab{
position: absolute;
bottom: 80px;
width: 95%;
height: 100px;
left: 50%;
margin-left: -47.5%;
z-index: 99;
}
.main .rule{
float: right;
z-index: 99;
max-width: 19%;
color: #feecc9;
font-size: 14px;
padding-right: 5px;
padding-top: 20px;
}
.main .bet-tab .list{
width: 32.66%;
float: left;
height: 100%;
border-radius: 5px;
box-sizing:border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
border: 2px solid #a1a33b;
background: rgba(0,0,0,0.5);
display: table;
}
.main .bet-tab .list:nth-of-type(2){
margin:0 1%;
}
.main .bet-tab .list .item{
display: table-cell;
vertical-align: middle;
cursor: pointer;
position: relative;
}
.main .bet-tab .list .item:after{
content: "";
border-left: 2px solid #37835a;
height: 80px;
position: absolute;
right: -1px;
top: 50%;
margin-top: -40px;
}
.main .bet-tab .list .item:last-child:after{
display: none;
}
.main .bet-tab .list .lab{
display: table-cell;
vertical-align: middle;
color: #ddbc7e;
font-weight: bold;
width: 35px;
text-align: center;
overflow: hidden;
background: rgba(0,0,0,0.4);
font-size: 30px;
}
.main .bet-tab .list .item span{
display: block;
text-align: center;
font-size: 12px;
}
.main .bet-tab .list .item .en{
color: #ffcc00;
font-weight: 600;
font-size: 14px;
}
.main .bet-tab .list .item .font{
color: #ffcc00;
font-weight: 600;
padding: 3px 0;
font-size: 20px;
}
.main .bet-tab .list .item .font.d{
background-color: #ffcc00;
background-image: linear-gradient(180deg, #ffcc00 12%, #ffffdf 50%, #ffcc00 100%);
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
}
.main .bet-tab .list .item .font.e{
background-color: #2f78fe;
background-image: linear-gradient(180deg, #2f78fe 12%, #69d8fc 50%, #2f78fe 100%);
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
}
.main .bet-tab .list .item .percent{
color: #fff;
font-weight: 600;
}
.main .bet-tab .list .item .chipbox{
position: absolute;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top:0;
}
.main .bet-tab .list .item .chipbox i{
width: 32px;
height: 14px;
position: absolute;
left: 50%;
bottom: 26px;
margin-left: -16px;
background: url(../img/chip.png) no-repeat;
-webkit-background-size: 260px;
background-size: 260px;
z-index: 99;
}
.main .bet-tab .list .item .chipbox .money{
padding: 2px 4px;
position: absolute;
bottom: 37px;
background: rgba(0,0,0,0.85);
color: #F5FF00;
font-weight: 600;
left: 50%;
-webkit-transform: translate(-50%, 0);
transform: translate(-50%, 0);
word-break:keep-all;
white-space:nowrap;
border-radius: 3px;
border: 1px solid #4a4a4a;
z-index: 99;
}
.main .bet-tab .list .item .chipbox .money:after {
content: "";
position: absolute;
bottom: -4.5px;
left: 50%;
margin-left: -5.5px;
width: 0;
height: 0;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 7px solid rgba(0, 0, 0, 0.85);
z-index: -1;
}
.main .bet-tab .list .item .chipbox .money span{
font-size: 14px;
}
.main .bet-tab .list .item .chipbox .money strong{
font-weight: 600;
}
.main .bet-tab .list .item .chipbox span.small{
font-size: 10px;
color: red;
}
.main .bet-tab .list .item .chipbox .chip-5{
background-position: -4px -206px;
}
.main .bet-tab .list .item .chipbox .chip-10{
background-position: -131px -167px;
}
.main .bet-tab .list .item .chipbox .chip-20{
background-position: -164px -186px;
}
.main .bet-tab .list .item .chipbox .chip-50{
background-position: -35px -206px;
}
.main .bet-tab .list .item .chipbox .chip-100{
background-position: -67px -167px;
}
.main .bet-tab .list .item .chipbox .chip-200{
background-position: -131px -206px;
}
.main .bet-tab .list .item .chipbox .chip-500{
background-position: -131px -186px;
}
.main .bet-tab .list .item .chipbox .chip-1k{
background-position: -4px -167px;
}
.main .bet-tab .list .item .chipbox .chip-2k{
background-position: -67px -206px;
}
.main .bet-tab .list .item .chipbox .chip-5k{
background-position: -99px -206px;
}
.main .bet-tab .list .item .chipbox .chip-1w{
background-position: -164px -206px;
}
.main .bet-tab .list .item .chipbox .chip-2w{
background-position: -99px -167px;
}
.main .bet-tab .list .item .chipbox .chip-5w{
background-position: -35px -167px;
}
.main .bet-box{
width: 80%;
height: 70px;
position: absolute;
bottom: 5px;
left: 50%;
margin-left: -40%;
z-index: 99;
}
.main .bet-box .l-bg{
width: 50px;
height: 70px;
background: url(../img/bet_tab_lbg.png) center left no-repeat;
position: absolute;
left: 0;
top: 0;
-webkit-background-size: auto 100%;
background-size: auto 100%;
}
.main .bet-box .r-bg{
width: 50px;
height: 70px;
background: url(../img/bet_tab_rbg.png) center right no-repeat;
position: absolute;
right: 0;
top: 0;
-webkit-background-size: auto 100%;
background-size: auto 100%;
}
.main .bet-box .bd{
height: 70px;
margin:0 50px;
background: url(../img/bet_tab_bg.png) center left repeat-x;
-webkit-background-size: auto 100%;
background-size: auto 100%;
position: relative;
overflow: hidden;
}
.main .bet-box .bd .money{
background: rgba(0,0,0,0.8);
color: #fffd00;
font-weight: 600;
font-size: 15px;
padding: 3px 10px;
position: absolute;
left: 0;
top: 10px;
border-radius: 50px;
}
.main .bet-box .bd .info{
position: absolute;
left: 10px;
bottom: 5px;
color: #fff;
font-size: 15px;
font-weight: 600;
}
.main .bet-box .bd .info .item{
display: inline-block;
padding-right: 10px;
}
.main .bet-box .bd .btn-box{
position: absolute;
height: 35px;
right: 0;
top: 50%;
margin-top: -17.5px;
}
.main .bet-box .bd .btn-box .cancel{
display: inline-block;
width: 100px;
height: 35px;
background: url(../img/cancel.png) no-repeat;
-webkit-background-size: 100% 100%;
background-size: 100% 100%;
}
.main .bet-box .bd .btn-box .confirm{
display: inline-block;
width: 100px;
height: 35px;
background: url(../img/confirm.png) no-repeat;
-webkit-background-size: 100% 100%;
background-size: 100% 100%;
margin-left: 5px;
}
.main .bet-box .bd .btn-box button:active{
opacity: 0.7;
}
.main .bet-view{
margin-left: 160px;
margin-right: 220px;
}
.main .swiper-container{
margin:0 auto;
margin-top: 10px;
max-width: 840px;
overflow: hidden;
}
.main .chip-box .swiper-slide{
width: 55px;
height: 55px;
display: inline-block;
vertical-align: middle;
}
.main .chip-box .chip{
background: url(../img/chip.png) no-repeat;
-webkit-background-size: 282px auto;
background-size: 282px auto;
cursor: pointer;
transform: scale(0.9);
-ms-transform: scale(0.9);
-moz-transform: scale(0.9);
-webkit-transform: scale(0.9);
-o-transform: scale(0.9);
-webkit-transition: all 0.2s;
transition: all 0.2s;
}
.main .chip-box .swiper-slide.choice{
transform: scale(1.02);
-ms-transform: scale(1.02);
-moz-transform: scale(1.02);
-webkit-transform: scale(1.02);
-o-transform: scale(1.02);
}
.main .chip-box .jeton_5{
background-position: -2px -120px;
}
.main .chip-box .jeton_10{
background-position: -2px -4px;
}
.main .chip-box .jeton_20{
background-position: -2px -62px;
}
.main .chip-box .jeton_50{
background-position: -57px -120px;
}
.main .chip-box .jeton_100{
background-position: -57px -4px;
}
.main .chip-box .jeton_200{
background-position: -57px -62px;
}
.main .chip-box .jeton_500{
background-position: -112px -120px;
}
.main .chip-box .jeton_1k{
background-position: -112px -4px;
}
.main .chip-box .jeton_2k{
background-position: -112px -62px;
}
.main .chip-box .jeton_5k{
background-position: -167px -120px;
}
.main .chip-box .jeton_1w{
background-position: -167px -4px;
}
.main .chip-box .jeton_2w{
background-position: -167px -62px;
}
.main .poker-box{
width: 310px;
height: 270px;
position: absolute;
left: 0;
top: 50%;
margin-top: -226px;
background: rgba(0,0,0,0.6);
z-index: 999;
padding-right: 2px;
}
.main .poker-box .list{
height: 67.5px;
display: table;
width: 100%;
position: relative;
}
.main .poker-box .list.active{
background: rgba(255, 204, 0, 0.58);
}
.main .poker-box .list.win {
-webkit-animation-timing-function: ease-in-out;
-webkit-animation-name: nnbreathe;
-webkit-animation-duration: 500ms;
-webkit-animation-iteration-count: infinite;
-webkit-animation-direction: alternate;
animation-timing-function: ease-in-out;
animation-name: nnbreathe;
animation-duration: 500ms;
animation-iteration-count: infinite;
animation-direction: alternate;
}
.main .poker-box .list .lab{
line-height: 67.5px;
text-align: center;
display: table-cell;
width: 60px;
color: #fff;
font-size: 18px;
font-weight: 600;
}
.main .poker-box .banker .lab{
background-color: #ff3262;
background-image: linear-gradient(147deg, #ff3262 0%, #ffcad9 74%);
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
}
.main .poker-box .player .lab{
background-color: #2f78fe;
background-image: linear-gradient(180deg, #2f78fe 12%, #69d8fc 50%, #2f78fe 100%);
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
}
.main .poker-box .list.role0{
position: absolute;
top: -52px;
background: rgba(0,0,0,0.6);
width: 130px;
height: 50px;
}
.main .poker-box .list.role0 .lab{
line-height: 50px
}
.main .poker-box .list .rotate{
-webkit-transform: rotate(90deg);
transform: rotate(90deg);
width: 50px;
height: 50px;
margin-left:18px;
}
.main .poker-box .list .rotate .card{
width: 50px;
height: 67px;
}
.main .poker-box .list .card{
display: table-cell;
vertical-align: middle;
background:url(../img/pokerbg.png) center center no-repeat;
-webkit-background-size: 45px;
background-size: 45px;
width: 50px ;
height: 67px;
}
.main .poker-box .list .card.active {
-webkit-animation-name: flipInY;
animation-name: flipInY;
-webkit-animation-iteration-count: inherit;
animation-iteration-count: inherit;
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
.main .poker-box .list .result{
position: absolute;
bottom: 2px;
text-align: center;
font-size: 16px;
width: 245px;
left: 63px;
z-index: 9;
background: rgba(220, 10, 10, 0.8);
font-weight: 600;
color: #fff;
text-shadow:0px 0px 1px #000;
border-bottom-right-radius: 2px;
border-bottom-left-radius: 2px;
line-height: 25px;
display: none;
}
.main .poker-box .list.player .result{
background:rgba(47, 120, 254, 0.91);
}
.waybill-box{
background-color: #0a00b2;
background-image: linear-gradient(0deg, #0a00b2 0%, #ff0000 52%, #b3b10b 99%);
padding: 3px;
box-sizing: border-box;
}
.waybill-box canvas{
background: #fff;
width: 100%;
display: block;
}
/*倒计时*/
.main .countdown{
position: absolute;
width: 120px;
height: 120px;
background: url(../img/countdown_bg.png);
background-size: 100% 100%;
top: 30px;
right: 50%;
margin-right: -400px;
line-height: 120px;
text-align: center;
font-weight: 600;
font-size: 60px;
display: none;
}
.main .video-box{
margin: 0 auto;
display: block;
background: #000;
position: relative;
}
.main .video-box .video-play{
width: 100%;
height: 100%;
}
.main .video-box .video-play video{
object-fit: fill;
width: 100%;
height: 100%;
}
.main .video-box .mask{
position: absolute;
width: 100%;
height: 100%;
z-index: 9;
left: 0;
top: 0;
}
.main .video-box .mask .refresh{
position: absolute;
width: 32px;
height: 32px;
top: 20px;
left: 20px;
border: solid 4px #fff;
border-radius: 40px;
cursor: pointer;
transition: all 0.4s;
opacity: 0.5;
}
.main .video-box .mask .refresh i{
position: absolute;
width: 0;
height: 0;
border: solid 10px #fff;
border-top-color: transparent;
border-right: none;
border-bottom: none;
right: -1px;
bottom: -1px;
box-shadow: -2px 2px 2px #000;
}
.main .video-box .mask .video-link li {
float: right;
padding: 3px 5px;
margin: 3px;
background: #000;
font-size: 12px;
font-weight: 500;
color: #fff;
border-radius: 2px;
cursor: pointer;
opacity: 0.8;
transition: all 0.5s;
}
.main .video-box .mask .video-link li.active {
background: #b30d00;
}
.main .video-box .mask .refresh:hover {
opacity: 0.7;
transform:rotateZ(180deg);
}
.main .video-box .mask .refresh:active {
opacity: 0.9;
transform:rotateZ(540deg);
}
.main .bet-tab .list .item.win{
background-color: rgba(255, 235, 59, 0.6);
-webkit-animation-timing-function:ease-in-out;
-webkit-animation-name:breathe;
-webkit-animation-duration:500ms;
-webkit-animation-iteration-count:infinite;
-webkit-animation-direction:alternate;
}
/*自适应*/
@media screen and (max-width: 1480px){
.niuniu .head{
line-height: 75px;
height: 75px;
}
.niuniu .head .left_bg{
height: 75px;
}
.niuniu .head .right_bg{
height: 75px;
}
.head .info .tab-title{
line-height: 75px;
}
.head .info .item{
line-height: 75px;
font-size: 18px;
}
}
@-webkit-keyframes breathe {
0% {
opacity:.5;
-moz-box-shadow: 0px 1px 10px #030c03;
box-shadow: 0px 1px 10px #030c03;
}
100% {
opacity:1;
box-shadow:0 1px 20px rgba(59,255,255,1);
-moz-box-shadow:0 1px 20px rgba(59,255,255,1);
}
@-webkit-keyframes flipInY {
0% {
-webkit-transform: perspective(400px) rotateY(90deg);
transform: perspective(400px) rotateY(90deg);
opacity: 0;
}
0%,
40% {
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
40% {
-webkit-transform: perspective(400px) rotateY(-20deg);
transform: perspective(400px) rotateY(-20deg);
}
60% {
-webkit-transform: perspective(400px) rotateY(10deg);
transform: perspective(400px) rotateY(10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotateY(-5deg);
transform: perspective(400px) rotateY(-5deg);
}
to {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
@keyframes flipInY {
0% {
-webkit-transform: perspective(400px) rotateY(90deg);
transform: perspective(400px) rotateY(90deg);
opacity: 0;
}
0%,
40% {
-webkit-animation-timing-function: ease-in;
animation-timing-function: ease-in;
}
40% {
-webkit-transform: perspective(400px) rotateY(-20deg);
transform: perspective(400px) rotateY(-20deg);
}
60% {
-webkit-transform: perspective(400px) rotateY(10deg);
transform: perspective(400px) rotateY(10deg);
opacity: 1;
}
80% {
-webkit-transform: perspective(400px) rotateY(-5deg);
transform: perspective(400px) rotateY(-5deg);
}
to {
-webkit-transform: perspective(400px);
transform: perspective(400px);
}
}
@-webkit-keyframes nnbreathe {
0% {
background-color: rgba(0, 0, 0, 0.4);
}
100% {
background-color: #9da220;
}
}
+115
View File
@@ -0,0 +1,115 @@
/*
* @Author: Archen
* @Date: 2016-04-08 10:29:03
* @Last Modified by: Archen
* @Last Modified time: 2016-04-22 13:24:16
*/
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{margin:0;padding:0;}
/* 酌情修改 */
body {
font-family: "Lantinghei SC","Open Sans",Arial,"Hiragino Sans GB","Microsoft YaHei","微软雅黑",STHeiti,"WenQuanYi Micro Hei",SimSun,sans-serif;
-webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased;
font-smoothing: antialiased;
font-smooth: always;
}
body {
font-size: 14px;
line-height: 1.42857143;
color: #333;
}
/* 短引用的内容可取值:''或"" */
q:before,q:after {content:;}
/* 缩写,图片等无边框 */
fieldset,img,abbr,acronym {border: 0 none;}
abbr,acronym {font-variant: normal;}
legend {color:#000;}
/* 清除特殊标记的字体和字号 */
address,caption,cite,code,dfn,em,strong,th,var {
  font-weight: normal;
  font-style: normal;
}
/* 上下标 */
sup {vertical-align: text-top;}
sub {vertical-align: text-bottom;}
/* 设置表格的边框被合并为一个单一的边框, 指定分隔边框模型中单元格边界之间的距离为0*/
table{
  border-collapse: collapse;
  border-spacing:0;
}
/* 表格标题及内容居左显示 */
caption,th {text-align: left;}
input,img,select,button {vertical-align:middle; border:none; text-decoration: none; outline:none;}
/* 清除列表样式 */
ol,ul {list-style: none;}
/* 输入控件字体 */
input,button,textarea,select,optgroup,option {
font-family:inherit;
font-size:inherit;
font-style:inherit;
font-weight:inherit;
}
/* 标题元素样式清除 */
h1,h2,h3,h4,h5,h6 {font-weight: normal; font-size: 100%;
}
/* 链接样式,颜色可酌情修改 */
del,ins,a {text-decoration:none; color: #555;}
a:hover,a:active{color:#6DD1C1; text-decoration:none;}
/* 鼠标样式 */
input[type="submit"] {cursor: pointer;}
button {cursor: pointer;}
input::-moz-focus-inner { border: 0; padding: 0;}
.clearfix{zoom:1;}
.clearfix:after{content:""; display:block; visibility:hidden; height:0; clear:both;}
.fl{float:left;}
.fr{float:right;}
.box-sizing{
box-sizing:border-box;
-moz-box-sizing:border-box;
-webkit-box-sizing:border-box;
}
img {
max-width: 100%;
height: auto;
width:auto\9; /* ie8 */
-ms-interpolation-mode:bicubic;/*为了照顾ie图片缩放失真*/
}
.transition{
-webkit-transition: all 1s;
-moz-transition: all 1s;
-ms-transition: all 1s;
-o-transition: all 1s;
transition: all 1s;
}
strong,h2{font-weight: normal;}
em,i{font-style:normal;}
.table-box{
display: table;
width: 100%;
}
.table-box .cell{
display: table-cell;
}
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

+457
View File
@@ -0,0 +1,457 @@
var roleBet={};
var chipnum=0;
var banker_1_double=0,banker_1_haploid=0,player_1_double=0,player_1_haploid=0;
var banker_2_double=0,banker_2_haploid=0,player_2_double=0,player_2_haploid=0;
var banker_3_double=0,banker_3_haploid=0,player_3_double=0,player_3_haploid=0;
var roleType="",tabType="",chipType="";
$(function(){
// 选择筹码
$(".main .chip-box .swiper-slide").click(function(){
chipnum=parseInt($(this).attr("chip-data"));
$(this).addClass("choice").siblings().removeClass("choice")
})
// 选择下注区
$(".main .bet-tab .list .item").click(function(){
// 分别为123玩家 banker/player double(翻倍) haploid(平倍)
roleType=$(this).parents(".list").attr("role-data");
tabType=$(this).attr("type-data");
chipType=$(this).attr("bet-data");
console.log(roleType,tabType,chipType,chipnum)
if(chipnum!=0){
// 计算各个区块的下注
// var $nunu=$(".games .niuniu .chip-table");
var usermoney=$("#money").attr("data-money");
var role_1_pd=roleBet.amount_player_1_times||0;
var role_1_bh=roleBet.amount_player_1_banker||0;
var role_1_bd=roleBet.amount_player_1_banker_times||0;
var role_1_ph=roleBet.amount_player_1||0;
// // 玩家2
var role_2_pd=roleBet.amount_player_2_times||0;
var role_2_bh=roleBet.amount_player_2_banker||0;
var role_2_bd=roleBet.amount_player_2_banker_times||0;
var role_2_ph=roleBet.amount_player_2||0;
// // 玩家3
var role_3_pd=roleBet.amount_player_3_times||0;
var role_3_bh=roleBet.amount_player_3_banker||0;
var role_3_bd=roleBet.amount_player_3_banker_times||0;
var role_3_ph=roleBet.amount_player_3||0;
// 翻倍中下注
var doubleBet=role_1_bd+role_1_pd+role_2_bd+role_2_pd+role_3_bd+role_3_pd;
// 平倍总下注
var haploidBet=role_1_bh+role_1_ph+role_2_bh+role_2_ph+role_3_bh+role_3_ph;
// 总下注
var allensureBet=doubleBet*5+haploidBet;
if(chipType=="haploid"){
var _thischipunm=chipnum
}else if(chipType=="double"){
var _thischipunm=chipnum*5
}
// 判断是否超额
if(usermoney<allensureBet+_thischipunm){
alert_box(lang.to_bet_fail_1);
return false;
}
// 判断限红
if(limit_low>allensureBet+_thischipunm){
alert_box('最小限红为'+limit_low);
return false;
}else if(limit_high<allensureBet+_thischipunm){
alert_box('最大限红为'+limit_high);
return false;
}
if(count==false||count<5){
alert_box(lang.game_not_start);
}else{
if(roleType==1){
if(tabType=="banker"&&chipType=="double"){
var successBet=role_1_bd;
}else if(tabType=="banker"&&chipType=="haploid"){
var successBet=role_1_bh;
}else if(tabType=="player"&&chipType=="double"){
var successBet=role_1_pd;
}else if(tabType=="player"&&chipType=="haploid"){
var successBet=role_1_ph;
}
}else if(roleType==2){
if(tabType=="banker"&&chipType=="double"){
var successBet=role_2_bd;
}else if(tabType=="banker"&&chipType=="haploid"){
var successBet=role_2_bh;
}else if(tabType=="player"&&chipType=="double"){
var successBet=role_2_pd;
}else if(tabType=="player"&&chipType=="haploid"){
var successBet=role_2_ph;
}
}else if(roleType==3){
if(tabType=="banker"&&chipType=="double"){
var successBet=role_3_bd;
}else if(tabType=="banker"&&chipType=="haploid"){
var successBet=role_3_bh;
}else if(tabType=="player"&&chipType=="double"){
var successBet=role_3_pd;
}else if(tabType=="player"&&chipType=="haploid"){
var successBet=role_3_ph;
}
}
downBetAdd(roleType,tabType,chipType,successBet);
}
}
})
// 确定下注
$(".main .btn-box .confirm").click(function(){
var downBet={
"role1":{
"banker_double":banker_1_double,
"banker_haploid":banker_1_haploid,
"player_double":player_1_double,
"player_haploid":player_1_haploid
},
"role2":{
"banker_double":banker_2_double,
"banker_haploid":banker_2_haploid,
"player_double":player_2_double,
"player_haploid":player_2_haploid
},
"role3":{
"banker_double":banker_3_double,
"banker_haploid":banker_3_haploid,
"player_double":player_3_double,
"player_haploid":player_3_haploid
},
}
console.log(downBet)
if(count == false){
alert_box(lang.game_not_start);
}else if(count > 5){
toBet(downBet);
}else{
alert_box(lang.game_stop_bet);
}
banker_1_double=0,banker_1_haploid=0,player_1_double=0,player_1_haploid=0;
banker_2_double=0,banker_2_haploid=0,player_2_double=0,player_2_haploid=0;
banker_3_double=0,banker_3_haploid=0,player_3_double=0,player_3_haploid=0;
})
// 退押 下注
$(".main .btn-box .cancel").click(function(){
$(".main .bet-tab .list .item").find(".chipbox").html("");
lineLoginchip(roleBet);
banker_1_double=0,banker_1_haploid=0,player_1_double=0,player_1_haploid=0;
banker_2_double=0,banker_2_haploid=0,player_2_double=0,player_2_haploid=0;
banker_3_double=0,banker_3_haploid=0,player_3_double=0,player_3_haploid=0;
})
})
// 计算各个下注区总和
function downBetAdd(roleType,tabType,chipType,successBet){
playBetaudio();
var _thisBet=window[tabType+'_'+roleType+'_'+chipType];
var $node=$(".main .bet-tab .tab"+roleType+" ."+tabType+"."+chipType);
_thisBet+=chipnum||0;
window[tabType+'_'+roleType+'_'+chipType]=_thisBet;
showChip($node,_thisBet+successBet,chipType);
console.log(_thisBet)
}
function playBetaudio(){
// $("#betaudio")[0].src="/static/horizontal/mp3/raise.ogg"
// $("#betaudio")[0].play();
}
// 计算筹码个数
function showChip(_this,downbet,type){
var w5=parseInt(downbet/50000)
var w2=parseInt((downbet-w5*50000)/20000)
var w1=parseInt((downbet-w5*50000-w2*20000)/10000)
var w=parseInt(downbet/10000)
var k5=parseInt((downbet-w*10000)/5000)
var k2=parseInt((downbet-w*10000-k5*5000)/2000)
var k1=parseInt((downbet-w*10000-k5*5000-k2*2000)/1000)
var k=parseInt((downbet-w*10000)/1000)
var b5=parseInt((downbet-w*10000-k*1000)/500)
var b2=parseInt((downbet-w*10000-k*1000-b5*500)/200)
var b1=parseInt((downbet-w*10000-k*1000-b5*500-b2*200)/100)
var b=parseInt((downbet-w*10000-k*1000)/100)
var s5=parseInt((downbet-w*10000-k*1000-b*100)/50)
var s2=parseInt((downbet-w*10000-k*1000-b*100-s5*50)/20)
var s1=parseInt((downbet-w*10000-k*1000-b*100-s5*50-s2*20)/10)
var s=parseInt((downbet-w*10000-k*1000-b*100)/10)
var y5=parseInt((downbet-w*10000-k*1000-b*100-s*10)/5)
_this.find(".chipbox").html("");
for(var o=0;o<w5;o++){
_this.find(".chipbox").append('<i class="chip-5w" style="margin-bottom:'+o*4+'px"></i>')
}
for(var p=0;p<w2;p++){
_this.find(".chipbox").append('<i class="chip-2w" style="margin-bottom:'+(w5+p)*4+'px"></i>')
}
for(var q=0;q<w1;q++){
_this.find(".chipbox").append('<i class="chip-1w" style="margin-bottom:'+(w5+w2+q)*4+'px"></i>')
}
for(var r=0;r<k5;r++){
_this.find(".chipbox").append('<i class="chip-5k" style="margin-bottom:'+(w5+w2+w1+r)*4+'px"></i>')
}
for(var t=0;t<k2;t++){
_this.find(".chipbox").append('<i class="chip-2k" style="margin-bottom:'+(w5+w2+w1+k5+t)*4+'px"></i>')
}
for(var u=0;u<k1;u++){
_this.find(".chipbox").append('<i class="chip-1k" style="margin-bottom:'+(w5+w2+w1+k5+k2+u)*4+'px"></i>')
}
for(var v=0;v<b5;v++){
_this.find(".chipbox").append('<i class="chip-500" style="margin-bottom:'+(w5+w2+w1+k5+k2+k1+v)*4+'px"></i>')
}
for(var w=0;w<b2;w++){
_this.find(".chipbox").append('<i class="chip-200" style="margin-bottom:'+(w5+w2+w1+k5+k2+k1+b5+w)*4+'px"></i>')
}
for(var x=0;x<b1;x++){
_this.find(".chipbox").append('<i class="chip-100" style="margin-bottom:'+(w5+w2+w1+k5+k2+k1+b5+b2+x)*4+'px"></i>')
}
for(var z=0;z<s5;z++){
_this.find(".chipbox").append('<i class="chip-50" style="margin-bottom:'+(w5+w2+w1+k5+k2+k1+b5+b2+b1+z)*4+'px"></i>')
}
for(var k=0;k<s2;k++){
_this.find(".chipbox").append('<i class="chip-20" style="margin-bottom:'+(w5+w2+w1+k5+k2+k1+b5+b2+b1+s5+k)*4+'px"></i>')
}
for(var j=0;j<s1;j++){
_this.find(".chipbox").append('<i class="chip-10" style="margin-bottom:'+(w5+w2+w1+k5+k2+k1+b5+b2+b1+s5+s2+j)*4+'px"></i>')
}
for(var l=0;l<y5;l++){
_this.find(".chipbox").append('<i class="chip-5" style="margin-bottom:'+(w5+w2+w1+k5+k2+k1+b5+b2+b1+s5+s2+s1+l)*4+'px"></i>')
}
if(type=="double"){
var withhold=downbet*4
_this.find(".chipbox").append('<p class="money" style="margin-bottom:'+(w5+w2+w1+k5+k2+k1+b5+b2+b1+s5+s2+s1+l)*4+'px"><span>'+downbet+'</span><span class="small"><strong>预扣: </strong>'+withhold+'</span></p>')
}else{
var withhold=downbet
_this.find(".chipbox").append('<p class="money" style="margin-bottom:'+(w5+w2+w1+k5+k2+k1+b5+b2+b1+s5+s2+s1+l)*4+'px"><span>'+downbet+'</span></p>')
}
}
// 下注回显示
function lineLoginchip(data){
var _thisdata=data;
if(_thisdata!=""){
$.each(_thisdata,function(i,v){
if(v>0){
switch (i){
case 'amount_player_1':
var _this=$(".main .bet-tab .tab1").find(".player.haploid"), chiptype='haploid', downbet=v;
break;
case 'amount_player_1_times':
var _this=$(".main .bet-tab .tab1").find(".player.double"), chiptype='double', downbet=v;
break;
case 'amount_player_1_banker':
var _this=$(".main .bet-tab .tab1").find(".banker.haploid"), chiptype='haploid', downbet=v;
break;
case 'amount_player_1_banker_times':
var _this=$(".main .bet-tab .tab1").find(".banker.double"), chiptype='double', downbet=v;
break;
case 'amount_player_2':
var _this=$(".main .bet-tab .tab2").find(".player.haploid"), chiptype='haploid', downbet=v;
break;
case 'amount_player_2_times':
var _this=$(".main .bet-tab .tab2").find(".player.double"), chiptype='double', downbet=v;
break;
case 'amount_player_2_banker':
var _this=$(".main .bet-tab .tab2").find(".banker.haploid"), chiptype='haploid', downbet=v;
break;
case 'amount_player_2_banker_times':
var _this=$(".main .bet-tab .tab2").find(".banker.double"), chiptype='double', downbet=v;
break;
case 'amount_player_3':
var _this=$(".main .bet-tab .tab3").find(".player.haploid"), chiptype='haploid', downbet=v;
break;
case 'amount_player_3_times':
var _this=$(".main .bet-tab .tab3").find(".player.double"), chiptype='double', downbet=v;
break;
case 'amount_player_3_banker':
var _this=$(".main .bet-tab .tab3").find(".banker.haploid"), chiptype='haploid', downbet=v;
break;
case 'amount_player_3_banker_times':
var _this=$(".main .bet-tab .tab3").find(".banker.double"), chiptype='double', downbet=v;
break;
}
if(downbet!=undefined){
showChip(_this,downbet,chiptype)
}
}
})
}
}
function setBetStatus(number_tab_status){
if(number_tab_status.type == 1){
//桌子停台状态或者洗牌状态
Maskplay(number_tab_status.msg,number_tab_status.in_checkout);
}else if(number_tab_status.type == 2){
Maskplay();
$('#number_tab_status').val(number_tab_status.betStatus);
}
};
/* 桌子为停台中获知洗牌中的页面状态 */
function Maskplay(msg, state){
var state=state||0,msg=msg||'';
if(state == 1 || state == 2){
var table_state = 'table_status_' + state;
$('body').append('<div class="Maskplay"><span class="msgbox">'+lang[table_state]+'</span>'+'</div>');
}else{
$('body').find(".Maskplay").remove();
}
}
// 确认下注数据
function toBet(BetData){
var role1=BetData.role1,
role2=BetData.role2,
role3=BetData.role3;
var tab_id = number_tab_id;
var user_id = $('#userid').val();
if(role1.banker_double > 0 || role1.banker_haploid > 0 || role1.player_double > 0 || role1.player_haploid || role2.banker_double > 0 || role2.banker_haploid > 0 || role2.player_double > 0 || role2.player_haploid || role3.banker_double > 0 || role3.banker_haploid > 0 || role3.player_double > 0 || role3.player_haploid ){
webSocket.send('{"connect":"client","mode":"toBet","user_id":"'+user_id+'","number_tab_id":"'+parseInt(tab_id)+'", "amount_player_1":"'+role1.player_haploid+'", "amount_player_1_times":"'+role1.player_double+'", "amount_player_1_banker":"'+role1.banker_haploid+'", "amount_player_1_banker_times":"'+role1.banker_double+'", "amount_player_2":"'+role2.player_haploid+'", "amount_player_2_times":"'+role2.player_double+'", "amount_player_2_banker":"'+role2.banker_haploid+'", "amount_player_2_banker_times":"'+role2.banker_double+'", "amount_player_3":"'+role3.player_haploid+'", "amount_player_3_times":"'+role3.player_double+'", "amount_player_3_banker":"'+role3.banker_haploid+'", "amount_player_3_banker_times":"'+role3.banker_double+'"}');
}else{
alert_box(lang.to_bet_confirm_tip);
return false;
}
};
// 回显开牌状态
function showbackCard(data){
if(data.round.bet_status==2){
$(".niuniu .poker-box").addClass("show");
$.each(data.card_info,function(i,v){
var _thisdata={}
_thisdata.status=true
_thisdata.round=v
showCard(_thisdata)
})
}
}
// 显示牌
function showCard(data){
console.log(data)
var whichpoker=null,pokerindex=null,pokercard=null;
if(data.status==true){
var which=parseInt(data.round.order_num);
var position=parseInt(which/10);
pokerindex=which%10;
pokercard=data.round.card;
whichpoker="role"+position;
var $poker=$('.niuniu .poker-box '+'.'+ whichpoker).find(".card").eq(pokerindex-1)
var src='../static/poker/'+pokercard+'.png'
$('.niuniu .poker-box '+'.'+ whichpoker).addClass("active").siblings().removeClass("active")
$poker.css("background-image","url("+src+")");
$poker.addClass('active');
if(which==15){
$('.niuniu .poker-box '+'.'+ whichpoker).find(".result").html(data.round.result)
$('.niuniu .poker-box '+'.'+ whichpoker).find(".result").fadeIn();
}
if(which==25){
$('.niuniu .poker-box '+'.'+ whichpoker).find(".result").html(data.round.result)
$('.niuniu .poker-box '+'.'+ whichpoker).find(".result").fadeIn();
}
if(which==35){
$('.niuniu .poker-box '+'.'+ whichpoker).find(".result").html(data.round.result)
$('.niuniu .poker-box '+'.'+ whichpoker).find(".result").fadeIn();
}
if(which==45){
$('.niuniu .poker-box '+'.'+ whichpoker).find(".result").html(data.round.result)
$('.niuniu .poker-box '+'.'+ whichpoker).find(".result").fadeIn();
}
if(data.round.position==20){
$('.niuniu .poker-box '+'.'+ whichpoker).removeClass("active");
$(".main .poker-box .list .card").removeClass("active")
}
}
}
// // 定时器弹窗提示
// function alert_box(ale_dynamic,d_time){
// $(".a_lert").remove();
// $("body").append('<div class="a_lert"><div class="a_box"><p></p></div></div>');
// $(".a_lert .a_box p").append(ale_dynamic);
// var d_time = d_time || 3000;
// setTimeout(function(){
// // $(".a_lert").remove();
// },d_time);
// }
function alert_box(msg){
layer.open({
type: 1,
area: ['380px', '165px'],
closeBtn: false,
btn: lang.confirm,
title: lang.message,
content: '\<\div class="box">' + msg + '\<\/div>',
yes: function (index, layero) {
layer.close(index);
}
});
}
+440
View File
@@ -0,0 +1,440 @@
$(function(){
NNConfig();
viewFax();
$(".main .chip-box .swiper-slide").click(function(){
$(".main .chip-box .swiper-slide").removeClass("choice");
$(this).addClass("choice")
})
})
$(window).resize(function(){
NNConfig(waybill);
viewFax();
});
// 获取单张桌子数据
function getWaybill(game_id,boot_id){
var query = new Object();
query.game_id = game_id;
query.boot_id = boot_id;
$.ajax({
url:'/index/waybill',
data:query,
dataType:"json",
type:"POST",
async:false,
success:function(data){
waybill = data
}
});
return waybill;
}
function viewFax() {
var VH=$(window).height();
var headerH=$("#header").outerHeight();
var canvasH=$(".waybill-box").outerHeight();
$(".main").height(VH-headerH-canvasH-1.5)
$(".video-box").height(VH-headerH-canvasH-1.5);
$(".video-box").width((VH-headerH-canvasH-1.5)*16/9)
var main_width = $(".main").width();
var rule_w = (main_width-(VH-headerH-canvasH-1.5)*16/9)/2.1;
$(".rule").width(rule_w);
if(rule_w<210){
$(".rule").hide();
}else{
$('.rule').show();
}
}
function NNConfig(waybill_data){
console.log(waybill_data);
var dpr = window.devicePixelRatio;
var _thiscanvas=$("#waybill")
var W=$(".waybill-box").width()
var cols=24,rows=4;
var unit_x=W/cols*dpr;
var unit_y=unit_x*0.68;
_thiscanvas.height(unit_y*rows/dpr);
_thiscanvas.attr("width",W*dpr);
_thiscanvas.attr("height",unit_y*rows)
var ctb =_thiscanvas[0].getContext('2d');
if(waybill_data!=undefined){
var path=waybill_data.waybill;
var total_num = waybill_data.total_num;
}else{
var path=false;
var total_num = false;
}
NNcanvas(ctb,unit_x,unit_y,rows,cols,path,total_num)
}
// -------牛牛路单---------
function NNcanvas(ctb,unit_x,unit_y,rows,cols,roadData,total_num){
if(roadData!=""&&roadData!=undefined){
var L=roadData.length;
var new_roadData=[];
var Tab=cols-3;
if(L>=1){
var last_x=roadData[L-1].show_x
if(last_x>Tab){
var cut=last_x-Tab
$.each(roadData,function(i,v){
if(v.show_x>cut){
new_roadData.push(v)
}
})
}else{
new_roadData=roadData;
cut=0;
}
}else{
new_roadData=roadData;
cut=0;
}
$.each(roadData,function(i,v){
NNwaybill(ctb,unit_x,unit_y,v.show_x-cut,v.show_y,v.type,v.result,v.is_win)
})
}
NNtitle(ctb,unit_x,unit_y,unit_y)
NNtotal(ctb,unit_x,unit_y,cols,total_num)
NNline(ctb,unit_x,unit_y,rows,cols)
}
// 局数 数,文字X坐标,文字Y坐标,文字大小风格
function Font_tie(ctb,num,Font_x,Font_y,fontsize,color){
if(num!==undefined){
ctb.beginPath();
ctb.font=fontsize;
ctb.textAlign = 'center';
ctb.textBaseline = 'middle';
ctb.fillStyle =color||"#000";
ctb.fillText(num,Font_x,Font_y);
ctb.stroke();
}
}
function NNwaybill(ctb,unit_x,unit_y,x,y,type,result,win){
var fonts="",color="#000";
if(result == 0){
fonts = '无牛';
}else if(result == 1){
fonts = '牛1';
}else if(result == 2){
fonts = '牛2';
}else if(result == 3){
fonts = '牛3';
}else if(result == 4){
fonts = '牛4';
}else if(result == 5){
fonts = '牛5';
}else if(result == 6){
fonts = '牛6';
}else if(result == 7){
fonts = '牛7';
}else if(result == 8){
fonts = '牛8';
}else if(result == 9){
fonts = '牛9';
}else if(result == 10){
fonts = '牛牛';
}else if(result == 11){
fonts = '五公';
}
if(type==1){
color="#ce2837";
if(win==1){
ctb.fillStyle = color;
ctb.fillRect (unit_x*x,unit_y*(y-0.3),unit_x,unit_y*0.3);
Font_tie(ctb,"WIN",unit_x*(0.5+x),unit_y*(y-0.14),unit_x*0.15+"px Arial","#fff");
}
}else if(type==2){
color="#1d4999 ";
if(win==1){
ctb.fillStyle = color;
ctb.fillRect (unit_x*x,unit_y*(y-0.3),unit_x,unit_y*0.3);
Font_tie(ctb,"WIN",unit_x*(0.5+x),unit_y*(y-0.14),unit_x*0.15+"px Arial","#fff");
}
}
Font_tie(ctb,fonts,unit_x*(0.5+x),unit_y*(y-0.5),unit_x*0.28+"px Arial",color);
}
// 画表头
function NNtitle(ctb,unit_x,unit_y){
for(var i=0;i<=4;i++){
var grd=ctb.createLinearGradient(0,unit_x,0,0);
if(i==0){
var color="#fff",font="庄家";
grd.addColorStop(0,'#ae0b1a');
grd.addColorStop(0.5,'#ff0017');
grd.addColorStop(1,'#ae0b1a');
}else{
var color="#fff",font="闲"+i;
grd.addColorStop(0,'#0321a2');
grd.addColorStop(0.5,'#002ffb');
grd.addColorStop(1,'#092679');
}
ctb.fillStyle = grd;
ctb.fillRect (0,i*unit_y,unit_x,unit_y);
Font_tie(ctb,font,unit_x/2, i*unit_y+unit_y/2,unit_x*0.3+"px Arial",color);
}
}
// 画表尾
function NNtotal(ctb,unit_x,unit_y,cols,data) {
if(data){
for(var i=0;i<4;i++){
var font=0;num=0;
if(i==0){
font='总数';
num=data.num;
}else if(i==1){
font='闲1';
num=data.player_1;
}else if(i==2){
font='闲2';
num=data.player_2;
}else if(i==3){
font='闲3';
num=data.player_3;
}
ctb.fillStyle = '#ab783d';
ctb.fillRect (unit_x*(cols-2),i*unit_y,unit_x,unit_y);
Font_tie(ctb,font,unit_x*(cols-1.5), i*unit_y+unit_y/2,unit_x*0.3+"px Arial",'#fff');
Font_tie(ctb,num,unit_x*(cols-0.5), i*unit_y+unit_y/2,unit_x*0.3+"px Arial",'#000');
}
}
}
// 画线条
function NNline(ctb,unit_x,unit_y,rows,cols){
var CanvasWidht=unit_x*cols;
var CanvasHeight=unit_y*rows;
ctb.lineWidth = 1;//线条宽度
ctb.strokeStyle = "#deded9";//线条颜色
ctb.beginPath();
for (var i = 0; i <= rows; i++) {
ctb.moveTo(0, unit_y*i);
ctb.lineTo(CanvasWidht, unit_y*i);
}
for (var j = 1; j <= cols; j++) {
ctb.moveTo(unit_x*j,0);
ctb.lineTo(unit_x*j,CanvasHeight);
}
ctb.closePath()
ctb.stroke();
}
var audio=$("#audio").get(0);
var mp3List;
var mp3num=0;
function audioMp3(mp3List){
var mp3=new Object();
mp3.mp3List=mp3List;
mp3.url="../static/horizontal/mp3/";
mp3.auto_play=false;
mp3.loop=false;
mp3.Play=function(){
audio.src=this.url+this.mp3List[0];
audio.play();
}
mp3.Muted=function(){
audio.muted ? audio.muted = false : audio.muted = true;
}
mp3.volumeAdd=function(){
if(audio.volume.toFixed(1)>=1){
audio.volume=1
}else{
audio.volume = audio.volume + 0.1;
}
}
mp3.volumeMinus=function(){
if(audio.volume.toFixed(1)<=0){
audio.volume=0
}else{
audio.volume = audio.volume - 0.1;
}
}
return mp3;
}
if(audio!=undefined){
audio.addEventListener("ended", nextAudio);
}
function nextAudio(){
mp3num=1+mp3num
if(mp3num<mp3List.length){
audio.src="/static/horizontal/mp3/"+mp3List[mp3num];
audio.play();
}else{
audio.pause();
audio.currentTime = 0.0;
mp3num=0;
}
}
/* 牛牛声音提示 */
function audioNn(statusType,data){
var win_player_1='',win_player_2='',win_player_3='',previous_number_tab_id='';
if(data!=undefined){
win_player_1=data.round.opening.win_player_1,
win_player_2=data.round.opening.win_player_2,
win_player_3=data.round.opening.win_player_3,
previous_number_tab_id=data.round.previous_number_tab_id;
}
if(statusType == 'startBet'){
mp3List = ['start.mp3'];
audioMp3(mp3List).Play();
}
if(statusType == 'stopBet'){
mp3List = ['stop_2.mp3'];
audioMp3(mp3List).Play();
}
if(statusType == 'openingNnResult'){
mp3List = [];
if(win_player_1==0){
$(".niuniu .main .bet-tab .tab1 .banker").addClass("win")
}else if(win_player_1==1){
$(".niuniu .main .bet-tab .tab1 .player").addClass("win")
$(".niuniu .poker-box .role1").addClass("win")
mp3List.push('nn_X1.ogg')
}
if(win_player_2==0){
$(".niuniu .main .bet-tab .tab2 .banker").addClass("win")
}else if(win_player_2==1){
$(".niuniu .main .bet-tab .tab2 .player").addClass("win")
$(".niuniu .poker-box .role2").addClass("win")
mp3List.push('nn_X2.ogg')
}
if(win_player_3==0){
$(".niuniu .main .bet-tab .tab3 .banker").addClass("win")
}else if(win_player_3==1){
$(".niuniu .main .bet-tab .tab3 .player").addClass("win")
$(".niuniu .poker-box .role3").addClass("win")
mp3List.push('nn_X3.ogg')
}
if(win_player_1==0&&win_player_2==0&&win_player_3==0){
mp3List = ['nn_Zwin.ogg'];
$(".niuniu .poker-box .role4").addClass("win")
}
console.log(mp3List)
audioMp3(mp3List).Play();
var thisResult=setTimeout(function(){
$(".niuniu .main .bet-tab .list .item").removeClass("win")
$(".main .bet-tab .list .item").find(".chipbox").html("");
$(".niuniu .poker-box .list").removeClass("win")
$(".niuniu .poker-box .list .result").fadeOut();
$(".main .poker-box .list .card").css("background-image","url(../static/onlinechip/nn/img/pokerbg.png)")
clearTimeout(thisResult);
},5200);
// setTimeout(function(){
// },5300);
}
}
/* 获取会员输赢 */
function openWin (previous_number_tab_id){
var user_id = parseInt($('#userid').val());
if(user_id > 0 && previous_number_tab_id > 0){
var query = new Object;
query.user_id = user_id;
query.number_tab_id = previous_number_tab_id;
query.table_id = TableId;
$.ajax({
url:"/nn/user_bet_result",
type:"POST",
dataType:"JSON",
data:query,
async:false,
success:function(data){
if(data.bet_result.win_total<0){
var text_total='<span style="color: #1DA275;">'+lang.lose+' '+data.bet_result.win_total+'</span>'
}else{
var text_total='<span style="color: #F00;">'+lang.win+' +'+data.bet_result.win_total+'</span>'
}
if(data.code == 1){
var str = '<div class="box table_box"><table>';
str +='<tr style="background:#333;"><td>本局输赢</td><td>--</td><td>'+text_total+'</td></tr>'
str += '<tr style="background:#333;"><td>可用余额</td><td>--</td><td style="color:#ffcc00">'+data.bet_result.end_money+'</td></tr></table></div>';
layer.open({
type: 1,
title:'本局结算',
area: ['480px', 'auto'],
btn: [lang.confirm],
yes: function(){
layer.closeAll();
},
content: str
});
}
roleBet="";
banker_1_double=0,banker_1_haploid=0,player_1_double=0,player_1_haploid=0;
banker_2_double=0,banker_2_haploid=0,player_2_double=0,player_2_haploid=0;
banker_3_double=0,banker_3_haploid=0,player_3_double=0,player_3_haploid=0;
playerbet=0,tigerbet=0,bankerbet=0,dragonbet=0,tiebet=0,ppairbet=0,bpairbet=0;
}
});
}
}