Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/visual/show_znpd.jsp
2026-01-16 14:13:44 +08:00

71 lines
2.4 KiB
Plaintext

<%@ 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%>';
var opt
/*$.ajax({
type: 'post',
url: 'http://192.168.7.4:8090/auth/login',
data: {
username: 'xipaiai',
password: '00000000'
},
async: true,
globle: false,
error: function () {
console.log('请求失败2')
},
success: function (data) {
console.log(data);
}
});*/
$.ajax({
type: 'post',
url: ext.contextPath + '/znpd/getToken.do',
data: {},
async: false,
// globle: false,
error: function () {
console.log('请求失败2')
},
success: function (data) {
var str = $.parseJSON(data);
console.log(str.token);
console.log(str.expirationTime);
console.log(str.stationId);
var url = 'http://192.168.7.4:/#/embed/home?stationId=' + str.stationId + '&token=' + str.token + '&expirationTime=' + str.expirationTime;
$('#wld').attr('src', url);
console.log(url);
}
});
});
</script>
</head>
<body>
<iframe id="wld" src="" height="100%" width="100%" name="demo" scrolling="auto"></iframe>
</body>
</html>