style:新闻详情
Showing
3 changed files
with
19 additions
and
15 deletions
... | @@ -17,17 +17,17 @@ document.writeln(" <div class=\'footer\'> "); | ... | @@ -17,17 +17,17 @@ document.writeln(" <div class=\'footer\'> "); |
17 | document.writeln(" <div class=\'system_service\'>"); | 17 | document.writeln(" <div class=\'system_service\'>"); |
18 | document.writeln(" <ul class=\'\'>"); | 18 | document.writeln(" <ul class=\'\'>"); |
19 | document.writeln(" <li>"); | 19 | document.writeln(" <li>"); |
20 | document.writeln(" <a href=\'\' title=\'公示公告\'>"); | 20 | document.writeln(" <a href=\'"+localhostPaht+"/staticViews/gsgg.html\' title=\'公示公告\'>"); |
21 | document.writeln(" <span>公示公告</span>"); | 21 | document.writeln(" <span>公示公告</span>"); |
22 | document.writeln(" </a>"); | 22 | document.writeln(" </a>"); |
23 | document.writeln(" </li>"); | 23 | document.writeln(" </li>"); |
24 | document.writeln(" <li>"); | 24 | document.writeln(" <li>"); |
25 | document.writeln(" <a href=\'\' title=\'法律法规\'>"); | 25 | document.writeln(" <a href=\'"+localhostPaht+"/staticViews/flfg.html\' title=\'法律法规\'>"); |
26 | document.writeln(" <span>法律法规</span>"); | 26 | document.writeln(" <span>法律法规</span>"); |
27 | document.writeln(" </a>"); | 27 | document.writeln(" </a>"); |
28 | document.writeln(" </li>"); | 28 | document.writeln(" </li>"); |
29 | document.writeln(" <li>"); | 29 | document.writeln(" <li>"); |
30 | document.writeln(" <a href=\'\' title=\'相应政策\'>"); | 30 | document.writeln(" <a href=\'"+localhostPaht+"/staticViews/xyzc.html\' title=\'相应政策\'>"); |
31 | document.writeln(" <span>相应政策</span>"); | 31 | document.writeln(" <span>相应政策</span>"); |
32 | document.writeln(" </a>"); | 32 | document.writeln(" </a>"); |
33 | document.writeln(" </li>"); | 33 | document.writeln(" </li>"); | ... | ... |
... | @@ -78,11 +78,13 @@ function HotArticle() { | ... | @@ -78,11 +78,13 @@ function HotArticle() { |
78 | success: function (result) {//返回数据根据结果进行相应的处理 | 78 | success: function (result) {//返回数据根据结果进行相应的处理 |
79 | if (result.code == 200 && result.data != null) { | 79 | if (result.code == 200 && result.data != null) { |
80 | for (var i = 0; i < result.data.length; i++) { | 80 | for (var i = 0; i < result.data.length; i++) { |
81 | li = '<li>'; | 81 | li = '<li class="tj"><a href="./xwxq.html?id='+result.data[i].id+'" target="_blank">'; |
82 | li += '<img src="' + result.data[i].cover + '">'; | 82 | if ( result.data[i].cover ) { |
83 | li += '<h3>'+result.data[i].headline+'</h3>'; | 83 | li += '<img src="' + result.data[i].cover + '">'; |
84 | li += '<p class="recommend_date">'+result.data[i].deadtime+'</p>'; | 84 | } |
85 | li += '</li>'; | 85 | li += '<span class="tj-title">' + result.data[i].headline + '</span>'; |
86 | li += '<span class="tj-date">' + result.data[i].deadtime + '</span>'; | ||
87 | li += '</a></li>'; | ||
86 | news_list_con.append(li); | 88 | news_list_con.append(li); |
87 | } | 89 | } |
88 | } | 90 | } | ... | ... |
... | @@ -2,10 +2,10 @@ $(function () { | ... | @@ -2,10 +2,10 @@ $(function () { |
2 | layui.use('element', function () { | 2 | layui.use('element', function () { |
3 | let element = layui.element; | 3 | let element = layui.element; |
4 | }); | 4 | }); |
5 | addTabs('#zwgk') | 5 | addTabs('#zwgk'); |
6 | getLawsArticleList() | 6 | getLawsArticleList(); |
7 | getPolicyHotArticleList() | 7 | getPolicyHotArticleList(); |
8 | HotArticle() | 8 | HotArticle(); |
9 | }) | 9 | }) |
10 | 10 | ||
11 | // 获取相应政策表数据 | 11 | // 获取相应政策表数据 |
... | @@ -78,11 +78,13 @@ function HotArticle() { | ... | @@ -78,11 +78,13 @@ function HotArticle() { |
78 | success: function (result) {//返回数据根据结果进行相应的处理 | 78 | success: function (result) {//返回数据根据结果进行相应的处理 |
79 | if (result.code == 200 && result.data != null) { | 79 | if (result.code == 200 && result.data != null) { |
80 | for (var i = 0; i < result.data.length; i++) { | 80 | for (var i = 0; i < result.data.length; i++) { |
81 | li = '<li>'; | 81 | li = '<li class="tj"><a href="./xwxq.html?id='+result.data[i].id+'" target="_blank">'; |
82 | li += '<img src="' + result.data[i].cover + '">'; | 82 | if(result.data[i].cover) { |
83 | li += '<img src="' + result.data[i].cover + '">'; | ||
84 | } | ||
83 | li += '<h3>'+result.data[i].headline+'</h3>'; | 85 | li += '<h3>'+result.data[i].headline+'</h3>'; |
84 | li += '<p class="recommend_date">'+result.data[i].deadtime+'</p>'; | 86 | li += '<p class="recommend_date">'+result.data[i].deadtime+'</p>'; |
85 | li += '</li>'; | 87 | li += '</a></li>'; |
86 | news_list_con.append(li); | 88 | news_list_con.append(li); |
87 | } | 89 | } |
88 | } | 90 | } | ... | ... |
-
Please register or sign in to post a comment