style:新闻动态
Showing
3 changed files
with
64 additions
and
49 deletions
| ... | @@ -238,7 +238,9 @@ div.subject { | ... | @@ -238,7 +238,9 @@ div.subject { |
| 238 | } | 238 | } |
| 239 | 239 | ||
| 240 | .tj img, .tj span { | 240 | .tj img, .tj span { |
| 241 | float: left; | 241 | width: 100%; |
| 242 | display: block; | ||
| 243 | margin-top: 5px; | ||
| 242 | } | 244 | } |
| 243 | 245 | ||
| 244 | .tj-title { | 246 | .tj-title { |
| ... | @@ -273,7 +275,7 @@ div.subject { | ... | @@ -273,7 +275,7 @@ div.subject { |
| 273 | } | 275 | } |
| 274 | 276 | ||
| 275 | .zcfg { | 277 | .zcfg { |
| 276 | margin-top: 20px; | 278 | margin-top: 15px; |
| 277 | display: inline-block; | 279 | display: inline-block; |
| 278 | cursor: pointer; | 280 | cursor: pointer; |
| 279 | } | 281 | } |
| ... | @@ -288,7 +290,7 @@ div.subject { | ... | @@ -288,7 +290,7 @@ div.subject { |
| 288 | font-size: 14px; | 290 | font-size: 14px; |
| 289 | font-weight: bold; | 291 | font-weight: bold; |
| 290 | color: #686666; | 292 | color: #686666; |
| 291 | line-height: 14px; | 293 | line-height: 20px; |
| 292 | } | 294 | } |
| 293 | 295 | ||
| 294 | .zcfg-body { | 296 | .zcfg-body { |
| ... | @@ -298,14 +300,17 @@ div.subject { | ... | @@ -298,14 +300,17 @@ div.subject { |
| 298 | font-weight: 400; | 300 | font-weight: 400; |
| 299 | color: #6D7278; | 301 | color: #6D7278; |
| 300 | line-height: 23px; | 302 | line-height: 23px; |
| 301 | margin: 10px 0; | 303 | margin-top: 25px; |
| 302 | } | 304 | } |
| 303 | 305 | ||
| 304 | .zcfg-bottom { | 306 | .zcfg-bottom { |
| 305 | width: 90px; | 307 | width: 100%; |
| 306 | height: 12px; | ||
| 307 | font-size: 12px; | 308 | font-size: 12px; |
| 308 | font-weight: 400; | 309 | font-weight: 400; |
| 309 | color: #9B9B9B; | 310 | color: #9B9B9B; |
| 310 | line-height: 12px; | 311 | line-height: 16px; |
| 312 | margin-top: 3px; | ||
| 311 | } | 313 | } |
| 314 | #regulation { | ||
| 315 | line-height: 0; | ||
| 316 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -9,6 +9,7 @@ $(function () { | ... | @@ -9,6 +9,7 @@ $(function () { |
| 9 | }); | 9 | }); |
| 10 | LoadNewsData(); | 10 | LoadNewsData(); |
| 11 | HotArticle(); | 11 | HotArticle(); |
| 12 | PolicyHotArticle(); | ||
| 12 | addTabs('#news'); | 13 | addTabs('#news'); |
| 13 | }); | 14 | }); |
| 14 | //加载新闻列表数据 | 15 | //加载新闻列表数据 |
| ... | @@ -65,6 +66,33 @@ function HotArticle() { | ... | @@ -65,6 +66,33 @@ function HotArticle() { |
| 65 | } | 66 | } |
| 66 | }) | 67 | }) |
| 67 | } | 68 | } |
| 69 | // 政策法规推荐 | ||
| 70 | function PolicyHotArticle() { | ||
| 71 | var regulation = $("#regulation"); | ||
| 72 | regulation.empty(); | ||
| 73 | var li = ''; | ||
| 74 | $.ajax({ | ||
| 75 | type: "get", //提交方式 | ||
| 76 | url: portal.api_url + "/hlwj/MhPolicy/getPolicyHotArticleList",//路径 | ||
| 77 | dataType: "json", | ||
| 78 | async: false, | ||
| 79 | //数据,这里使用的是Json格式进行传输 | ||
| 80 | success: function (result) {//返回数据根据结果进行相应的处理 | ||
| 81 | if (result.code == 200 && result.data != null) { | ||
| 82 | console.log(result.data) | ||
| 83 | for (var i = 0; i < result.data.length; i++) { | ||
| 84 | li = '<li class="zcfg">' | ||
| 85 | li += '<div class="zcfg-top">'+result.data[i].headline+'</div>' | ||
| 86 | li += '<p class="zcfg-body">'+result.data[i].content+'</p>' | ||
| 87 | li += '<div class="zcfg-bottom">'+result.data[i].deadtime+'</div>' | ||
| 88 | li += '</li>' | ||
| 89 | regulation.append(li); | ||
| 90 | } | ||
| 91 | } | ||
| 92 | } | ||
| 93 | }) | ||
| 94 | } | ||
| 95 | |||
| 68 | 96 | ||
| 69 | layui.use('laypage', function () { | 97 | layui.use('laypage', function () { |
| 70 | let laypage = layui.laypage; | 98 | let laypage = layui.laypage; | ... | ... |
| ... | @@ -31,53 +31,35 @@ | ... | @@ -31,53 +31,35 @@ |
| 31 | <h2>新闻推荐</h2> | 31 | <h2>新闻推荐</h2> |
| 32 | </div> | 32 | </div> |
| 33 | <ul class="right-body" id="news_recommendation"> | 33 | <ul class="right-body" id="news_recommendation"> |
| 34 | <!-- <li class="tj"> | ||
| 35 | <img | ||
| 36 | src="https://dss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1938529415,777611275&fm=26&gp=0.jpg"> | ||
| 37 | <span class="tj-title"> | ||
| 38 | 爬山虎国土空间信息化解决方案 | ||
| 39 | </span> | ||
| 40 | <span class="tj-date"> | ||
| 41 | 2020-12-12 | ||
| 42 | </span> | ||
| 43 | </li> | ||
| 44 | <li class="tj"> | ||
| 45 | <img | ||
| 46 | src="https://dss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1938529415,777611275&fm=26&gp=0.jpg"> | ||
| 47 | <span class="tj-title"> | ||
| 48 | 爬山虎国土空间信息化解决方案 | ||
| 49 | </span> | ||
| 50 | <span class="tj-date"> | ||
| 51 | 2020-12-12 | ||
| 52 | </span> | ||
| 53 | </li> --> | ||
| 54 | </ul> | 34 | </ul> |
| 55 | <ul class="right-bottom"> | 35 | <ul class="right-bottom"> |
| 56 | <div class="right-bottom-top"> | 36 | <div class="right-bottom-top"> |
| 57 | <span>政策法规推荐</span> | 37 | <span>政策法规推荐</span> |
| 58 | </div> | 38 | </div> |
| 59 | <li class="zcfg"> | 39 | <div id="regulation"> |
| 60 | <div class="zcfg-top"> | 40 | <li class="zcfg"> |
| 61 | <span>爬山虎国土空间规划信息化解决</span> | 41 | <div class="zcfg-top"> |
| 62 | </div> | 42 | 爬山虎国土空间规划信息化解决 |
| 63 | <div class="zcfg-body"> | 43 | </div> |
| 64 | <span>10月21日,农业农村部举行新闻发布会,介绍2020年前三季度农业农村经济形势。</span> | 44 | <div class="zcfg-body"> |
| 65 | </div> | 45 | 10月21日,农业农村部举行新闻发布会,介绍2020年前三季度农业农村经济形势。 |
| 66 | <div class="zcfg-bottom"> | 46 | </div> |
| 67 | <span>2020-10-28</span> | 47 | <div class="zcfg-bottom"> |
| 68 | </div> | 48 | 2020-10-28 |
| 69 | </li> | 49 | </div> |
| 70 | <li class="zcfg"> | 50 | </li> |
| 71 | <div class="zcfg-top"> | 51 | <li class="zcfg"> |
| 72 | <span>爬山虎国土空间规划信息化解决</span> | 52 | <div class="zcfg-top"> |
| 73 | </div> | 53 | 爬山虎国土空间规划信息化解决 |
| 74 | <div class="zcfg-body"> | 54 | </div> |
| 75 | <span>10月21日,农业农村部举行新闻发布会,介绍2020年前三季度农业农村经济形势。</span> | 55 | <div class="zcfg-body"> |
| 76 | </div> | 56 | 10月21日,农业农村部举行新闻发布会,介绍2020年前三季度农业农村经济形势 |
| 77 | <div class="zcfg-bottom"> | 57 | </div> |
| 78 | <span>2020-10-28</span> | 58 | <div class="zcfg-bottom"> |
| 79 | </div> | 59 | 2020-10-28 |
| 80 | </li> | 60 | </div> |
| 61 | </li> | ||
| 62 | </div> | ||
| 81 | </ul> | 63 | </ul> |
| 82 | </div> | 64 | </div> |
| 83 | </div> | 65 | </div> | ... | ... |
-
Please register or sign in to post a comment