Browse Source

发现接口调整

luyanan 7 years ago
parent
commit
ee34e7e7b8
4 changed files with 55 additions and 37 deletions
  1. 12 6
      css/genindex.css
  2. 1 1
      css/share.css
  3. 1 1
      discover.html
  4. 41 29
      js/discover.js

+ 12 - 6
css/genindex.css

389
.showDetail .h2Font{font-size:14px;color:#999;}
389
.showDetail .h2Font{font-size:14px;color:#999;}
390
.showDetail .readNum{margin-left: 20px;}
390
.showDetail .readNum{margin-left: 20px;}
391
.showDetail .showBigOpen{width:100%;height:300px;margin:24px 0;background-position:center;background-size:cover;background-repeat:no-repeat;}
391
.showDetail .showBigOpen{width:100%;height:300px;margin:24px 0;background-position:center;background-size:cover;background-repeat:no-repeat;}
392
.showMain{font-size:16px;color:#333;line-height: 30px;}
392
.showMain{font-size:16px;color:#333;line-height:28px;}
393
.showMain img{max-width: 100%;}
393
.showMain img{max-width: 100%;}
394
.showMain p{margin-bottom:10px;text-align:justify}
394
.showMain p{margin-bottom:16px;text-align:justify}
395
ul.tagList{margin:20px 0 -10px;overflow: hidden;}
395
ul.tagList{margin:20px 0 -10px;overflow: hidden;}
396
ul.tagList>li{float: left;margin-right:10px;margin-bottom:10px;padding:0 12px;color: #999;border: 1px solid #E5E5E5;border-radius: 20px;cursor: pointer;}
396
ul.tagList>li{float: left;margin-right:10px;margin-bottom:10px;padding:0 12px;color: #999;border: 1px solid #E5E5E5;border-radius: 20px;cursor: pointer;}
397
ul.tagList>li .h2Font{color:#666}
397
ul.tagList>li .h2Font{color:#666}
674
/*统计数据*/
674
/*统计数据*/
675
.statisticsBox{}
675
.statisticsBox{}
676
.statisticsBox span{font-size: 20px;color:#333}
676
.statisticsBox span{font-size: 20px;color:#333}
677
.statisticsBox p{font-size: 14px;color:#999}
678
.goarrow{font-size:16px;display:inline-block;color: #ff9900;margin:10px 0 0;padding:0 6px;position: relative;}
677
.statisticsBox p{font-size: 14px;color:#999;margin-bottom:10px;}
678
.goarrow{font-size:16px;display:inline-block;color: #ff9900;padding:0 6px;position: relative;}
679
.goarrow em{position:absolute;right:0;top:-15px;}
679
.goarrow em{position:absolute;right:0;top:-15px;}
680
.goarrow em:before{border: solid transparent;border-left-color: #ff9900;border-width:8px;content: " ";position: absolute;left: 100%;top: 18px;}
680
.goarrow em:before{border: solid transparent;border-left-color: #ff9900;border-width:8px;content: " ";position: absolute;left: 100%;top: 18px;}
681
.goarrow em:after{border: solid transparent;border-left-color:#fff;border-width:6px;content: " ";position: absolute;left: 100%;top: 20px;}
681
.goarrow em:after{border: solid transparent;border-left-color:#fff;border-width:6px;content: " ";position: absolute;left: 100%;top: 20px;}
682
682
683
/*相关信息*/
683
/*相关信息*/
684
.leftconItem{display: none;padding-bottom: 40px;}
684
.leftconItem{display: none;}
685
.leftconItem:first-child{display: block;}
685
.leftconItem:first-child{display: block;}
686
.coninfobox{padding:30px 30px 0;background: #FFF;}
686
.coninfobox{padding:30px 30px 0;background: #FFF;}
687
.coninfobox .coninfotit{position:relative;font-size: 18px;color:#666;margin-bottom:10px;}
687
.coninfobox .coninfotit{position:relative;font-size: 18px;color:#666;margin-bottom:10px;}
814
.aboutPa .form-result ul.authorBox>li>a{max-width:80%;}
814
.aboutPa .form-result ul.authorBox>li>a{max-width:80%;}
815
815
816
/*--------------新版需求相关--------------*/
816
/*--------------新版需求相关--------------*/
817
.needinfobox.coninfobox{border-bottom:20px solid #F4F6F8;padding-bottom: 30px;}
817
.needList.form-item .madiaInfo{padding-left:0;}
818
.needList.form-item .madiaInfo{padding-left:0;}
818
.needList.form-item ul .h1Font{font-size: 18px;margin-bottom: 10px;}
819
.needList.form-item>ul .h1Font{font-size: 18px;margin-bottom: 10px;}
820
.needList.form-item>ul .h2Font{font-size: 14px;line-height:24px;margin: 10px 0;}
821
.needList.form-item>ul .h3Font{font-size: 14px;color:#999;}
822
.needList.form-item>ul>li{padding:10px 30px;margin:0 -30px;}
823
.needList.form-item>ul>li:hover{background: #EEEEEE;}
824
.needList.form-item ul .showli>li{margin: 6px 0;width:25%;padding-right:16px;float:left;text-overflow:ellipsis;white-space: nowrap;overflow: hidden;}

+ 1 - 1
css/share.css

77
.showDetail .h3Font{font-size:13px;color:#999; line-height:24px;}
77
.showDetail .h3Font{font-size:13px;color:#999; line-height:24px;}
78
.showDetail .showMain{font-size:15px;color:#333;line-height:28px;}
78
.showDetail .showMain{font-size:15px;color:#333;line-height:28px;}
79
.showDetail .showMain img{max-width: 100%;}
79
.showDetail .showMain img{max-width: 100%;}
80
.showDetail .showMain p{margin-bottom:10px;font-size:15px;color:#333;text-align:justify}
80
.showDetail .showMain p{margin-bottom:16px;font-size:15px;color:#333;text-align:justify}
81
ul.tagList{padding:0;margin:18px 0 8px;overflow: hidden;}
81
ul.tagList{padding:0;margin:18px 0 8px;overflow: hidden;}
82
ul.tagList>li{list-style:none;float: left;margin-right:10px;margin-bottom:10px;padding:4px 12px;color: #666;background:#EFEFEF;}
82
ul.tagList>li{list-style:none;float: left;margin-right:10px;margin-bottom:10px;padding:4px 12px;color: #666;background:#EFEFEF;}
83
ul.tagList>li .h2Font{color: #666;}
83
ul.tagList>li .h2Font{color: #666;}

+ 1 - 1
discover.html

16
<header id="header">
16
<header id="header">
17
	<script src="js/header.js"></script>
17
	<script src="js/header.js"></script>
18
</header>
18
</header>
19
<div id="container">
19
<div id="container" style="margin-top:-20px;">
20
	<div class="containerCon">
20
	<div class="containerCon">
21
		<div class="contentCon clearfix">
21
		<div class="contentCon clearfix">
22
			<div class="leftconBox floatL" style="background: #f4f6f8;">
22
			<div class="leftconBox floatL" style="background: #f4f6f8;">

+ 41 - 29
js/discover.js

3
	$(".headnav li").eq(1).addClass("navcurrent");
3
	$(".headnav li").eq(1).addClass("navcurrent");
4
	loginStatus();//判断个人是否登录
4
	loginStatus();//判断个人是否登录
5
	var userid = $.cookie("userid");
5
	var userid = $.cookie("userid");
6
	importNews();
6
	var exculdeIds=[];
7
	var exculdeId2s=[];
8
	//轮播加载页面
9
	$.ajax({
10
		"url":"/data/inc/col_banner.html",
11
		"dataType":"html",
12
		"success":function(result){
13
			$(".slide-box").html(result);
14
			bannerRotate.bannerInit();// 轮播
15
			for(var i=0;i<5;i++){
16
				var dataId=$(".slide-item").eq(i).attr("data-id");
17
				exculdeIds.push(dataId);
18
				exculdeId2s.push(dataId);
19
			}
20
			$(".slide-list").on("click",".slide-item",function(){
21
				var columId=$(this).attr("data-col");
22
				$.ajax({
23
					"url":"/ajax/operation/statist/bannerClick",
24
					"type":"POST" ,
25
					"dataType":"json",
26
					"data":{"id":columId},
27
					"success" : function(data) {
28
						console.log(data)
29
					}
30
				})
31
			})
32
		}
33
	})
34
	importNews(exculdeIds);
7
	hotNews();
35
	hotNews();
8
	var linkNum=0;//栏目类别导航
36
	var linkNum=0;//栏目类别导航
9
	if(linkNum==0){
37
	if(linkNum==0){
10
		listShow(1,0,true);
38
		listShow(exculdeId2s,1,0,true);
11
	}
39
	}
12
	$(document).bind("click",function(e){ 
40
	$(document).bind("click",function(e){ 
13
		var target = $(e.target); 
41
		var target = $(e.target); 
41
				$(".rightbtn").removeClass("table-tab-slide-active");
69
				$(".rightbtn").removeClass("table-tab-slide-active");
42
			}
70
			}
43
			if(linkNum==0){
71
			if(linkNum==0){
44
				listShow(1,0,true);
72
				listShow(exculdeId2s,1,0,true);
45
			}else{
73
			}else{
46
				var thisNum=linkNum+2;
74
				var thisNum=linkNum+2;
47
				listShow(1,thisNum,true);
75
				listShow(exculdeIds,1,thisNum,true);
48
			}
76
			}
49
		}else{
77
		}else{
50
			$(this).find(".table-drop").show();
78
			$(this).find(".table-drop").show();
51
		}
79
		}
52
	})
80
	})
53
	
81
	
54
	//轮播加载页面
55
	$.ajax({
56
		"url":"/data/inc/col_banner.html",
57
		"dataType":"html",
58
		"success":function(result){
59
			$(".slide-box").html(result);
60
			bannerRotate.bannerInit();// 轮播
61
			$(".slide-list").on("click",".slide-item",function(){
62
				var columId=$(this).attr("data-col");
63
				$.ajax({
64
					"url":"/ajax/operation/statist/bannerClick",
65
					"type":"POST" ,
66
					"dataType":"json",
67
					"data":{"id":columId},
68
					"success" : function(data) {
69
						console.log(data)
70
					}
71
				})
72
			})
73
		}
74
	
75
	})
76
	//重大新闻
82
	//重大新闻
77
	function importNews() {
83
	function importNews(obj) {
78
		$.ajax({
84
		$.ajax({
79
			"url" :"/ajax/article/find",
85
			"url" :"/ajax/article/find",
80
			"type" :  "GET" ,
86
			"type" :  "GET" ,
81
			"dataType" : "json",
87
			"dataType" : "json",
88
			"async":false,
82
			"data" :{
89
			"data" :{
90
				"traditional": true,
91
				"exclude":obj,
83
				"col":9,//重大新闻
92
				"col":9,//重大新闻
84
				"pageSize":5,
93
				"pageSize":5,
85
				"pageNo":1
94
				"pageNo":1
96
							var str='<a href="articalShow.html?articleId='+$data[i].articleId+'"><p class="h2Font ellipsisSty-2"><em class="circlePre"></em>'+$data[i].articleTitle+'</p>'+
105
							var str='<a href="articalShow.html?articleId='+$data[i].articleId+'"><p class="h2Font ellipsisSty-2"><em class="circlePre"></em>'+$data[i].articleTitle+'</p>'+
97
								'<span class="smalltip">'+commenTime($data[i].publishTime)+'</span></a></li>'
106
								'<span class="smalltip">'+commenTime($data[i].publishTime)+'</span></a></li>'
98
							$(str).appendTo(listLi);
107
							$(str).appendTo(listLi);
108
							exculdeId2s.push($data[i].articleId);
99
						}
109
						}
100
					}
110
					}
101
				}
111
				}
132
		});
142
		});
133
	}
143
	}
134
	//栏目列表
144
	//栏目列表
135
	function listShow(pageNo,colNum,isbind){
145
	function listShow(obj,pageNo,colNum,isbind){
136
		$.ajax({
146
		$.ajax({
137
			"url" :"/ajax/article/find",
147
			"url" :"/ajax/article/find",
138
			"type" :  "GET" ,
148
			"type" :  "GET" ,
139
			"dataType" : "json",
149
			"dataType" : "json",
150
			"traditional": true,
140
			"data" :{
151
			"data" :{
152
				"exclude":obj,
141
				"col":colNum,
153
				"col":colNum,
142
				"pageSize":10,
154
				"pageSize":10,
143
				"pageNo":pageNo
155
				"pageNo":pageNo
178
							current: data.data.pageNo,
190
							current: data.data.pageNo,
179
							backFn: function(p) {
191
							backFn: function(p) {
180
								$("#table-item-"+idItem).html("");
192
								$("#table-item-"+idItem).html("");
181
								listShow(p,colNum,false);
193
								listShow(obj,p,colNum,false);
182
								document.body.scrollTop = document.documentElement.scrollTop = 0;
194
								document.body.scrollTop = document.documentElement.scrollTop = 0;
183
							}
195
							}
184
						});
196
						});