Commit cad88f17 authored by 华国豪's avatar 华国豪 🙄
parents 2a3f7951 9dff7650
...@@ -27,9 +27,11 @@ ...@@ -27,9 +27,11 @@
</div> </div>
<div class="c_right" > <div class="c_center">
</div>
<div class="c_right" >
</div> </div>
...@@ -47,7 +49,7 @@ ...@@ -47,7 +49,7 @@
<div class="bar_input"> <div class="bar_input">
<input type="text" placeholder="发弹幕参与大屏互动"> <input type="text" placeholder="发弹幕参与大屏互动">
</div> </div>
<div class="send_btn" onclick="send()"> <div class="send_btn" onclick="sendMsg(1)">
<p>发送</p> <p>发送</p>
</div> </div>
</div> </div>
...@@ -63,6 +65,9 @@ ...@@ -63,6 +65,9 @@
<script type="text/javascript" src="../../js/layer/layer.js"></script> <script type="text/javascript" src="../../js/layer/layer.js"></script>
<script> <script>
$("input").on("blur",function(){
window.scroll(0,0);//失焦后强制让页面归位
});
var conn = $.hubConnection("http://192.168.2.66:7838/signalr", { var conn = $.hubConnection("http://192.168.2.66:7838/signalr", {
qs: `i=1951&n=张建国&p=${encodeURIComponent( qs: `i=1951&n=张建国&p=${encodeURIComponent(
"http://imgfile.oytour.com/New/Upload/User/20191018150051176.png" "http://imgfile.oytour.com/New/Upload/User/20191018150051176.png"
...@@ -74,30 +79,29 @@ ...@@ -74,30 +79,29 @@
}).fail(data => {}); }).fail(data => {});
getMsg() getMsg()
function sendMsg(msg) { function sendMsg(type) {
if(type ==1){
proxy.invoke("SendBarrage", msg).done(data => { var value = $('.bar_input input').val();
if(value.length==0){
layer.msg('不能为空哦');
return
}
proxy.invoke("SendBarrage", value).done(data => {
layer.msg('发送成功'); layer.msg('发送成功');
}); });
}
function send() {
var value = $('.bar_input input').val();
if(value.length==0){
layer.msg('不能为空哦');
return
} }
sendMsg(value)
} }
function getMsg() { function getMsg() {
//年会首页菜单 //年会首页菜单
proxy.on("getMenus", function (data){ proxy.on("getMenus", function (data){
console.log(data) console.log(data)
$(".menu_view").remove() $(".menu_view").remove()
var html=""; var html="";
$.each(data, function(i,v) {//这里的函数参数是键值对的形式,k代表键名,v代表值 $.each(data, function(i,v) {
html+='<div class="menu_view" onclick="menu_btn('+data[i].Id+')">\n' + html+='<div class="menu_view" onclick="menu_btn('+data[i].Id+')">\n' +
' <img src="../../images/aM/menu@2x.png" alt="">\n' + ' <img src="../../images/aM/menu@2x.png" alt="">\n' +
' <p>'+data[i].MName+'</p>\n' + ' <p>'+data[i].MName+'</p>\n' +
...@@ -106,9 +110,11 @@ ...@@ -106,9 +110,11 @@
$(".menu").append(html); $(".menu").append(html);
}); });
//节目单
proxy.on('getPrograms',function (data) { proxy.on('getPrograms',function (data) {
programguides(data) console.log(data)
programguides(data)
}); });
//嘉宾数量 //嘉宾数量
...@@ -128,6 +134,7 @@ ...@@ -128,6 +134,7 @@
} }
function programguides(data){ function programguides(data){
$(".right_box").remove() $(".right_box").remove()
$(".c_xian").remove()
$(".letf_box").remove() $(".letf_box").remove()
var leftList = []; var leftList = [];
var rightList = []; var rightList = [];
...@@ -138,17 +145,18 @@ ...@@ -138,17 +145,18 @@
leftList.push(data[i]) leftList.push(data[i])
} }
} }
var html_l=""; var html_l="";
var html_c="";
var html_r=""; var html_r="";
$.each(rightList, function(i,v) {//这里的函数参数是键值对的形式,k代表键名,v代表值 $.each(rightList, function(i,v) {//这里的函数参数是键值对的形式,k代表键名,v代表值
if(i==0){ if(i==0){
html_l+='<div class="right_box" style="margin-top:0rem ">\n' + html_l+='<div class="right_box" style="margin-top:0 ">\n' +
' <p class="time">'+rightList[i].StartTime+'</p>\n' + ' <p class="time">'+rightList[i].StartTime+'</p>\n' +
' <div class="c_describe">\n' + ' <div class="c_describe">\n' +
' <p>'+rightList[i].Title+'</p>\n' + ' <p>'+rightList[i].Title+'</p>\n' +
' <p>'+rightList[i].Performer+'</p>\n' + ' <p>'+rightList[i].Performer+'</p>\n' +
' </div>\n' + ' </div>\n' +
' <div class="yuan_r"></div>\n' +
' </div>' ' </div>'
}else { }else {
html_l+='<div class="right_box" style="margin-top:0.75rem ">\n' + html_l+='<div class="right_box" style="margin-top:0.75rem ">\n' +
...@@ -157,12 +165,18 @@ ...@@ -157,12 +165,18 @@
' <p>'+rightList[i].Title+'</p>\n' + ' <p>'+rightList[i].Title+'</p>\n' +
' <p>'+rightList[i].Performer+'</p>\n' + ' <p>'+rightList[i].Performer+'</p>\n' +
' </div>\n' + ' </div>\n' +
' <div class="yuan_r"></div>\n' +
' </div>' ' </div>'
} }
}); });
$(".c_right").append(html_l); $(".c_right").append(html_l);
$.each(data, function(i,v) {//这里的函数参数是键值对的形式,k代表键名,v代表值
html_c+=' <div class="c_xian">\n' +
' <div class="yuan"></div>\n' +
' <div class="yuan_x"></div>\n' +
' </div>'
});
$(".c_center").append(html_c);
$.each(leftList, function(i,v) {//这里的函数参数是键值对的形式,k代表键名,v代表值 $.each(leftList, function(i,v) {//这里的函数参数是键值对的形式,k代表键名,v代表值
html_r+='<div class="letf_box" style="margin-top: 0.75rem">\n' + html_r+='<div class="letf_box" style="margin-top: 0.75rem">\n' +
...@@ -173,7 +187,6 @@ ...@@ -173,7 +187,6 @@
' <p>'+leftList[i].Title+'</p>\n' + ' <p>'+leftList[i].Title+'</p>\n' +
' <p>'+leftList[i].Performer+'</p>\n' + ' <p>'+leftList[i].Performer+'</p>\n' +
' </div>\n' + ' </div>\n' +
' <div class="yuan_l"></div>\n' +
' </div>' ' </div>'
}); });
$(".c_left").append(html_r); $(".c_left").append(html_r);
......
...@@ -40,6 +40,8 @@ ...@@ -40,6 +40,8 @@
<div class="hole-container"> <div class="hole-container">
<div class="hole" style="transform: translate(0.5rem, 0) scale(0.8, 0.8);"> <div class="hole" style="transform: translate(0.5rem, 0) scale(0.8, 0.8);">
<div class="mouse"> <div class="mouse">
<!-- <img src="../../images/aM/dadao.png" alt="" class="yan">-->
<!-- <p class="show_score">500</p>-->
</div> </div>
</div> </div>
<div class="hole" style="transform: translate(1.5rem, 0) scale(0.8, 0.8);"> <div class="hole" style="transform: translate(1.5rem, 0) scale(0.8, 0.8);">
...@@ -85,10 +87,10 @@ ...@@ -85,10 +87,10 @@
<!-- 弹出的一层--> <!-- 弹出的一层-->
<div class="status"> <div class="status">
<p>游戏即将开始</p> <p>保存体力,等待开始</p>
</div> </div>
<div class="status1"> <div class="status1">
<p>保存体力,等待开始</p> <p>游戏即将开始</p>
</div> </div>
<div class="status2"> <div class="status2">
<p>抱歉!游戏正在进行中</p> <p>抱歉!游戏正在进行中</p>
...@@ -98,7 +100,51 @@ ...@@ -98,7 +100,51 @@
</div> </div>
<div class="circleCount">3</div> <div class="circleCount">3</div>
<audio id="audio" src="img/game_running.mp3" autoplay="autoplay">
您的浏览器不支持audio标签
</audio>
<audio id="audio2" src="img/ready321go.mp3" autoplay="autoplay">
您的浏览器不支持audio标签
</audio>
<!-- 排行榜-->
<div class="rank_mask" id="rank_mask">
<div class="zhezao"></div>
<div class="rank_box">
<div class="rBox_top">
<p>排行榜</p>
</div>
<div class="rank_y">
<p>你的排名 第</p>
<p class="o_ranking">1</p>
<p></p>
</div>
<div class="rank_i">
</div>
<div class="Close"></div>
</div>
</div>
<!-- 中奖弹窗通知-->
<div class="rank_mask" id="notice">
<div class="zhezao"></div>
<div class="notice_box">
<img src="../../images/aM/all_d.png" alt="" class="notice_top">
<span>恭喜你中奖啦!</span>
<div class="notice_content">
<span>121212</span>
</div>
<div class="all_Receive">
<span>立即领取</span>
</div>
<div class="all_Close"></div>
</div>
</div>
</div> </div>
...@@ -112,7 +158,10 @@ ...@@ -112,7 +158,10 @@
var status=0; //活动状态 var status=0; //活动状态
var laoshudata = [];//老鼠数据 var laoshudata = [];//老鼠数据
var audio=document.getElementById("audio");
var audio2=document.getElementById("audio2");
audio.play();
audio.loop=true;
var conn = $.hubConnection("http://192.168.2.66:7838/signalr", { var conn = $.hubConnection("http://192.168.2.66:7838/signalr", {
qs: `i=1755&n=大力哥&p=${encodeURIComponent( qs: `i=1755&n=大力哥&p=${encodeURIComponent(
...@@ -124,15 +173,18 @@ ...@@ -124,15 +173,18 @@
sendMsg(); sendMsg();
sendScore(); sendScore();
joinGeme() //参加活动 joinGeme() //参加活动
ownranking();//自己排名
}).fail(data => {}); }).fail(data => {});
getMsg() getMsg()
function sendMsg(msg,type) { function sendMsg(msg,type) {
//0,未开始;1,准备中;2,进行中;-1,已结束 菜单状态 //0,未开始;1,准备中;2,进行中;-1,已结束 菜单状态
proxy.invoke("GetMenuStatus", 'Mouse').done(data => { proxy.invoke("GetMenuStatus", 'Mouse').done(data => {
console.log(data) console.log(data)
getRankList(data.rank) //以往的排名
if(data.status==0){ if(data.status==0){
$('.status').css({'display':'flex'}); $('.status').css({'display':'flex'});
$('.status1').css({'display':'none'}); $('.status1').css({'display':'none'});
...@@ -159,9 +211,6 @@ ...@@ -159,9 +211,6 @@
} }
}); });
} }
function sendScore(msg) { function sendScore(msg) {
proxy.invoke("SetGameScore", 'Mouse',msg).done(data => { //发送分数 proxy.invoke("SetGameScore", 'Mouse',msg).done(data => { //发送分数
...@@ -174,12 +223,21 @@ ...@@ -174,12 +223,21 @@
console.log(data) console.log(data)
}); });
} }
function ownranking() {
proxy.invoke("GetUserRank", 'Mouse').done(data => {
console.log(data)
$('.o_ranking').html(data)
//显示统计窗口
$('#rank_mask').css('display','block');
});
}
function getMsg() { function getMsg() {
//随时获取游戏的状态 //随时获取游戏的状态
proxy.on('getChangeMenu',function (data) { proxy.on('getChangeMenu',function (data) {
console.log(data) console.log(data)
laoshudata = JSON.parse(data.data)
laoshudata = JSON.parse(data.data)
if(data.status==0){ if(data.status==0){
$('.status').css({'display':'flex'}); $('.status').css({'display':'flex'});
$('.status1').css({'display':'none'}); $('.status1').css({'display':'none'});
...@@ -207,6 +265,10 @@ ...@@ -207,6 +265,10 @@
proxy.on('notifyMouseWinning',function (data) { proxy.on('notifyMouseWinning',function (data) {
console.log(data) console.log(data)
}) })
proxy.on('notifyMouseGamerResult',function (data) {
getRankList(data)
})
} }
// sort 是顺序,score分数,type -1鼠,2猪,location位置(出现在第几个洞),interval时间(与下一个间隔时间单位:毫秒) // sort 是顺序,score分数,type -1鼠,2猪,location位置(出现在第几个洞),interval时间(与下一个间隔时间单位:毫秒)
...@@ -228,15 +290,25 @@ ...@@ -228,15 +290,25 @@
var wz = laoshudata[key].Location-1 var wz = laoshudata[key].Location-1
if(laoshudata[key].Type == 1){ if(laoshudata[key].Type == 1){
//创建img元素 //创建img元素
$('.hole-container .hole:eq('+wz+') .mouse').append('<img src="../../images/aM/mouse.png" alt="">'); $('.hole-container .hole:eq('+wz+') .mouse').append('<img src="../../images/aM/mouse.png" alt="" class="zoon">');
$('.hole-container .hole:eq('+wz+') .mouse img').animate({top:"0.05rem"},600); $('.hole-container .hole:eq('+wz+') .mouse img').animate({top:"0.02rem"},600);
//为老鼠的时候加100分 //为老鼠的时候加100分
$('.hole-container .hole:eq('+wz+') .mouse img').click(function () { $('.hole-container .hole:eq('+wz+') .mouse .zoon').click(function () {
if(laoshudata[key].noclick == 0) { if(laoshudata[key].noclick == 0) {
score = score + 100; score = score + 500;
$('.score').html(score + '分') $('.score').html(score + '分')
sendScore(score) sendScore(score)
$('.hole-container .hole:eq(' + wz + ') .mouse img').attr('src', '../../images/aM/dadao.png') $('.hole-container .hole:eq(' + wz + ') .mouse .zoon').remove()
$('.hole-container .hole:eq('+wz+') .mouse').append('<img src="../../images/aM/dadao.png" alt="" class="yan">');
$('.hole-container .hole:eq('+wz+') .mouse').append('<p class="show_score"> +500 </p>');
setTimeout(function () {
$('.hole-container .hole:eq('+wz+') .mouse .yan').remove();
$('.hole-container .hole:eq('+wz+') .mouse .show_score').remove();
},300)
laoshudata[key].noclick=1 laoshudata[key].noclick=1
} }
}) })
...@@ -249,14 +321,20 @@ ...@@ -249,14 +321,20 @@
} }
if(laoshudata[key].Type == 2){ if(laoshudata[key].Type == 2){
$('.hole-container .hole:eq('+wz+') .mouse').append('<img src="../../images/aM/pig.png" alt="">'); $('.hole-container .hole:eq('+wz+') .mouse').append('<img src="../../images/aM/pig.png" alt="" class="zoon>');
$('.hole-container .hole:eq('+wz+') .mouse img').animate({top:"0.05rem"},600); $('.hole-container .hole:eq('+wz+') .mouse img').animate({top:"0.02rem"},600);
$('.hole-container .hole:eq('+wz+') .mouse img').click(function () { $('.hole-container .hole:eq('+wz+') .mouse .zoon').click(function () {
if(laoshudata[key].noclick == 0){ if(laoshudata[key].noclick == 0){
score=score-50; score=score- 100;
$('.score').html(score+ '分') $('.score').html(score+ '分')
sendScore(score) sendScore(score)
$('.hole-container .hole:eq('+wz+') .mouse img').attr('src','../../images/aM/dadao.png') $('.hole-container .hole:eq(' + wz + ') .mouse .zoon').remove()
$('.hole-container .hole:eq('+wz+') .mouse').append('<img src="../../images/aM/dadao.png" alt="" class="yan">');
$('.hole-container .hole:eq('+wz+') .mouse').append('<p class="show_score">-100</p>');
setTimeout(function () {
$('.hole-container .hole:eq('+wz+') .mouse .yan').remove();
$('.hole-container .hole:eq('+wz+') .mouse .show_score').remove();
},300)
laoshudata[key].noclick=1 laoshudata[key].noclick=1
} }
}) })
...@@ -273,6 +351,7 @@ ...@@ -273,6 +351,7 @@
} }
function StartGame() { function StartGame() {
audio2.play()
Count=3; Count=3;
Count2=30; Count2=30;
$('.circleCount').css('display','block'); $('.circleCount').css('display','block');
...@@ -305,13 +384,42 @@ ...@@ -305,13 +384,42 @@
window.clearInterval(clock); window.clearInterval(clock);
window.clearInterval(timer1); //清除老鼠 window.clearInterval(timer1); //清除老鼠
sendScore(score) sendScore(score)
//显示统计窗口 ownranking() //获取自己排名
$('.rank_mask').css('display','block');
} }
}, 1000) }, 1000)
} }
function getRankList(data){
$(".rank_i").empty()
var html = ''
$.each(data, function(i,v) {//这里的函数参数是键值对的形式,k代表键名,v代表值
html+='<div class="rank_item">\n' +
' <div class="rank_itemL">\n' +
' <div class="rank_num">'+data[i].r+'</div>\n' +
' <p>'+data[i].n+'</p>\n' +
' </div>\n' +
' <div class="rank_itemR">\n' +
' <div class="shuxi"></div>\n' +
' <p>'+data[i].s+'</p>\n' +
' </div>\n' +
' </div>'
});
$(".rank_i").append(html);
};
$('.Close').click(function () {
$('#rank_mask').css('display','none')
})
$('.ranging').click(function () {
$('#rank_mask').css('display','block')
})
$('.all_Close').click(function () {
$('#notice').css('display','none')
})
$('.return').click(function () { $('.return').click(function () {
//返回首页 //返回首页
}) })
</script> </script>
</html> </html>
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
<div class="mask"></div> <div class="mask"></div>
<div class="gold"></div> <div class="gold"></div>
<div id="touchBox"></div> <div id="touchBox"></div>
<input type="button" value="开始" id="Start" style="z-index:9999;position: fixed;top:0;"> <!-- <input type="button" value="开始" id="Start" style="z-index:9999;position: fixed;top:0;">
<input type="button" value="重置" id="reset" style="z-index:9999;position: fixed;top:0;left:40px;"> <input type="button" value="重置" id="reset" style="z-index:9999;position: fixed;top:0;left:40px;"> -->
<div class="time"> <div class="time">
<div class="time-txt">倒计时</div> <div class="time-txt">倒计时</div>
...@@ -51,24 +51,87 @@ ...@@ -51,24 +51,87 @@
<div class="my_rank"> <div class="my_rank">
<p class="my_rankTop" style="padding:1.5rem 0 0.2rem 0"> <p class="my_rankTop" style="padding:1.5rem 0 0.2rem 0">
<span class="my-rank-title">您当前排名为</span>&nbsp;&nbsp; <span class="my-rank-title">您当前排名为</span>&nbsp;&nbsp;
<span class="rank_myTop" id="myTop">1</span>&nbsp;&nbsp; <span class="rank_myTop" id="myTop"></span>&nbsp;&nbsp;
</p> </p>
</div> </div>
<div class="rank" id="rankBox" style="height: 27rem;"> <div class="rank" id="rankBox" style="height: 29rem;"></div>
<div class="rank-row">
<span class="rank-num num1"></span>
<img src="img/money/back_ico.png"/>
<span class="rank-name">张三</span>
<span class="rank-score">10400</span>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</body> </body>
<script type="text/javascript" src="../../js/jquery-1.10.2.js"></script> <script type="text/javascript" src="../../js/jquery-1.10.2.js"></script>
<script src="../../js/moveJs/jquery.signalR.min.js"></script>
<script> <script>
let conn;
let proxy;
let status=0;
let clock=null;
function getMyRank(){
proxy.invoke('GetUserRank','Money').done(r=>{
if(r!=-1){
$('#myTop').html(r);
}else{
$('#myTop').html('未上榜');
}
})
}
function GetStatus(){
proxy.invoke("GetMenuStatus", "Money").done(m => {
if (m.status == -1) {
getMyRank();
proxy.invoke('GetGameResult','Money').done(d=>{
var html=''
if(d && d.length>0){
for (var i=0;i<d.length;i++) {
html+='<div class="rank-row"><span class="rank-num num'+(i+1)+'">'+(i>2?(i+1)+"":"")+'</span><img src="'+d[i].p+'"/>'
html+='<span class="rank-name">'+d[i].n+'</span><span class="rank-score">'+d[i].s+'</span></div>'
}
}
$("#rankBox").html(html);
$('.play_tips').css('display','none');
$('.tipsDiv').text('游戏已经结束咯');
//$('.rank_mask').css('display','block');
});
}else if(m.status==2){
$('.play_tips').css('display','none');
$('.tipsDiv').text('你来晚了,游戏已经开始了');
proxy.on("notifyGamerResult",function(d){
var html=''
if(d && d.length>0){
for (var i=0;i<d.length;i++) {
html+='<div class="rank-row"><span class="rank-num num'+(i+1)+'">'+(i>2?i+"":"")+'</span><img src="'+d[i].p+'"/>'
html+='<span class="rank-name">'+d[i].n+'</span><span class="rank-score">'+d[i].s+'</span></div>'
}
}
$("#rankBox").html(html);
getMyRank();
});
}
});
}
function initConnection(){
conn = $.hubConnection("http://localhost:7838/signalr", {
qs: `i=1951_Money&n=张建国&p=${encodeURIComponent(
"http://imgfile.oytour.com/Upload/User/636738107265395640.jpg"
)}`
});
proxy = conn.createHubProxy("annualLeaveHub");
conn.start().done(data => {
console.log('connection 链接成功');
GetStatus();
winning();
}).fail(data => {
console.log('链接失败:'+data)
});
}
function winning(){
proxy.on("notifyWinning",function(d){
alert("恭喜你中奖了:"+d);
})
}
this.initConnection()
$(function () { $(function () {
var music=document.getElementById('music'); var music=document.getElementById('music');
var money_en = $("body"); var money_en = $("body");
...@@ -77,7 +140,28 @@ ...@@ -77,7 +140,28 @@
var off =true; var off =true;
var Count=3; var Count=3;
var Count2=30; var Count2=30;
proxy.on("notifyGamerResult",function(d){
console.log(d)
var html=''
if(d && d.length>0){
for (var i=0;i<d.length;i++) {
html+='<div class="rank-row"><span class="rank-num num'+(i+1)+'">'+(i>2?i+"":"")+'</span><img src="'+d[i].p+'"/>'
html+='<span class="rank-name">'+d[i].n+'</span><span class="rank-score">'+d[i].s+'</span></div>'
}
}
$("#rankBox").html(html);
getMyRank();
});
// proxy.on("notifyGamerResult",function(d){
// var html=''
// if(d && d.length>0){
// for (var i=0;i<d.length;i++) {
// html+='<div class="rank-row"><span class="rank-num num'+(i+1)+'">'+(i>2?i+"":"")+'</span><img src="'+d[i].p+'"/>'
// html+='<span class="rank-name">'+d[i].n+'</span><span class="rank-score">'+d[i].s+'</span></div>'
// }
// }
// $("#rankBox").html(html);
// });
//点击关闭统计弹窗 //点击关闭统计弹窗
$('.close').click(function(){ $('.close').click(function(){
$('.rank_mask').css('display','none'); $('.rank_mask').css('display','none');
...@@ -86,15 +170,29 @@ ...@@ -86,15 +170,29 @@
$('#rankBtn').click(function(){ $('#rankBtn').click(function(){
$('.rank_mask').css('display','block'); $('.rank_mask').css('display','block');
}); });
//模拟监听到再来一次重置事件 proxy.on("getChangeMenu", function(data) {
$("#reset").click(function(){ if (data.code == "Money") {
location.reload(); if(data.status==2){
//StartGame(); StartGame();
}); }else if(data.status==1){
//模拟监听到开始事件 //conn.disconnect();
$("#Start").click(function(){ //initConnection();
StartGame(); $('.play_tips').css('display','block');
}); $('.tipsDiv').text('保存体力,等待开始');
proxy.invoke('JoinGame','Money').done(data=>{
});
}else if(data.status==-1){
window.clearInterval(clock);
clock=null;
getMyRank();
//显示统计窗口
$('.rank_mask').css('display','block');
$('.play_tips').css('display','none');
$('.tipsDiv').text('游戏已经结束咯');
}
}
})
//游戏开始 //游戏开始
function StartGame(){ function StartGame(){
//3秒倒计时 //3秒倒计时
...@@ -104,13 +202,13 @@ ...@@ -104,13 +202,13 @@
$('.circleCount').css('display','block'); $('.circleCount').css('display','block');
$('.tipsDiv').css('display','block'); $('.tipsDiv').css('display','block');
$('.play_tips').css('display','none'); $('.play_tips').css('display','none');
var clock = window.setInterval(function(){ var clockReady = window.setInterval(function(){
Count--; Count--;
$('.circleCount').html(Count); $('.circleCount').html(Count);
if(Count==0){ if(Count==0){
$('.circleCount').css('display','none'); $('.circleCount').css('display','none');
$('.tipsDiv').css('display','none'); $('.tipsDiv').css('display','none');
window.clearInterval(clock); window.clearInterval(clockReady);
Count30(); Count30();
startMove(); startMove();
} }
...@@ -119,7 +217,7 @@ ...@@ -119,7 +217,7 @@
//30秒倒计时 //30秒倒计时
function Count30(){ function Count30(){
$("#time").html(30); $("#time").html(30);
let clock = window.setInterval(function() { clock = window.setInterval(function() {
Count2--; Count2--;
$("#time").html(Count2); $("#time").html(Count2);
if (Count2 === 0) { if (Count2 === 0) {
...@@ -130,6 +228,8 @@ ...@@ -130,6 +228,8 @@
}, 1000) }, 1000)
} }
function startMove(){ function startMove(){
let startX=0;
let startY=0;
money_en.on("touchstart", function(e) { money_en.on("touchstart", function(e) {
if (e.cancelable) { if (e.cancelable) {
// 判断默认行为是否已经被禁用 // 判断默认行为是否已经被禁用
...@@ -173,6 +273,10 @@ ...@@ -173,6 +273,10 @@
},400, function () { },400, function () {
$(this).remove(); $(this).remove();
i+=100; i+=100;
proxy.invoke("SetGameScore","Money", 100).done(msg => {
// dosomething
});
//$(".money_add span").html("¥"+i) //$(".money_add span").html("¥"+i)
}); });
setTimeout(function () { setTimeout(function () {
......
...@@ -122,7 +122,7 @@ p{ ...@@ -122,7 +122,7 @@ p{
} }
.center{ .center{
width: 90%; width: 90%;
/*height: 50%;*/ height: 58%;
margin-left: 5%; margin-left: 5%;
margin-top: 1rem; margin-top: 1rem;
display: flex; display: flex;
...@@ -143,16 +143,30 @@ p{ ...@@ -143,16 +143,30 @@ p{
overflow-x:hidden; overflow-x:hidden;
} }
.c_left,.c_right{ .c_left,.c_right{
width: 50%; width: 48%;
} }
.c_left{ .c_center{
display: flex; width: 4%;
}
.c_xian{
width: 100%;
height: 0.74rem;
display: flex;
flex-direction: column; flex-direction: column;
align-items: center;
} }
.c_right{ .yuan{
width: 0.08rem;
height: 0.08rem;
border-radius: 0.04rem;
background: #FDD54B;
} }
.yuan_x{
width: 1px;
height: 0.67rem;
background: #FDD54B;
}
.time{ .time{
color: #FDD54B; color: #FDD54B;
font-size: 0.12rem; font-size: 0.12rem;
...@@ -176,24 +190,14 @@ p{ ...@@ -176,24 +190,14 @@ p{
.right_box{ .right_box{
width: 100%; width: 100%;
height: 0.75rem; height: 0.75rem;
border-left:1px solid #E88A36;
padding-left: 0.08rem; padding-left: 0.08rem;
position: relative; position: relative;
} }
.yuan_r{
width: 0.08rem;
height: 0.08rem;
border-radius: 0.04rem;
background: #FDD54B;
position: absolute;
left: -0.04rem;
top: 0;
}
.letf_box{ .letf_box{
width: 100%; width: 100%;
height: 0.75rem; height: 0.75rem;
border-right:1px solid #E88A36;
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -206,12 +210,4 @@ p{ ...@@ -206,12 +210,4 @@ p{
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
} }
.yuan_l{
width: 0.08rem;
height: 0.08rem;
border-radius: 0.04rem;
background: #FDD54B;
position: absolute;
right: -0.04rem;
top: 0;
}
...@@ -4,6 +4,8 @@ body { ...@@ -4,6 +4,8 @@ body {
padding: 0; padding: 0;
overflow-x: hidden; overflow-x: hidden;
height: 100%; height: 100%;
-webkit-overflow-scrolling: auto;
overflow-scrolling: auto
} }
p{ p{
margin: 0; margin: 0;
...@@ -119,18 +121,33 @@ li{ ...@@ -119,18 +121,33 @@ li{
.mouse{ .mouse{
position: absolute; position: absolute;
width: 0.83rem; width: 0.83rem;
height: 0.68rem; height: 0.78rem;
overflow: hidden; overflow: hidden;
top:-0.5rem top:-0.62rem;
} }
.mouse img{ .mouse .zoon{
position: absolute; position: absolute;
width: 0.83rem; width: 0.83rem;
height: 0.68rem; height: 0.68rem;
top:0.65rem; top:0.65rem;
z-index: 100; z-index: 100;
} }
.mouse .yan{
position: absolute;
width: 0.23rem;
height: 0.35rem;
top:0.25rem;
left: 0.3rem;
z-index: 80;
}
.mouse .show_score{
color: #FFFE01;
font-size: 0.14rem;
position: absolute;
top:0;
left: 0.3rem;
}
.status{ .status{
width: 90%; width: 90%;
height: 0.45rem; height: 0.45rem;
...@@ -239,6 +256,8 @@ li{ ...@@ -239,6 +256,8 @@ li{
top:0; top:0;
width: 100%;height: 100%; width: 100%;height: 100%;
display: none; display: none;
align-items: center;
justify-content: center;
} }
.zhezao{ .zhezao{
width: 100%;height: 100%; width: 100%;height: 100%;
...@@ -271,6 +290,13 @@ li{ ...@@ -271,6 +290,13 @@ li{
background-image: url('../../../images/aM/rank_top.png'); background-image: url('../../../images/aM/rank_top.png');
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
display: flex;
justify-content: center;
}
.rBox_top p{
color: #FDD54B;
font-size: 0.18rem;
margin-top: 0.12rem;
} }
.rank_y{ .rank_y{
width: 80%; width: 80%;
...@@ -318,9 +344,7 @@ li{ ...@@ -318,9 +344,7 @@ li{
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.rank_num p{
}
.rank_itemL p{ .rank_itemL p{
color: #B7540D; color: #B7540D;
font-size: 0.12rem; font-size: 0.12rem;
...@@ -352,3 +376,75 @@ li{ ...@@ -352,3 +376,75 @@ li{
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
} }
/*#notice{*/
/* display: flex;*/
/*}*/
.notice_box{
width: 2.8rem;
height: 2.6rem;
background-image: url('../../../images/aM/all_bg.png');
background-size: 100% 100%;
background-repeat: no-repeat;
position: relative;
display: flex;
flex-direction: column;
align-items: center;
}
.notice_top{
width: 0.63rem;
height: 0.63rem;
margin-top: 0.28rem;
}
.notice_box span{
color: #893630;
font-size: 0.15rem;
margin-top: 0.2rem;
}
.notice_content{
width: 2.2rem;
height: 0.4rem;
border-radius: 0.08rem;
border: 1px solid #C8532B;
background: white;
display: flex;
align-items: center;
justify-content: center;
margin-top: 0.14rem;
}
.notice_content span{
width: 2rem;
text-overflow:ellipsis;
overflow: hidden;
margin-top: 0;
white-space:nowrap;
}
.all_Receive{
width: 1.5rem;
height: 0.27rem;
background: #F9CB3B;
display: flex;
align-items: center;
justify-content: center;
margin-top: 0.18rem;
border-radius: 0.135rem;
}
.all_Receive span{
color: #893630;
font-size: 0.13rem;
margin-top: 0;
}
.all_Close{
position: absolute;
left: 50%;
bottom: -0.5rem;
margin-left: -0.17rem;
width: 0.34rem;
height: 0.34rem;
background-image: url('../../../images/aM/close.png');
background-size: 100% 100%;
background-repeat: no-repeat;
}
...@@ -323,15 +323,15 @@ body { ...@@ -323,15 +323,15 @@ body {
background: url(../img/money/new-number1.png) no-repeat center; background: url(../img/money/new-number1.png) no-repeat center;
background-size: contain; background-size: contain;
} }
/*.rank_mask .rank-num.num2 {*/ .rank_mask .rank-num.num2 {
/*background: url("../img/mobile_img/rank_num2.png") no-repeat center;*/ background: url("../img/mobile_img/rank_num2.png") no-repeat center;
/*background-size: contain;*/ background-size: contain;
/*}*/ }
/*.rank_mask .rank-num.num3 {*/ .rank_mask .rank-num.num3 {
/*background: url("../img/mobile_img/rank_num3.png") no-repeat center;*/ background: url("../img/mobile_img/rank_num3.png") no-repeat center;
/*background-size: contain;*/ background-size: contain;
/*}*/ }
.rank_mask .rank-num { .rank_mask .rank-num {
width: 22px; width: 22px;
height: 28px; height: 28px;
...@@ -380,6 +380,6 @@ body { ...@@ -380,6 +380,6 @@ body {
vertical-align: middle; vertical-align: middle;
border-radius: 50%; border-radius: 50%;
position: relative; position: relative;
top: -3px; top: -1px;
margin-left: 4px; margin-left: 15px;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment