style:公告详情
Showing
7 changed files
with
102 additions
and
26 deletions
| ... | @@ -227,7 +227,7 @@ div.subject { | ... | @@ -227,7 +227,7 @@ div.subject { |
| 227 | 227 | ||
| 228 | .right-body { | 228 | .right-body { |
| 229 | display: inline-block; | 229 | display: inline-block; |
| 230 | margin-bottom: 20px; | 230 | margin-bottom: 30px; |
| 231 | } | 231 | } |
| 232 | 232 | ||
| 233 | 233 | ||
| ... | @@ -262,6 +262,7 @@ div.subject { | ... | @@ -262,6 +262,7 @@ div.subject { |
| 262 | 262 | ||
| 263 | .right-bottom { | 263 | .right-bottom { |
| 264 | border-top: 1px solid #DEDEDE; | 264 | border-top: 1px solid #DEDEDE; |
| 265 | padding-top: 10px; | ||
| 265 | } | 266 | } |
| 266 | 267 | ||
| 267 | .right-bottom-top { | 268 | .right-bottom-top { | ... | ... |
| ... | @@ -626,7 +626,7 @@ div.navigation { | ... | @@ -626,7 +626,7 @@ div.navigation { |
| 626 | 626 | ||
| 627 | .right-body { | 627 | .right-body { |
| 628 | display: inline-block; | 628 | display: inline-block; |
| 629 | margin-bottom: 20px; | 629 | margin-bottom: 30px; |
| 630 | } | 630 | } |
| 631 | 631 | ||
| 632 | /* .tj { | 632 | /* .tj { |
| ... | @@ -641,8 +641,10 @@ div.navigation { | ... | @@ -641,8 +641,10 @@ div.navigation { |
| 641 | } | 641 | } |
| 642 | 642 | ||
| 643 | .tj img, .tj span { | 643 | .tj img, .tj span { |
| 644 | float: left; | ||
| 645 | color: #4A4A4A; | 644 | color: #4A4A4A; |
| 645 | display: block; | ||
| 646 | width: 100%; | ||
| 647 | margin-top: 7px; | ||
| 646 | } | 648 | } |
| 647 | 649 | ||
| 648 | .tj-title { | 650 | .tj-title { |
| ... | @@ -658,13 +660,13 @@ div.navigation { | ... | @@ -658,13 +660,13 @@ div.navigation { |
| 658 | height: 14px; | 660 | height: 14px; |
| 659 | font-size: 14px; | 661 | font-size: 14px; |
| 660 | font-weight: 400; | 662 | font-weight: 400; |
| 661 | color: #9B9B9B; | 663 | color: #9B9B9B!important; |
| 662 | line-height: 16px; | 664 | line-height: 16px; |
| 663 | } | 665 | } |
| 664 | 666 | ||
| 665 | .right-bottom { | 667 | .right-bottom { |
| 666 | border-top-style: inset; | ||
| 667 | border-top: 1px solid #DEDEDE; | 668 | border-top: 1px solid #DEDEDE; |
| 669 | padding-top: 10px; | ||
| 668 | } | 670 | } |
| 669 | 671 | ||
| 670 | .right-bottom-top { | 672 | .right-bottom-top { |
| ... | @@ -692,7 +694,7 @@ div.navigation { | ... | @@ -692,7 +694,7 @@ div.navigation { |
| 692 | font-size: 14px; | 694 | font-size: 14px; |
| 693 | font-weight: bold; | 695 | font-weight: bold; |
| 694 | color: #4A4A4A; | 696 | color: #4A4A4A; |
| 695 | line-height: 14px; | 697 | line-height: 20px; |
| 696 | } | 698 | } |
| 697 | 699 | ||
| 698 | .zcfg-body { | 700 | .zcfg-body { |
| ... | @@ -705,12 +707,12 @@ div.navigation { | ... | @@ -705,12 +707,12 @@ div.navigation { |
| 705 | } | 707 | } |
| 706 | 708 | ||
| 707 | .zcfg-bottom { | 709 | .zcfg-bottom { |
| 708 | width: 90px; | 710 | width: 100%; |
| 709 | height: 12px; | 711 | height: 12px; |
| 710 | font-size: 12px; | 712 | font-size: 12px; |
| 711 | font-weight: 400; | 713 | font-weight: 400; |
| 712 | color: #9B9B9B; | 714 | color: #9B9B9B; |
| 713 | line-height: 12px; | 715 | margin-top: 10px; |
| 714 | } | 716 | } |
| 715 | 717 | ||
| 716 | /* -----------------底部start----------------------------- */ | 718 | /* -----------------底部start----------------------------- */ | ... | ... |
| ... | @@ -18,14 +18,30 @@ $(function () { | ... | @@ -18,14 +18,30 @@ $(function () { |
| 18 | PolicyHotArticle() | 18 | PolicyHotArticle() |
| 19 | }) | 19 | }) |
| 20 | 20 | ||
| 21 | // 选项卡切换数据 | ||
| 22 | layui.use('element', function(){ | ||
| 23 | var element = layui.element; | ||
| 24 | //监听Tab切换,以改变地址hash值 | ||
| 25 | element.on('tab(tabNav)', function(){ | ||
| 26 | data.noticeType = this.getAttribute('lay-id') | ||
| 27 | if(this.getAttribute('lay-id') ==0 ) { | ||
| 28 | data.noticeType = undefined | ||
| 29 | } | ||
| 30 | initData() | ||
| 31 | }); | ||
| 32 | }); | ||
| 33 | |||
| 34 | |||
| 35 | |||
| 21 | //门户公示公告列表 | 36 | //门户公示公告列表 |
| 22 | function initData(currentPage=1) { | 37 | function initData() { |
| 23 | $.ajax({ | 38 | $.ajax({ |
| 24 | type: "get", //提交方式 | 39 | type: "get", //提交方式 |
| 25 | url: portal.api_url + "/hlwj/MhNotice/getNoticeList",//路径 | 40 | url: portal.api_url + "/hlwj/MhNotice/getNoticeList",//路径 |
| 26 | data: { | 41 | data: { |
| 27 | "currentPage": currentPage, | 42 | "currentPage": data.currentPage, |
| 28 | "pageSize": data.limit | 43 | "pageSize": data.limit, |
| 44 | "noticeType": data.noticeType | ||
| 29 | }, | 45 | }, |
| 30 | dataType: "json", | 46 | dataType: "json", |
| 31 | async: false, | 47 | async: false, |
| ... | @@ -60,7 +76,6 @@ function HotArticle() { | ... | @@ -60,7 +76,6 @@ function HotArticle() { |
| 60 | //数据,这里使用的是Json格式进行传输 | 76 | //数据,这里使用的是Json格式进行传输 |
| 61 | success: function (result) {//返回数据根据结果进行相应的处理 | 77 | success: function (result) {//返回数据根据结果进行相应的处理 |
| 62 | if (result.code == 200 && result.data != null) { | 78 | if (result.code == 200 && result.data != null) { |
| 63 | console.log(result.data) | ||
| 64 | for (var i = 0; i < result.data.length; i++) { | 79 | for (var i = 0; i < result.data.length; i++) { |
| 65 | li = '<li class="tj">'; | 80 | li = '<li class="tj">'; |
| 66 | li += '<img src="' + result.data[i].cover + '">'; | 81 | li += '<img src="' + result.data[i].cover + '">'; |
| ... | @@ -110,7 +125,8 @@ layui.use('laypage', function () { | ... | @@ -110,7 +125,8 @@ layui.use('laypage', function () { |
| 110 | , next: '>' | 125 | , next: '>' |
| 111 | , theme: '#0091FF' | 126 | , theme: '#0091FF' |
| 112 | , jump: function (obj, first) { | 127 | , jump: function (obj, first) { |
| 113 | initData(obj.curr); | 128 | data.currentPage = obj.curr |
| 129 | initData(); | ||
| 114 | } | 130 | } |
| 115 | }); | 131 | }); |
| 116 | }); | 132 | }); |
| ... | @@ -118,5 +134,7 @@ layui.use('laypage', function () { | ... | @@ -118,5 +134,7 @@ layui.use('laypage', function () { |
| 118 | var data = { //数据 | 134 | var data = { //数据 |
| 119 | "list": [], | 135 | "list": [], |
| 120 | limit: 10, | 136 | limit: 10, |
| 121 | total: undefined | 137 | total: undefined, |
| 138 | currentPage: 1, | ||
| 139 | noticeType: undefined | ||
| 122 | }; | 140 | }; |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -9,6 +9,8 @@ $(function () { | ... | @@ -9,6 +9,8 @@ $(function () { |
| 9 | $('.date div:nth-child(2)').text(month + 1 + "/" + date) | 9 | $('.date div:nth-child(2)').text(month + 1 + "/" + date) |
| 10 | $('.date div:last-child').text(hour + ":" + minutes) | 10 | $('.date div:last-child').text(hour + ":" + minutes) |
| 11 | LawsData() | 11 | LawsData() |
| 12 | HotArticle(); | ||
| 13 | PolicyHotArticle(); | ||
| 12 | }) | 14 | }) |
| 13 | // 新闻详情数据 | 15 | // 新闻详情数据 |
| 14 | function LawsData() { | 16 | function LawsData() { |
| ... | @@ -32,6 +34,60 @@ function LawsData() { | ... | @@ -32,6 +34,60 @@ function LawsData() { |
| 32 | } | 34 | } |
| 33 | }); | 35 | }); |
| 34 | } | 36 | } |
| 37 | |||
| 38 | // 获取新闻动态的推荐数据 | ||
| 39 | function HotArticle() { | ||
| 40 | var recommend = $("#news_recommendation"); | ||
| 41 | recommend.empty(); | ||
| 42 | var li = ''; | ||
| 43 | $.ajax({ | ||
| 44 | type: "get", //提交方式 | ||
| 45 | url: portal.api_url + "/hlwj/MhNews/getNewsHotArticleList",//路径 | ||
| 46 | dataType: "json", | ||
| 47 | async: false, | ||
| 48 | //数据,这里使用的是Json格式进行传输 | ||
| 49 | success: function (result) {//返回数据根据结果进行相应的处理 | ||
| 50 | if (result.code == 200 && result.data != null) { | ||
| 51 | console.log(result.data) | ||
| 52 | for (var i = 0; i < result.data.length; i++) { | ||
| 53 | li = '<li class="tj">'; | ||
| 54 | li += '<img src="' + result.data[i].cover + '">'; | ||
| 55 | li += '<span class="tj-title">'+result.data[i].headline+'</span>'; | ||
| 56 | li += '<span class="tj-date">'+result.data[i].deadtime+'</span>'; | ||
| 57 | li += '</li>'; | ||
| 58 | recommend.append(li); | ||
| 59 | } | ||
| 60 | } | ||
| 61 | } | ||
| 62 | }) | ||
| 63 | } | ||
| 64 | // 政策法规推荐 | ||
| 65 | function PolicyHotArticle() { | ||
| 66 | var regulation = $("#regulation"); | ||
| 67 | regulation.empty(); | ||
| 68 | var li = ''; | ||
| 69 | $.ajax({ | ||
| 70 | type: "get", //提交方式 | ||
| 71 | url: portal.api_url + "/hlwj/MhPolicy/getPolicyHotArticleList",//路径 | ||
| 72 | dataType: "json", | ||
| 73 | async: false, | ||
| 74 | //数据,这里使用的是Json格式进行传输 | ||
| 75 | success: function (result) {//返回数据根据结果进行相应的处理 | ||
| 76 | if (result.code == 200 && result.data != null) { | ||
| 77 | console.log(result.data) | ||
| 78 | for (var i = 0; i < result.data.length; i++) { | ||
| 79 | li = '<li class="zcfg">' | ||
| 80 | li += '<div class="zcfg-top">'+result.data[i].headline+'</div>' | ||
| 81 | li += '<p class="zcfg-body">'+result.data[i].summary+'</p>' | ||
| 82 | li += '<div class="zcfg-bottom">'+result.data[i].deadtime+'</div>' | ||
| 83 | li += '</li>' | ||
| 84 | regulation.append(li); | ||
| 85 | } | ||
| 86 | } | ||
| 87 | } | ||
| 88 | }) | ||
| 89 | } | ||
| 90 | |||
| 35 | $(window).scroll(function () { | 91 | $(window).scroll(function () { |
| 36 | let juli = $(document).scrollTop(); | 92 | let juli = $(document).scrollTop(); |
| 37 | if (juli > 360) { | 93 | if (juli > 360) { | ... | ... |
| ... | @@ -33,11 +33,11 @@ | ... | @@ -33,11 +33,11 @@ |
| 33 | </button> | 33 | </button> |
| 34 | </div> | 34 | </div> |
| 35 | </div> | 35 | </div> |
| 36 | <div class="layui-tab layui-tab-brief" lay-filter=""> | 36 | <div class="layui-tab layui-tab-brief" lay-filter="tabNav"> |
| 37 | <ul class="layui-tab-title"> | 37 | <ul class="layui-tab-title"> |
| 38 | <li class="layui-this">全部</li> | 38 | <li class="layui-this" lay-id="0">全部</li> |
| 39 | <li>公示</li> | 39 | <li lay-id="1">公示</li> |
| 40 | <li>公告</li> | 40 | <li lay-id="2">公告</li> |
| 41 | </ul> | 41 | </ul> |
| 42 | </div> | 42 | </div> |
| 43 | <!-- 列表区域 --> | 43 | <!-- 列表区域 --> | ... | ... |
| ... | @@ -9,7 +9,6 @@ | ... | @@ -9,7 +9,6 @@ |
| 9 | <script type="text/javascript" src="../staticJs/head.js"></script> | 9 | <script type="text/javascript" src="../staticJs/head.js"></script> |
| 10 | <link rel="stylesheet" type="text/css" href="../staticCss/xwdt.css"> | 10 | <link rel="stylesheet" type="text/css" href="../staticCss/xwdt.css"> |
| 11 | </head> | 11 | </head> |
| 12 | |||
| 13 | <body> | 12 | <body> |
| 14 | <div class="navigation_crumbs"> | 13 | <div class="navigation_crumbs"> |
| 15 | <div class="contentBox"> | 14 | <div class="contentBox"> |
| ... | @@ -36,8 +35,7 @@ | ... | @@ -36,8 +35,7 @@ |
| 36 | <div class="right-bottom-top"> | 35 | <div class="right-bottom-top"> |
| 37 | <span>政策法规推荐</span> | 36 | <span>政策法规推荐</span> |
| 38 | </div> | 37 | </div> |
| 39 | <div id="regulation"> | 38 | <div id="regulation"></div> |
| 40 | </div> | ||
| 41 | </ul> | 39 | </ul> |
| 42 | </div> | 40 | </div> |
| 43 | </div> | 41 | </div> | ... | ... |
| ... | @@ -203,8 +203,8 @@ | ... | @@ -203,8 +203,8 @@ |
| 203 | <div class="right-top"> | 203 | <div class="right-top"> |
| 204 | <h2 class="xwtjtitle">新闻推荐</h2> | 204 | <h2 class="xwtjtitle">新闻推荐</h2> |
| 205 | </div> | 205 | </div> |
| 206 | <div class="right-body"> | 206 | <div class="right-body" id="news_recommendation"> |
| 207 | <div class="tj"> | 207 | <!-- <div class="tj"> |
| 208 | <img | 208 | <img |
| 209 | src="https://dss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1938529415,777611275&fm=26&gp=0.jpg"> | 209 | src="https://dss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1938529415,777611275&fm=26&gp=0.jpg"> |
| 210 | <span class="tj-title"> | 210 | <span class="tj-title"> |
| ... | @@ -223,13 +223,14 @@ | ... | @@ -223,13 +223,14 @@ |
| 223 | <span class="tj-date"> | 223 | <span class="tj-date"> |
| 224 | 2020-12-12 | 224 | 2020-12-12 |
| 225 | </span> | 225 | </span> |
| 226 | </div> | 226 | </div> --> |
| 227 | </div> | 227 | </div> |
| 228 | <div class="right-bottom"> | 228 | <div class="right-bottom"> |
| 229 | <div class="right-bottom-top"> | 229 | <div class="right-bottom-top"> |
| 230 | <span>政策法规推荐</span> | 230 | <span>政策法规推荐</span> |
| 231 | </div> | 231 | </div> |
| 232 | <div class="zcfg"> | 232 | <div id="regulation"></div> |
| 233 | <!-- <div class="zcfg"> | ||
| 233 | <div class="zcfg-top"> | 234 | <div class="zcfg-top"> |
| 234 | <span>爬山虎国土空间规划信息化解决</span> | 235 | <span>爬山虎国土空间规划信息化解决</span> |
| 235 | </div> | 236 | </div> |
| ... | @@ -250,7 +251,7 @@ | ... | @@ -250,7 +251,7 @@ |
| 250 | <div class="zcfg-bottom"> | 251 | <div class="zcfg-bottom"> |
| 251 | <span>2020-10-28</span> | 252 | <span>2020-10-28</span> |
| 252 | </div> | 253 | </div> |
| 253 | </div> | 254 | </div> --> |
| 254 | </div> | 255 | </div> |
| 255 | </div> | 256 | </div> |
| 256 | </div> | 257 | </div> | ... | ... |
-
Please register or sign in to post a comment