安全帽
This commit is contained in:
parent
a0c0b3e96f
commit
730a6dc84a
|
|
@ -202,6 +202,7 @@ function setMenusData(data) {
|
|||
html += '<li class="layout nocheck" onclick="goBackground()"><p>' + item.menuName + '</p></li>'
|
||||
}
|
||||
})
|
||||
html += '<li class="layout nocheck" hrefValue="../safetyHat/index.html"><p>安全帽</p></li>'
|
||||
}
|
||||
$('#nav-right ul').empty().append(html);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,73 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title></title>
|
||||
</head>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: rgb(228, 228, 228);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.iframediv {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/* margin: 100px auto; */
|
||||
/* border: 10px dashed rgb(58, 58, 58); */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.iframediv iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
transform-origin: top left;
|
||||
transform: scale(1)
|
||||
}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div class="iframediv">
|
||||
<iframe id="iframe" allowfullscreen allow="microphone;camera;midi;encrypted-media;" ></iframe>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
user_name="CS918F";
|
||||
let url="https://caps.runde.pro/api/index.php?ctl=tool&act=get_pkey&user_name="+user_name+"&pwd=CS123456dl@";
|
||||
let iframeUrl;
|
||||
console.log(url);
|
||||
var httpRequest = new XMLHttpRequest();
|
||||
httpRequest.open('GET', url, false);
|
||||
httpRequest.send();
|
||||
console.log(httpRequest.responseText);
|
||||
if (httpRequest.readyState == 4 && httpRequest.status == 200) {
|
||||
var json = JSON.parse(httpRequest.responseText);
|
||||
pkey=json.data;
|
||||
var getTokenUrl="https://caps.runde.pro/api/index.php?ctl=tool&act=get_token&user_name="+user_name+"&pkey="+pkey
|
||||
console.log(getTokenUrl);
|
||||
httpRequest.open('GET', getTokenUrl, false);
|
||||
httpRequest.send();
|
||||
var json2 = JSON.parse(httpRequest.responseText);
|
||||
iframeUrl="https://caps.runde.pro/login#token="+json2.session_id+"&user_name="+user_name+"&target=home";
|
||||
console.log(iframeUrl);
|
||||
document.getElementById("iframe").src=iframeUrl;
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
</html>
|
||||
Loading…
Reference in New Issue