Browse Source

首页添加热门专家模块、修改关注模块的相关

luyanan 8 years ago
parent
commit
5f56cf19f8

+ 2 - 1
articalInfo.html

@ -68,7 +68,7 @@
68 68
							</span>
69 69
						</div>
70 70
						<div class="navOperate floatR">
71
							<span id="attention" style="background: url(../images/favoricon.png) 0 -50px no-repeat;background-size: 100% auto;margin-top: -4px; display: inline-block;width: 26px;height: 26px;cursor:pointer"></span>
71
							<span id="attention" style="background: url(../images/favoricon.png) 0 -50px no-repeat;background-size: 100% auto;margin-top: 1px; display: inline-block;width: 24px;height: 24px;cursor:pointer"></span>
72 72
						</div>
73 73
						<div class="navOperate floatR">
74 74
							<span class="wrapicon wordHave"></span><span class="message" style="position:relative;top:-7px;left:2px;"></span>
@ -133,6 +133,7 @@
133 133
</footer>
134 134
135 135
<script type="text/javascript" src="js/jquery.cookie.js"></script>
136
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
136 137
<script type="text/javascript" src="js/scrollfix.js"></script>
137 138
<script type="text/javascript" src="js/weixinshare/qrcode.min.js"></script>
138 139
<script type="text/javascript" src="js/common.js"></script>

+ 16 - 12
css/index.css

@ -49,9 +49,11 @@ input{ outline:none;}
49 49
.link-tip-tit{font-size:20px;color:#333;/*font-weight:bold;*/line-height: 46px;}
50 50
/*热门领域*/
51 51
.hot-field{ width:100%;min-width: 1120px;  background:url(../images/fieldbg.jpg) center center no-repeat; background-size:cover;padding:40px 0 50px;}
52
.con-tit{padding:10px 0;background: url(../images/home_line_nor.png) no-repeat center center;text-align: center;}
53
.hh4{font-size:22px;line-height:40px; color:#fff;}
54
.hh4 img{margin-right:18px;margin-left:-10px;}
52
.con-tit{text-align: center;}
53
.con-tit .hh4{padding:10px 0;background: url(../images/home_line_nor.png) no-repeat center center;font-size:22px;line-height:48px;color:#333333;}
54
.con-tit .hh4 .homeicon-area{background: url(../images/home_icon_remenlingyu_nor.png) no-repeat 0 center;padding-left:30px;}
55
.con-tit .hh4 .homeicon-pro{background: url(../images/home_icon_remenzhuanjia_nor.png) no-repeat 0 center;padding-left:30px;}
56
.con-tit .showtip{font-size: 18px;line-height: 40px;color:#999999;}
55 57
.field-box{ overflow:hidden; margin:20px auto;}
56 58
.field{border-radius:2px;/*margin:4px;*/ border:1px solid #d0d0d0;padding:10px 0; float:left;}
57 59
.field-name{ display:block;font-size:16px;line-height:40px; color:#fff; text-align:center;}
@ -70,15 +72,17 @@ input{ outline:none;}
70 72
.hot-field .more{ color:#fff;}
71 73
/*热门专家*/
72 74
.hot-professor{ width:100%;  padding: 40px 0; }
73
.hot-professor h4{border:1px #ff9900 solid;color:#ff9900;}
74
.hot-professor .more{border:1px #ff9900 solid;color:#ff9900;}
75
.professor-box{ width:900px; height:610px; margin:20px auto;}
76
.professor{ width:175px; height:255px; border-radius:6px; overflow:hidden; position:relative; float:left; margin:25px;}
77
.professor img{width:175px; height:255px;}
78
.professor-data{ width:100%; height:300px; position:absolute; font-size:14px;line-height:16px; text-align:center; color:#fff;top:58%; background:url(../images/p-bg.png) no-repeat;padding:25px 0; }
79
.professor-data h5{font-size:20px;line-height:30px; }
80
.process-resear{ list-style:inside; padding:8px;font-size:12px;line-height:16px; text-align:left; }
81

75
.hot-professor .carousel .carousel-caption{position:static;height: 450px;text-shadow: none;}
76
.hot-professor .carousel .carousel-indicators li{background:#dadada;width: 36px;height:5px;border-radius: 0;border:0;margin:1px 10px;}
77
.hot-professor .carousel .carousel-indicators li.active{width: 36px;height:6px;background:#ff9900;margin:1px 10px;}
78
.hot-professor .homehead-pro{width: 120px;height: 120px;overflow: hidden;margin:10px auto;}
79
.hot-professor .homeinfo-pro{text-align: center;margin-top:10px;}
80
.hot-professor .homeinfo-pro .h1font{font-size: 22px;line-height: 42px;color:#333333;}
81
.hot-professor .homeinfo-pro .h2font{font-size: 18px;line-height: 40px;color:#666666;}
82
.hot-professor .carousel .carousel-control{background: none;display: none;}
83
.hot-professor .carousel .item{background: none;border:none;}
84
.hot-professor .carousel .item.active{box-shadow: none;}
85
.hot-professor .carousel .aitemLink{display:block;}
82 86
/*搜索页*/
83 87
.content{ width:100%; min-width: 1050px; height:auto; background:#f8f8f8; padding:60px 0 2px 0; }
84 88
.content-in{padding-bottom:20px;}

+ 2 - 2
css/workspace.css

@ -351,8 +351,8 @@ border-color:#FF9900; color:#FFFFFF}
351 351
.topTit{text-align:center;color:#FFFFFF; font-size:20px;line-height:46px;background: #ff9900;border-radius:10px 10px 0 0;height:46px;width: 100%;}
352 352
.fixbox{ background: #FFFFFF;/* position:fixed;top:46px;left:0;*/width:100%; z-index:1;}
353 353
.fixbox .fixbtn{ padding:0; margin: 0; overflow: hidden;}
354
.fixbox .fixbtn li{ list-style: none; float: left;height:40px;cursor:pointer;line-height:30px; padding:6px 10px; border-bottom:1px solid #F0F0F0;text-align: center;font-size: 14px;}
355
.fixbox .fixbtn li:first-child{ border-right:1px solid #F0F0F0;}
354
.fixbox .fixbtn li{ list-style: none;border-right:1px solid #F0F0F0; float: left;height:40px;cursor:pointer;line-height:30px; padding:6px 10px; border-bottom:1px solid #F0F0F0;text-align: center;font-size: 14px;}
355
.fixbox .fixbtn li:last-child{border-right:1px solid transparent; }
356 356
.fixbox .fixbtn li.liactive{ color: #FF9900;border-bottom-color: #FF9900;}
357 357
.childlist{ display: none;}
358 358
.alllist{ margin-top: 45px;}

BIN
images/home_icon_remenlingyu_nor.png


BIN
images/home_icon_remenzhuanjia_nor.png


BIN
images/professor/pro01.jpg


BIN
images/professor/pro02.jpg


BIN
images/professor/pro03.jpg


+ 82 - 26
index.html

@ -14,6 +14,7 @@
14 14
<link type="text/css" href="css/index.css" rel="stylesheet">
15 15
<link type="text/css" href="css/common.css" rel="stylesheet">
16 16
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
17
<script type="text/javascript" src="js/bootstrap.min.js"></script>
17 18
<style type="text/css">
18 19
	#header{top:30px;}
19 20
	.searchblock{display:none;} 
@ -105,9 +106,10 @@
105 106
		<div class="container-fulid">
106 107
	    	<div class="containerCon">
107 108
	    		<div class="con-tit">
108
	    			<h4 class="hh4"><img src="images/home_icon_remenlingyu_nor.png">热门领域</h4>
109
	    			<h4 class="hh4"><span class="homeicon-area" style=" color:#fff;">热门领域</span></h4>
110
	    			<p class="showtip" style="color:#F0F0F0">覆盖 1000 + 学术领域,寻找专家更精准</p>
109 111
	    		</div>
110
				
112
	    		
111 113
				<div class="field-box row">
112 114
		        	<div class="col-w-3 field">
113 115
						<a href="#"><span class="field-icon field-icon8"></span></a>
@ -143,35 +145,89 @@
143 145
					</div>
144 146
			
145 147
				</div>
146
				<!--<a href="search.html" class="more">更多领域<em></em></a>-->
147 148
			</div>
148 149
	    </div>
149 150
	</div>
150 151
	<!--热门专家-->
151
	<!--<div class="hot-professor">
152
		<h4 class="hh4">热门专家</h4>
153
		<div class="professor-box">
154
			<div class="professor">
155
				<img src="images/pic1.jpg">
156
				<a href="#">
157
					<div class="professor-data">
158
						<h5>肖葵</h5>
159
						<p>副研究员</p>
160
						<p>腐蚀控制系统工程研究所</p>
161
						<p>北京科技大学</p>
162
						<ul class="process-resear">
163
							<li>金属材料大气腐蚀行为与机理研究</li>
164
							<li>多重海洋环境因素作用下材料腐蚀</li>
165
							<li>损伤的机理电子材料环境损伤行为与防护工艺研究材料环境腐蚀数据库设计与建设</li>
166
						</ul>
167
					</div>
168
				</a>
169
			</div>-->
170
	
152
	<div class="hot-professor">
153
		<div class="container-fulid">
154
	    	<div class="containerCon">
155
	    		<div class="con-tit">
156
	    			<h4 class="hh4"><span class="homeicon-pro">热门专家</span></h4>
157
	    			<p class="showtip">严选 1000 + 知名学者、高级研究员、高级工程师,为您解决研发难题</p>
158
	    		</div>
159
				<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
160
				    <!-- Indicators -->
161
				    <ol class="carousel-indicators">
162
					    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
163
					    <li data-target="#carousel-example-generic" data-slide-to="1"></li>
164
					    <li data-target="#carousel-example-generic" data-slide-to="2"></li>
165
				    </ol>
166
				
167
				    <!-- Wrapper for slides -->
168
				    <div class="carousel-inner" role="listbox">
169
					    <div class="item active">
170
					    	<a class="aitemLink" href="information-brow.html?professorId=5955AF8E868A4FABBCB1DA1B026DC514" alt="孟国哲">
171
						        <div class="carousel-caption">
172
							      	 <div class="userRadius homehead-pro"><img src="images/professor/pro01.jpg" width="100%"></div>
173
							      	 <div class="homeinfo-pro">
174
							      	 	<p class="h1font">孟国哲</p>
175
							      	 	<p class="h1font">教授,哈尔滨工程大学</p>
176
							      	 	<p class="h2font">发明专利:铜镍合金铈盐化学转化膜处理方法</p>
177
							      	 	<p class="h2font">发明专利:利用电化学噪声技术测量材料局部腐蚀的方法及噪声探头和制法</p>
178
							      	 	<p class="h2font">发明专利:一种高强钢氢损伤的表面吸附氢快速检测方法</p>
179
							      	 </div>
180
						      	</div>
181
						    </a>
182
					    </div>
183
					    <div class="item">
184
					    	<a class="aitemLink" href="information-brow.html?professorId=4555021E1A53489C8BD42A2F67B62CAA" alt="柳伟">
185
						      <div class="carousel-caption">
186
						      	 <div class="userRadius homehead-pro"><img src="images/professor/pro02.jpg" width="100%"></div>
187
						      	 <div class="homeinfo-pro">
188
						      	 	<p class="h1font">柳伟</p>
189
						      	 	<p class="h1font">副教授,研究员级高级工程师,北京科技大学</p>
190
						      	 	<p class="h2font">国家863项目:耐海洋大气腐蚀高强度海洋工程用钢的组织、性能控制技术及其应用</p>
191
						      	 	<p class="h2font">国家科技重大专项:高强度耐腐蚀石油天然气集输和输送用管线钢生产技术</p>
192
						      	 	<p class="h2font">国家973项目二级课题:高强韧耐海洋大气腐蚀超细复合组织钢</p>
193
						      	 	<p class="h2font">国家自然科学基金重点项目:金属材料高温高压多相介质的腐蚀研究</p>
194
						      	 </div>
195
						      </div>
196
						    </a>
197
					    </div>
198
					    <div class="item">
199
					    	<a class="aitemLink" href="information-brow.html?professorId=F9E3DAD76E3841F7A35F23CF57430740" alt="时国庆">
200
						      <div class="carousel-caption">
201
						      	 <div class="userRadius homehead-pro"><img src="images/professor/pro03.jpg" width="100%"></div>
202
						      	 <div class="homeinfo-pro">
203
						      	 	<p class="h1font">时国庆</p>
204
						      	 	<p class="h1font">副教授,北京科技大学</p>
205
						      	 	<p class="h2font">国家863项目子课题:粮食中霉菌毒素高通量筛查技术研究与产品开发</p>
206
						      	 	<p class="h2font">国家科技支撑计划子课题:酞酸酯类化合物单克隆抗体及免疫</p>
207
						      	 	<p class="h2font">中央高校基础科研业务费青年人才基金项目:婴幼儿食品中内分泌干扰物的快速免疫检测技术研究</p>
208
						      	 </div>
209
						      </div>
210
						    </a>
211
					    </div>
212
				    </div>
213
				
214
				    <!-- Controls -->
215
				    <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
216
					    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
217
					    <span class="sr-only">Previous</span>
218
				    </a>
219
				  	<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
220
					    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
221
					    <span class="sr-only">Next</span>
222
				  	</a>
223
				</div>
224
			</div>
225
	    </div>
226
	</div>
171 227
</div>
172
	<footer>
173
	    <script type="text/javascript" src="js/footer.js"></script>
174
	</footer>
228
<footer>
229
    <script type="text/javascript" src="js/footer.js"></script>
230
</footer>
175 231

176 232
<script type="text/javascript" src="/js/jquery.cookie.js"></script>
177 233
<script type="text/javascript" src="js/common.js"></script>

+ 123 - 0
js/my-attention2.js

@ -0,0 +1,123 @@
1
$(function(){
2
	
3
	/*设置全局变量*/
4
	var professorId = GetQueryString("professorId");
5
	var resourceId = GetQueryString("resourceId");
6
	var userid=$.cookie("userid");
7
	var returnId;
8
	var ifurl = window.location.href;
9
	
10
	ifCollection();
11
	
12
	$('.attentBtn').click(function(){
13
		if (userid && userid != "null" && userid != null) {
14
			if($(this).is('.attented')){
15
				cancelCollectionExpert();
16
			}else{
17
				collectionExpert();
18
			}	
19
		}else{
20
			$.MsgBox.Alert('提示',"请先登录再进行收藏");
21
			$("#mb_btn_ok").val("去登录");
22
			var aele = document.createElement('a');
23
			$("#mb_btnbox").append(aele);
24
			$("#mb_btnbox a").css({
25
				'display': "block",
26
				'width': '100%',
27
				'height': '40px',
28
				'position': 'absolute',
29
				'bottom': '-6px',
30
				'left': '0'
31
			});
32
			aele.setAttribute('href', '../login.html');
33
		}
34
	})
35
	
36
	/*判断是非收藏专家*/
37
	function ifCollection() {
38
		if(ifurl.indexOf("professorId") >= 0){
39
			var data = {"professorId": userid,"watchObject": professorId}
40
		}else{
41
			var data = {"professorId": userid,"watchObject": resourceId}
42
		}
43
		//alert(JSON.stringify(data))
44
		$.ajax({		
45
			url:"/ajax/watch/hasWatch",
46
			data:data,
47
			dataType: 'json', //数据格式类型
48
			type: 'get', //http请求类型
49
			timeout: 10000,
50
			async: false,
51
			success: function(data) {
52
				if(data.success && data.data != null) {
53
					$(".attentBtn").addClass('attented');
54
					$('.attentBtn i').text('已收藏');
55
					returnId = data.data.watchObject;
56
				} else {
57
					$(".attentBtn").removeClass('attented');
58
					$('.attentBtn i').text('收藏');
59
				}
60
			},
61
			error: function() {
62
				$.MsgBox.Alert('提示',"服务器链接超时");
63
			}
64
		});
65
	}
66
	
67
	/*收藏专家*/
68
	function collectionExpert() {
69
		if(ifurl.indexOf("professorId") >= 0){
70
			var data = {"professorId": userid,"watchObject": professorId,"watchType": 1}
71
		}else{
72
			var data = {"professorId": userid,"watchObject": resourceId,"watchType": 2}
73
		}
74
		$.ajax({		
75
			url:"/ajax/watch",
76
			data:data,
77
			dataType: 'json', //数据格式类型
78
			type: 'POST', //http请求类型
79
			timeout: 10000,
80
			async: false,
81
			success: function(data) {
82
				//console.log(data.success)
83
				if(data.success) {
84
					returnId = data.data;
85
					$(".attentBtn").addClass('attented');
86
					$('.attentBtn i').text('已收藏');
87
					//$.MsgBox.Alert('提示',"专家收藏成功");
88
				}
89
			},
90
			error: function() {
91
				$.MsgBox.Alert('提示',"服务器链接超时");
92
			}
93
		});
94
	}
95
	
96
    /*取消收藏专家*/
97
	function cancelCollectionExpert() {
98
		$.ajax({		
99
			url:"/ajax/watch/delete",
100
			data: {
101
				professorId: userid,
102
				watchObject: returnId
103
			},
104
			dataType: 'json', //数据格式类型
105
			type: 'post', //http请求类型
106
			timeout: 10000,
107
			async: true,
108
			success: function(data) {
109
				//console.log(data.success)
110
				if(data.success) {
111
					$(".attentBtn").removeClass('attented');
112
					$('.attentBtn i').text('收藏');
113
					//$.MsgBox.Alert('提示',"取消收藏成功");
114
				}
115
			},
116
			error: function(data) {
117
				$.MsgBox.Alert('提示',"服务器链接超时");
118
			}
119
		});
120

121
	}
122
	
123
})

+ 2 - 2
resourceInfo.html

@ -56,7 +56,7 @@
56 56
					</div>
57 57
					<div class="coulstbtn floatL" style="position: absolute;bottom: 20px;">
58 58
						<span id="consultin">咨询</span>
59
						<span class="attentBtn" id="attentBtn"><em></em><i>关注</i></span>
59
						<span class="attentBtn" id="attentBtn"><em></em><i>收藏</i></span>
60 60
						<span class="shareWeixin" style="display:inline-block;position: relative;">分享至微信
61 61
								<div class="shareCode clearfix">
62 62
									<div class="floatL" id="qrcode"></div>
@ -114,7 +114,7 @@
114 114
<script type="text/javascript" src="js/common.js"></script>
115 115
<script type="text/javascript" src="js/popup.js"></script>
116 116
<script type="text/javascript" src="js/resourceInfo.js"></script>
117
<script type="text/javascript" src="js/my-attention.js"></script>
117
<script type="text/javascript" src="js/my-attention2.js"></script>
118 118
<script type="text/javascript">
119 119
120 120
	//分享关注按钮

+ 2 - 2
workspaces.html

@ -21,7 +21,7 @@
21 21
<!--我的关注-->
22 22
<div class="blackcover displayNone" id="attentCover">
23 23
	<div class="attentionBox">
24
		<div class="topTit">我的关注</div>
24
		<div class="topTit">关注与收藏</div>
25 25
		<div class="fixbox">
26 26
			<ul class="fixbtn" id="fixbtn">
27 27
				<li index="0" class="col-xs-4 liactive">专家</li>
@ -98,7 +98,7 @@
98 98
					                </div> -->
99 99
								</div>
100 100
								<div class="workcountup" id="lookMyAttention">
101
									<p class="myAttention">我的关注</p>
101
									<p class="myAttention">关注与收藏</p>
102 102
								</div>
103 103
								<!--<div class="workcountup">
104 104
					                <p><span class="workcountnum">2</span>个项目正在进行</p>