209 lines
9.4 KiB
PHP
209 lines
9.4 KiB
PHP
<!--
|
|
* 冰雪传奇H5
|
|
* 2022 XX信息科技有限公司
|
|
*
|
|
* @author 123456
|
|
* @wx 123456
|
|
* @qq 123456
|
|
-->
|
|
<?php
|
|
|
|
include 'config.php';
|
|
include 'function.php';
|
|
|
|
$isMobile = isMobile();
|
|
|
|
?>
|
|
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
|
|
<title><?=$_CONFIG['game_name']?> <?=$_CONFIG['game_description']?></title>
|
|
<meta name="description" content="<?=$_CONFIG['game_name']?> <?=$_CONFIG['game_description']?>">
|
|
<meta name="keywords" content="<?=$_CONFIG['game_name']?>,<?=$_CONFIG['game_description']?>">
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="full-screen" content="true" />
|
|
<meta name="screen-orientation" content="portrait" />
|
|
<meta name="x5-fullscreen" content="true" />
|
|
<meta name="360-fullscreen" content="true" />
|
|
<style>
|
|
html, body {
|
|
-ms-touch-action: none;
|
|
background: #000000;
|
|
cursor: default;
|
|
padding: 0;
|
|
border: 0;
|
|
margin: 0;
|
|
height: 100%;
|
|
}
|
|
a { cursor: pointer; text-decoration: underline; }
|
|
.link_color { color: yellow; }
|
|
.font_small, .font_small a { font-size: 14px; }
|
|
#label { font-size: 18px; }
|
|
@media screen and (max-height: 480px) {
|
|
#label { font-size: 14px; }
|
|
}
|
|
@media screen and (max-width: 480px) {
|
|
#label { font-size: 14px; }
|
|
}
|
|
</style>
|
|
<script>
|
|
try {
|
|
window.external.OpenGameWindowNew(window.location.href, '', '', '', false);
|
|
} catch(e) {}
|
|
</script>
|
|
<script>
|
|
document.onkeydown = document.onkeyup = document.onkeypress = function(event) {
|
|
var e = event || window.event || arguments.callee.caller.arguments[0];
|
|
if (e && e.keyCode == 123) {
|
|
e.returnValue = false;
|
|
return (false);
|
|
}
|
|
}
|
|
</script>
|
|
<script src="static/js/md5.js"></script>
|
|
<script src="static/js/common.js?v=1"></script>
|
|
</head>
|
|
<body oncontextmenu="return false" onselectstart="return false" ondragstart="return false">
|
|
<div id="mainDiv" style="margin: auto; width: 100%; height: 100%;" class="egret-player" data-entry-class="Main" <?=(!$isMobile ? 'data-orientation="auto" data-scale-mode="noScale" data-frame-rate="60" data-content-width="1920" data-content-height="1280"' : 'data-orientation="landscape" data-scale-mode="fixedHeight" data-frame-rate="30" data-content-width="1334" data-content-height="750"')?> data-multi-fingered="2" data-show-fps="false" data-show-log="false" data-show-fps-style="x:0,y:0,size:12,textColor:0xffffff,bgAlpha:0.9">
|
|
<div id="logDiv" style="position:absolute; width: 100%; height: 100%;">
|
|
<table align="center" id="loadBox" style="color: #b4792e; font-size: 20px; padding-top: 25px;">
|
|
<tr>
|
|
<td align="center">
|
|
<img id="logoImg" align="center" width="380" src="resource_Publish/assets/login/logoGameCat.png" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td id="label" style="padding: 25px 35px 10px; text-align: center;">
|
|
首次加载时间较长……请耐心等待,如长时间无响应 <span class="font_small"><a onClick="window.location.reload()" class="link_color">请点此刷新</a> / <a onClick="window.history.back()" class="link_color">点击返回</a></span>
|
|
<br/>
|
|
加载完成送:大量银两、超值礼包、白卡特权
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center">
|
|
<div style="width: 200px; height: 6px; background-color: #ffffff;">
|
|
<div id="loadBar1" style="width: 30px; height: 6px; background-color: #8E44AD; float: left"></div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td align="center">
|
|
<div align="center" style="width: 200px; height: 6px; background-color: #ffffff;">
|
|
<div id="loadBar2" style="width: 70px; height: 6px; background-color: #ff7700; float: left"></div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
var isMobile = isMobile(),
|
|
loadBar1Width = 0,
|
|
loadBar2Width = 0,
|
|
setIntervalId = 0,
|
|
loadBar2MaxWidth = 200,
|
|
loadError = false;
|
|
|
|
var loadBox = document.getElementById('loadBox'),
|
|
logoImg = document.getElementById('logoImg'),
|
|
loadBar1 = document.getElementById('loadBar1'),
|
|
loadBar2 = document.getElementById('loadBar2');
|
|
|
|
function updateLoadBar() {
|
|
/* TODO:后续改用事件监听 */
|
|
var screenWidth = document.documentElement.scrollWidth || document.body.scrollWidth,
|
|
screenHeight = document.documentElement.scrollHeight || document.body.scrollHeight,
|
|
smallScreen = screenWidth <= 0,
|
|
isHorizontal = isMobile && screenHeight <= 590,
|
|
isPhone = isMobile && smallScreen;
|
|
|
|
if(loadBox) {
|
|
loadBox.style.paddingTop = (!isHorizontal ? (screenHeight / 4) : 50) + 'px';
|
|
}
|
|
if(logoImg) {
|
|
logoImg.width = isHorizontal || smallScreen ? 300 : 500;
|
|
}
|
|
//console.log('updateLoadBar, isHorizontal=' + isHorizontal + ', width=' + screenWidth + ', height=' + screenHeight + ', logoWidth=' + logoImg.width + ', boxPaddingTop=' + loadBox.style.paddingTop);
|
|
|
|
if(loadError) {
|
|
//console.log('loadError=' + loadError);
|
|
return;
|
|
}
|
|
|
|
if(loadBar1) {
|
|
loadBar1Width += 20;
|
|
if (loadBar1Width > 100) {
|
|
loadBar1Width = 0;
|
|
}
|
|
loadBar1.style.width = loadBar1Width + '%';
|
|
//console.log('play updateLoadBar loadBar1 width=' + loadBar1Width);
|
|
}
|
|
if(loadBar2) {
|
|
loadBar2Width += 3;
|
|
if ((loadBar2Width / loadBar2MaxWidth * 100) > 100) {
|
|
loadBarFull();
|
|
} else {
|
|
loadBar2.style.width = loadBar2Width + 'px';
|
|
}
|
|
//console.log('play updateLoadBar loadBar2 width=' + loadBar2Width);
|
|
}
|
|
}
|
|
|
|
function startLoadBar() {
|
|
//console.log('play startLoadBar');
|
|
setIntervalId = self.setInterval(updateLoadBar, 100);
|
|
}
|
|
|
|
function loadBarFull() {
|
|
loadBar2.style.width = loadBar2MaxWidth + 'px';
|
|
}
|
|
|
|
function loadBarClear() {
|
|
window.clearInterval(setIntervalId);
|
|
}
|
|
|
|
function removeLogDiv() {
|
|
//console.log('play removeLogDiv');
|
|
loadBarClear();
|
|
|
|
loadBarFull();
|
|
|
|
setTimeout(function() {
|
|
var mainDiv = document.getElementById('mainDiv'),
|
|
logDiv = document.getElementById('logDiv');
|
|
if (logDiv && mainDiv) {
|
|
//console.log('play removeLogDiv removeChild');
|
|
mainDiv.removeChild(logDiv);
|
|
}
|
|
}, 1e3);
|
|
}
|
|
|
|
window.onload = function () {
|
|
startLoadBar();
|
|
if ((typeof(Worker) !== 'undefined')) {
|
|
var s = document.createElement('script');
|
|
s.type = 'text/javascript';
|
|
s.async = false;
|
|
s.addEventListener('load', function () {
|
|
s.parentNode.removeChild(s);
|
|
s.removeEventListener('load', arguments.callee, false);
|
|
}, false);
|
|
s.src = 'js/index.js?v=' + Math.random();
|
|
document.body.appendChild(s);
|
|
} else {
|
|
loadError = true;
|
|
//console.log('loadError=' + loadError);
|
|
var errorMsg = '抱歉!您的浏览器不支持本游戏,请更换浏览器或前往<?=$_CONFIG['game_name']?>官网 <span class="font_small"><a href="' + getHttp() + location.host + '" target="_blank" class="link_color">下载' + (isMobile ? 'APP' : '微端') + '</a></span> 进行游戏!',
|
|
label = document.getElementById('label');
|
|
if(label) {
|
|
label.innerHTML = errorMsg;
|
|
} else {
|
|
alert(filterHTML(errorMsg));
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|