Commit 18eebe34 authored by 赵桢's avatar 赵桢

修改

parent 84cbf3b8
......@@ -41,7 +41,7 @@
var className = '<%=(String)request.getParameter("className")%>';
</script>
<div style="width: 100%;height: 800px" id="iframe">
<div style="width: 100%;height: 100%" id="iframe">
</div>
<!-- 全局js -->
......@@ -58,9 +58,10 @@
<script src="<%=request.getContextPath()%>/res/js/plugins/dataTables/dataTables.bootstrap.js"></script>
<!-- 自定义js -->
<script src="<%=request.getContextPath()%>/res/js/education/questionnaire_Administration_list.js"></script>
<script src="<%=request.getContextPath()%>/res/js/education/config.js"></script>
<script>
$(document).ready(function (){
var baseUrl = getBaseUrl();
//获取token里面的内容
<%
Cookie[] cookies = request.getCookies();
......@@ -72,8 +73,7 @@
}
request.setAttribute("SESSION", SESSION);
%>
<%-- http://localhost:8081/#/add--%>
var url="http://localhost:8081/#/add?session=<%=request.getAttribute("SESSION")%>"
var url=baseUrl + "/#/add?session=<%=request.getAttribute("SESSION")%>"
// alert(url)
var iframe=$('<iframe width="100%" height="100%" src="'+url+'"></iframe>')
$("#iframe").append(iframe)
......
......@@ -58,6 +58,8 @@
<!-- 自定义js -->
<script src="<%=request.getContextPath()%>/res/js/education/questionnaire_Administration_list.js"></script>
<script src="<%=request.getContextPath()%>/res/js/education/config.js"></script>
<script>
<%--$(document).ready(function () {--%>
<%-- //获取token里面的内容--%>
......@@ -81,6 +83,7 @@
<%-- $("#iframe").append(iframe)--%>
<%--})--%>
$(document).ready(function () {
var baseUrl = getBaseUrl()
// 获取 token 里的内容
<%
Cookie[] cookies = request.getCookies();
......@@ -99,7 +102,7 @@
sessionStorage.setItem("sessionId", sessionId);
// 构造 URL
var session='<%=request.getAttribute("SESSION")%>';
var url = "http://localhost:8081/#/one?session="+session+"&realID="+createId;
var url = baseUrl + "/#/one?session="+session+"&realID="+createId;
<%--var url = "http://localhost:8081/#/one?session=<%=request.getAttribute("SESSION")%>"--%>
// 创建 iframe
// alert(url)
......
......@@ -41,7 +41,7 @@
var className = '<%=(String)request.getParameter("className")%>';
</script>
<div style="width: 100%;height: 800px" id="iframe">
<div style="width: 100%;height: 100%" id="iframe">
</div>
<!-- 全局js -->
......@@ -59,24 +59,51 @@
<!-- 自定义js -->
<script src="<%=request.getContextPath()%>/res/js/education/questionnaire_Administration_list.js"></script>
<%--<script src="<%=request.getContextPath()%>/res/js/education/config.js"></script>--%>
<script src="<%=request.getContextPath()%>/res/js/education/config.js"></script>
<script>
$(document).ready(function (){
//获取token里面的内容
$(document).ready(function () {
var baseUrl = getBaseUrl();
console.log('baseUrl = ',baseUrl)
// 获取 token 里面的内容
<%
Cookie[] cookies = request.getCookies();
String SESSION = "";
for(int i = 0; i < cookies.length; i++) {
for (int i = 0; i < cookies.length; i++) {
if ("SESSION".equals(cookies[i].getName())) {
SESSION = cookies[i].getValue();
}
}
request.setAttribute("SESSION", SESSION);
%>
var url="http://localhost:8081?session=<%=request.getAttribute("SESSION")%>"
// alert(url)
var iframe=$('<iframe width="100%" height="100%" src="'+url+'"></iframe>')
$("#iframe").append(iframe)
})
<%--console.log('---- ',<%=request.getAttribute("SESSION")%>)--%>
var url = baseUrl + "?session=" + <%=request.getAttribute("SESSION")%>;
// console.log('url = ',url)
// 显示 url
// alert(url);
var iframe = $('<iframe width="100%" height="100%" src="' + url + '"></iframe>');
$("#iframe").append(iframe);
});
<%--$(document).ready(function (){--%>
<%-- //获取token里面的内容--%>
<%-- <%--%>
<%-- Cookie[] cookies = request.getCookies();--%>
<%-- String SESSION = "";--%>
<%-- for(int i = 0; i < cookies.length; i++) {--%>
<%-- if ("SESSION".equals(cookies[i].getName())) {--%>
<%-- SESSION = cookies[i].getValue();--%>
<%-- }--%>
<%-- }--%>
<%-- request.setAttribute("SESSION", SESSION);--%>
<%-- %>--%>
<%-- var url="http://localhost:8081?session=<%=request.getAttribute("SESSION")%>"--%>
<%-- // alert(url)--%>
<%-- var iframe=$('<iframe width="100%" height="100%" src="'+url+'"></iframe>')--%>
<%-- $("#iframe").append(iframe)--%>
<%--})--%>
</script>
<div class="modal fade" id="loadingModal" backdrop="static" keyboard="false">
  <div style="width: 200px;height:20px; z-index: 20000; position: absolute; text-align: center; left: 50%; top: 50%;margin-left:-100px;margin-top:-10px">
......
function getBaseUrl() {
// console.log('----- 1 -----')
return "http://localhost:8081";
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment