Commit 18a49b52 authored by Mac's avatar Mac

1

parent 638be24d
...@@ -404,14 +404,16 @@ ...@@ -404,14 +404,16 @@
window.postMessage(JSON.stringify(data)); window.postMessage(JSON.stringify(data));
}) })
//键盘弹起遮挡内容的处理方法 //键盘弹起遮挡内容的处理方法
window.addEventListener('resize', () => { if(/Android [4-6]/.test(navigator.appVersion)) {
if (document.activeElement.tagName == 'INPUT') { window.addEventListener("resize", function() {
//延迟出现是因为有些 Android 手机键盘出现的比较慢 if(document.activeElement.tagName=="INPUT" ||
window.setTimeout(() => { document.activeElement.tagName=="TEXTAREA") {
document.activeElement.scrollIntoViewIfNeeded(); window.setTimeout(function() {
}, 500); document.activeElement.scrollIntoViewIfNeeded();
} },500);
}); }
})
}
//ios禁止被拖动 //ios禁止被拖动
var u = navigator.userAgent, app = navigator.appVersion; var u = navigator.userAgent, app = navigator.appVersion;
var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器 var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //android终端或者uc浏览器
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</div> </div>
<div class="score">分数:<span id="my_score">0</span></div> <div class="score">分数:<span id="my_score">0</span></div>
<div class="timer"> <div class="timer">
倒计时:<span id="time">0</span> 倒计时:<span id="time">30</span>
<img class="ico" src="img/money/timer.png"/> <img class="ico" src="img/money/timer.png"/>
</div> </div>
<div class="reg_bag" style='background-image: url("img/money/red_bag.png")'></div> <div class="reg_bag" style='background-image: url("img/money/red_bag.png")'></div>
...@@ -100,6 +100,8 @@ ...@@ -100,6 +100,8 @@
let status=0; let status=0;
let clock=null; let clock=null;
let isWinning=false; let isWinning=false;
var activity = JSON.parse(localStorage.activity);
var EmployeeId = activity.EmployeeId + '_Money';
// clipboard.on('success', function(e) { // clipboard.on('success', function(e) {
// console.log(e); // console.log(e);
// }); // });
...@@ -107,7 +109,7 @@ ...@@ -107,7 +109,7 @@
// console.log(e); // console.log(e);
// }); // });
function getMyRank(){ function getMyRank(){
proxy.invoke('GetUserRank','Money','1951_Money').done(r=>{ proxy.invoke('GetUserRank','Money',EmployeeId).done(r=>{
console.log(r); console.log(r);
if(r.r!=-1){ if(r.r!=-1){
$('#myTop').html(r.r); $('#myTop').html(r.r);
...@@ -151,8 +153,7 @@ ...@@ -151,8 +153,7 @@
} }
}); });
} }
var activity = JSON.parse(localStorage.activity);
var EmployeeId = activity.EmployeeId + '_Money';
function initConnection(){ function initConnection(){
var conn = $.hubConnection("http://192.168.2.65:7838/signalr", { var conn = $.hubConnection("http://192.168.2.65:7838/signalr", {
qs: `i=${EmployeeId}&n=${activity.EmName}&p=${encodeURIComponent(activity.imgUrl)}&e=${activity.e}` qs: `i=${EmployeeId}&n=${activity.EmName}&p=${encodeURIComponent(activity.imgUrl)}&e=${activity.e}`
......
...@@ -45,7 +45,7 @@ p{ ...@@ -45,7 +45,7 @@ p{
width: 100%; width: 100%;
height: 0.95rem; height: 0.95rem;
background: #C62825; background: #C62825;
position: absolute; position: fixed;
left: 0; left: 0;
bottom: 0; bottom: 0;
display: flex; display: flex;
......
...@@ -320,7 +320,7 @@ li{ ...@@ -320,7 +320,7 @@ li{
.rank_i{ .rank_i{
width: 80%; width: 80%;
height: 70%; height: 70%;
overflow-y: hidden; overflow-y: auto;
} }
.rank_item{ .rank_item{
display: flex; display: flex;
......
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