<!DOCTYPE html>
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml" >
|
<head>
|
<meta charset="UTF-8" />
|
<title th:text="${systemName}"></title>
|
<script th:src="@{${pubzyWebRoot} + 'media/js/jquery-1.11.1.js'}"></script>
|
<script type="text/javascript" th:inline="javascript">
|
/*<![CDATA[*/
|
var backstageWebRoot = [[${backstageWebRoot}]];
|
$(function() {
|
var search = window.location.search;
|
var newsid = "";
|
if(search.indexOf("?") > -1){
|
search = search.replace("?", "");
|
newsid = search.split('=')[1];
|
}
|
$.ajax({
|
type : "GET",
|
url : backstageWebRoot + 'api/sys/pubnews/getInfoById/'+newsid,
|
success : function(result) {
|
if(result != null){
|
var dateD = new Date(result.lasteditdate);
|
var dateS = dateD.toLocaleString() != "" ?
|
dateD.toLocaleString().substring(0,dateD.toLocaleString().indexOf(" "))
|
.replace(/\//g,"-"):"";
|
$(".div_title").html(result.title);
|
$("#username").text(result.createusername);
|
$("#createdate").text(dateS);
|
$(".div_info").html(htmlDecodeByRegExp(result.contents));
|
}
|
}
|
});
|
});
|
//解码
|
function htmlDecodeByRegExp(str){
|
var s = "";
|
if(str.length == 0) return "";
|
s = str.replace(/&/g,"&");
|
s = s.replace(/</g,"<");
|
s = s.replace(/>/g,">");
|
s = s.replace(/ /g," ");
|
s = s.replace(/'/g,"\'");
|
s = s.replace(/"/g,"\"");
|
return s;
|
}
|
/*]]>*/
|
</script>
|
<style>
|
body {
|
margin: 0;
|
font-family: "Roboto", sans-serif !important;
|
}
|
.div_zxmain{
|
padding:3%;
|
height:100%;
|
}
|
.div_title{
|
text-align:center;
|
/*font-weight:bold;*/
|
font-size:24px;
|
color: #296ebb;
|
}
|
.div_createInfo{
|
text-align:center;
|
line-height:29px;
|
background:#f3f3f3;
|
font-size:13px;
|
font-family:微软雅黑;
|
margin-top: 27px;
|
}
|
.div_info{
|
width:100%;
|
height:100%;
|
font-size:16px;
|
margin-top:20px;
|
/*padding-left: 10px;*/
|
padding-right: 10px;
|
}
|
</style>
|
</head>
|
<body>
|
<div class="div_zxmain">
|
<div class="div_title"></div>
|
<p class="div_createInfo" >发布人:<span id="username"></span>
|
|
|
|
更新时间:
|
<span id="createdate"></span>
|
</p>
|
<div class="div_info"></div>
|
<hr style="height:1px;border:none;background:#007dfe"/>
|
<p style="text-align: center"><a href="#" onclick="window.print()">[打印本页]</a>
|
<a href="#" onclick="window.close()">[关闭页面]</a></p>
|
</div>
|
</body>
|
</html>
|