3bf69fb8 by 任超

style:办事指南

1 parent 10378774
...@@ -162,6 +162,7 @@ div.navigation { ...@@ -162,6 +162,7 @@ div.navigation {
162 color: #006cff; 162 color: #006cff;
163 font-size: 16px; 163 font-size: 16px;
164 margin-right: 10px; 164 margin-right: 10px;
165 cursor: pointer;
165 } 166 }
166 .download-attachment a:hover { 167 .download-attachment a:hover {
167 color: #006cff; 168 color: #006cff;
......
...@@ -8,7 +8,7 @@ $(function () { ...@@ -8,7 +8,7 @@ $(function () {
8 downLoad() 8 downLoad()
9 }) 9 })
10 function downLoad() { 10 function downLoad() {
11 $('.item_notice a').click(function () { 11 $('.download-attachment a').click(function () {
12 var url = $(this).attr('url') 12 var url = $(this).attr('url')
13 var ua = navigator.userAgent; 13 var ua = navigator.userAgent;
14 if (/chrome/i.test(ua)) { 14 if (/chrome/i.test(ua)) {
......
...@@ -55,7 +55,7 @@ $(function () { ...@@ -55,7 +55,7 @@ $(function () {
55 addTabs('#index'); 55 addTabs('#index');
56 initData(); 56 initData();
57 recentlyDay = getDate(); 57 recentlyDay = getDate();
58 // NewsData(); 58 NewsData();
59 // NoticeData(); 59 // NoticeData();
60 // LawsData(); 60 // LawsData();
61 // policiesData(); 61 // policiesData();
...@@ -74,40 +74,40 @@ function initData() { ...@@ -74,40 +74,40 @@ function initData() {
74 } 74 }
75 //加载新闻数据 75 //加载新闻数据
76 function NewsData() { 76 function NewsData() {
77 var ulNews = $("#ulNews"); 77 // var ulNews = $("#ulNews");
78 ulNews.empty(); 78 // ulNews.empty();
79 var li, publishTime; 79 // var li, publishTime;
80 $.ajax({ 80 // $.ajax({
81 type: "get", //提交方式 81 // type: "get", //提交方式
82 url: portal.api_url + "/portal/MhNews/getNewsList",//路径 82 // url: portal.api_url + "/portal/MhNews/getNewsList",//路径
83 dataType: "json", 83 // dataType: "json",
84 //数据,这里使用的是Json格式进行传输 84 // //数据,这里使用的是Json格式进行传输
85 success: function (result) {//返回数据根据结果进行相应的处理 85 // success: function (result) {//返回数据根据结果进行相应的处理
86 if (result.code == 200 && result.data != null) { 86 // if (result.code == 200 && result.data != null) {
87 if (result.data[0].preViewUrl) { 87 // if (result.data[0].preViewUrl) {
88 $('.news-img img').attr('src', result.data[0].preViewUrl); 88 // $('.news-img img').attr('src', result.data[0].preViewUrl);
89 } else { 89 // } else {
90 $('.news-img img').attr('src', './staticImages/news_demo.jpg'); 90 // $('.news-img img').attr('src', './staticImages/news_demo.jpg');
91 } 91 // }
92 for (var i = 0; i < result.data.length; i++) { 92 // for (var i = 0; i < result.data.length; i++) {
93 if (i == 6) return; 93 // if (i == 6) return;
94 publishTime = CutDate(result.data[i].publishTime); 94 // publishTime = CutDate(result.data[i].publishTime);
95 if (result.data[i].preViewUrl) { 95 // if (result.data[i].preViewUrl) {
96 li = '<li url="' + result.data[i].preViewUrl + '"><a href="./staticViews/news/' + result.data[i].id + '.html" title="' + result.data[i].headline + '" target="_blank">'; 96 // li = '<li url="' + result.data[i].preViewUrl + '"><a href="./staticViews/news/' + result.data[i].id + '.html" title="' + result.data[i].headline + '" target="_blank">';
97 } else { 97 // } else {
98 li = '<li><a href="./staticViews/news/' + result.data[i].id + '.html" title="' + result.data[i].headline + '" target="_blank">'; 98 // li = '<li><a href="./staticViews/news/' + result.data[i].id + '.html" title="' + result.data[i].headline + '" target="_blank">';
99 } 99 // }
100 li += '<div class="news_item">'; 100 // li += '<div class="news_item">';
101 if (recentlyDay.indexOf(publishTime) > -1) { 101 // if (recentlyDay.indexOf(publishTime) > -1) {
102 li += '<svg class="icon svg-icon" aria-hidden="true"> <use xlink:href="#iconzuixin"></use> </svg>'; 102 // li += '<svg class="icon svg-icon" aria-hidden="true"> <use xlink:href="#iconzuixin"></use> </svg>';
103 } 103 // }
104 li += result.data[i].headline + '</div>'; 104 // li += result.data[i].headline + '</div>';
105 li += '<span>' + publishTime + '</span></a></li>'; 105 // li += '<span>' + publishTime + '</span></a></li>';
106 ulNews.append(li); 106 // ulNews.append(li);
107 } 107 // }
108 } 108 // }
109 } 109 // }
110 }); 110 // });
111 111
112 $(document).on("mouseover", "#ulNews li", function (e) { 112 $(document).on("mouseover", "#ulNews li", function (e) {
113 if ($(this).attr('url')) { 113 if ($(this).attr('url')) {
......