5712e8b4 by 任超

style:相应政策页面的完成

1 parent ae46a10e
......@@ -133,7 +133,7 @@ function LawsData() {
if (result.code == 200 && result.data != null) {
for (var i = 0; i < result.data.length; i++) {
if (i == 6) return;
li = '<li><a href="#" title="' + result.data[i].headline + '">'+ result.data[i].headline;
li = '<li><a href="./staticViews/flfgxq.html?id='+result.data[i].id+'" title="' + result.data[i].headline + '" target="_blank">'+ result.data[i].headline;
li += '</a></li>';
ulTag.append(li);
}
......@@ -155,7 +155,7 @@ function policiesData() {
if (result.code == 200 && result.data != null) {
for (var i = 0; i < result.data.length; i++) {
if (i == 6) return;
li = '<li><a href="#" title="' + result.data[i].headline + '">'+ result.data[i].headline;
li = '<li><a href="./staticViews/xyzcxq.html?id='+result.data[i].id+'" title="' + result.data[i].headline + '" target="_blank">'+ result.data[i].headline;
li += '</a></li>';
policies.append(li);
}
......
......@@ -8,14 +8,14 @@ $(function () {
HotArticle()
})
// 获取法律法规列表数据
// 获取相应政策表数据
function getLawsArticleList() {
var flfgList = $("#flfgList");
flfgList.empty();
var li = '';
$.ajax({
type: "get", //提交方式
url: portal.api_url + "/hlwj/MhLaws/getLawsArticleList",//路径
url: portal.api_url + "/hlwj/MhPolicy/getPolicyArticleList",//路径
dataType: "json",
async: false,
data: {
......@@ -28,7 +28,7 @@ function getLawsArticleList() {
data.total = result.data.total
for (var i = 0; i < result.data.records.length; i++) {
li = '<li>';
li += '<a href="./flfgxq.html?id='+result.data.records[i].id+'" title="' + result.data.records[i].headline + '" target="_blank">'
li += '<a href="./xyzcxq.html?id='+result.data.records[i].id+'" title="' + result.data.records[i].headline + '" target="_blank">'
li += '<p>' + result.data.records[i].headline + '</p>';
li += '<span>' + result.data.records[i].deadtime + '</span>';
li += '</a>';
......
$(function () {
newsDetail()
})
layui.use('element', function () {
var element = layui.element; //导航的hover效果、二级菜单等功能,需要依赖element模块
//监听导航点击
element.on('nav(demo)', function (elem) {
});
});
// 新闻详情数据
function newsDetail() {
var newsDetail = $("#newsDetail");
newsDetail.empty();
$.ajax({
type: "get", //提交方式
url: portal.api_url + "/hlwj/MhNews/getDetailById",//路径
data: {
"id": GetQueryString('id'),
},
dataType: "json",
//数据,这里使用的是Json格式进行传输
success: function (result) {//返回数据根据结果进行相应的处理
if (result.code == 200 && result.data != null) {
$('.newsTitle').html(result.data.title)
$('.releaseTime').html(result.data.addtime)
$('.source').html(result.data.source)
newsDetail.append(result.data.content)
}
}
});
}
function GetQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return decodeURIComponent(r[2]);
return null;
}
\ No newline at end of file
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>相应政策详情</title>
<script type="text/javascript" src="../staticJs/head.js"></script>
<link rel="stylesheet" type="text/css" href="../staticCss/ggxq.css">
</head>
<body>
<div class="navigation_crumbs">
<div class="contentBox">
<span class="layui-breadcrumb">
<a href="../index.html">首页</a>
<a href="">法律法规</a>
<a><cite>相应政策详情</cite></a>
</span>
</div>
</div>
<div class="mainbody">
<div class="title newsTitle"></div>
<div class="release">
<div class="source"></div>
<div>发布日期:<p class="releaseTime"></p></div>
</div>
<div class="DividingLine"></div>
<div class="notice_content" id="newsDetail">
</div>
</div>
</body>
<script type="text/javascript" src="../staticJs/common.js"></script>
<script type="text/javascript" src="../staticJs/down.js"></script>
<script type="text/javascript" src="../staticJs/xyzcxq.js"></script>
</html>
\ No newline at end of file