first commit
This commit is contained in:
61
WebRoot/jsp/visual/show_znpd1.jsp
Normal file
61
WebRoot/jsp/visual/show_znpd1.jsp
Normal file
@ -0,0 +1,61 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<html>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<%String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath();%>
|
||||
<%String serverPath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort();%>
|
||||
|
||||
<%-- 引入jQuery --%>
|
||||
<script type="text/javascript" src="<%=contextPath%>/node_modules/jquery/dist/jquery.min.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=contextPath%>/plugins/jquery-ui/jquery-ui.min.js" charset="utf-8"></script>
|
||||
|
||||
<head>
|
||||
<title>Title</title>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
$(function () {
|
||||
|
||||
var ext = ext || {};
|
||||
ext.contextPath = '<%=contextPath%>';
|
||||
ext.basePath = '<%=basePath%>';
|
||||
ext.serverPath = '<%=serverPath%>';
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: ext.contextPath + '/znpd/getToken.do',
|
||||
data: {},
|
||||
async: false,
|
||||
cache: false,
|
||||
error: function () {
|
||||
console.log('请求失败2')
|
||||
},
|
||||
success: function (data) {
|
||||
var str = $.parseJSON(data);
|
||||
var stationId = '${stationId}';
|
||||
var ip = "192.168.7.4";
|
||||
if (window.location.host == '192.168.16.233') {
|
||||
//办公网段
|
||||
ip = "192.168.16.250";
|
||||
} else {
|
||||
//服务器网段
|
||||
ip = "192.168.7.4";
|
||||
}
|
||||
|
||||
var url = 'http://' + ip + ':/#/embed/home?stationId=' + stationId + '&token=' + str.token + '&expirationTime=5&random=' + (new Date()).getTime() + Math.floor(Math.random() * 1000000);
|
||||
document.getElementById("wld").innerHTML = '<iframe id="wld_f" name="' + (new Date()).getTime() + Math.floor(Math.random() * 1000000) + '" height="100%" width="100%" name="demo" scrolling="auto" src="' + url + '"></iframe>'
|
||||
document.getElementById("wld_f").contentDocument.location.reload(true);
|
||||
// alert(document.cookie);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="wld" style="height: 100%;width: 100%;">
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user