149 lines
4.0 KiB
HTML
149 lines
4.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>矿山安全</title>
|
|
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
|
|
<meta content="yes" name="apple-mobile-web-app-capable" />
|
|
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
|
|
<meta name="format-detection" content="telephone=no" />
|
|
<meta content="false" name="twcClient" id="twcClient" />
|
|
<style>
|
|
body,
|
|
html {
|
|
width: 100%;
|
|
height: 100%
|
|
}
|
|
|
|
* {
|
|
margin: 0;
|
|
padding: 0
|
|
}
|
|
|
|
body {
|
|
/* background-color: rgba(0, 0, 0, 0.6); */
|
|
filter: alpha(opacity=80);
|
|
}
|
|
|
|
.top-bar-guidance {
|
|
font-size: 15px;
|
|
color: #fff;
|
|
/* height: 40%; */
|
|
line-height: 1.8;
|
|
/* padding-left: 30px; */
|
|
/* padding-top: 20px; */
|
|
}
|
|
|
|
.top-right-guide {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-direction: column;
|
|
background-color: #3ab2a8;
|
|
border-radius: 10px;
|
|
margin-right: 10px;
|
|
padding: 10px;
|
|
|
|
}
|
|
|
|
.tangel {
|
|
border-top: 10px solid transparent;
|
|
border-bottom: 10px solid #3ab2a8;
|
|
border-left: 10px solid transparent;
|
|
border-right: 10px solid transparent;
|
|
margin-right: 30px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="top-bar-guidance">
|
|
<div style="display: flex;flex-direction: column;align-items: flex-end;justify-content: flex-end;">
|
|
<div class="tangel">
|
|
</div>
|
|
<div class="top-right-guide">
|
|
<div style="display: flex;align-items: center;">请点击右上角</div>
|
|
<div>选择“在浏览器中打开”</div>
|
|
</div>
|
|
</div>
|
|
<div style="display: flex;flex-direction: column;margin: 50% auto;">
|
|
<div style="text-align: center">
|
|
<img src="img/blop.png" style="width: 30%;height:30%;border-radius: 15px;background-color: #fff;" />
|
|
|
|
</div>
|
|
<div style="font-size: 20px;color: #555555;text-align: center;display: flex;flex-direction: row;align-items: center;justify-content: center;margin-top: 10px;">
|
|
<!-- <img src="img/安卓.png" style="width: 24px;margin-right: 10px;" /> -->
|
|
<div>双重预防机制管控系统-连城锰矿</div>
|
|
</div>
|
|
<div style="font-size: 12px;color: #555555;text-align: center;margin-top: 20px;">安卓(android)APP下载</div>
|
|
<div style="font-size: 14px;color: #ff0000;text-align: center;margin-top: 20px;">请点击右上角,选择浏览器打开。</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<script>
|
|
let env = ""
|
|
switch (window.location.host) {
|
|
case "120.25.146.51":
|
|
env = "cloud"
|
|
break
|
|
case "120.25.146.51:7001":
|
|
env = "cloud"
|
|
break
|
|
case "www.xmmhe.com":
|
|
env = "cloud"
|
|
break
|
|
case "xmmhe.com":
|
|
env = "cloud"
|
|
break
|
|
case "xmmhe.com:7001":
|
|
env = "cloud"
|
|
break
|
|
case "www.xmmhe.com:7001":
|
|
env = "cloud"
|
|
break
|
|
case "121.41.2.71":
|
|
env = "test"
|
|
break
|
|
case "121.41.2.71:7001":
|
|
env = "test"
|
|
break
|
|
default:
|
|
env = "local"
|
|
break
|
|
}
|
|
let config = {
|
|
local: {
|
|
serviceHost: "http://120.25.146.51:7112/api",
|
|
flowServiceHost: "http://120.25.146.51:7199",
|
|
},
|
|
cloud: {
|
|
serviceHost: "http://120.25.146.51:7112/api",
|
|
flowServiceHost: "http://xmmhe.com:7199",
|
|
},
|
|
test: {
|
|
serviceHost: "http://121.41.2.71:7112/api",
|
|
flowServiceHost: "http://121.41.2.71:7199",
|
|
},
|
|
}
|
|
|
|
window.onload = function() {
|
|
const Http = new XMLHttpRequest();
|
|
const url = config[env].serviceHost + '/PF/AppVersionInfo/LastVersionUrl';
|
|
Http.open("GET", url);
|
|
Http.setRequestHeader("Content-Type", "application/json");
|
|
Http.send();
|
|
Http.onreadystatechange = (e) => {
|
|
var data = Http.responseText;
|
|
var json = JSON.parse(data)
|
|
if (Http.status === 200 && Http.readyState == 4) {
|
|
let src = config[env].flowServiceHost + json.Data;
|
|
var iframe = document.createElement('iframe');
|
|
iframe.style.display = 'none';
|
|
iframe.src = "javascript: '<script>location.href=\"" + src + "\"<\/script>'";
|
|
document.getElementsByTagName('body')[0].appendChild(iframe);
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html> |