first commit
This commit is contained in:
53
WebRoot/jsp/visual/show_znpd_bj.jsp
Normal file
53
WebRoot/jsp/visual/show_znpd_bj.jsp
Normal file
@ -0,0 +1,53 @@
|
||||
<%@ 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: {unitId: 'FS_BJ11_C'},
|
||||
async: false,
|
||||
cache: false,
|
||||
error: function () {
|
||||
console.log('请求失败2')
|
||||
},
|
||||
success: function (data) {
|
||||
var str = $.parseJSON(data);
|
||||
var stationId = '1000011';
|
||||
//http://192.168.7.4:/#/embed/full/station/home?stationId=1000011&token={token}&expirationTime={expirationTime}
|
||||
var url = 'https://192.168.249.218/#/embed/full/station/home?stationId=' + stationId + '&token=' + str.token + '&expirationTime='+str.expirationTime;
|
||||
console.log(url);
|
||||
document.getElementById("wld").innerHTML = '<iframe id="wld_f" height="100%" width="100%" name="demo" scrolling="auto" src="' + url + '"></iframe>'
|
||||
document.getElementById("wld_f").contentDocument.location.reload(true);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="wld" style="height: 100%;width: 100%;">
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user