Browse Source

Merge remote-tracking branch 'choose_remote_name/master' into dev

jiapeng 8 years ago
parent
commit
754e605f25

+ 7 - 8
css/common.css

@ -10,8 +10,8 @@
10 10
.defaultColor{ color:#333;}
11 11
/*文字*/
12 12
.h1Font{font-size:20px;} /*标题*/
13
.h2Font{font-size:18px;} 
14
.h3Font{font-size:16px;} 
13
.h2Font{font-size:18px; line-height:30px; color:#333; } 
14
.h3Font{font-size:16px; line-height:28px; color:#555; } 
15 15
.h4Font{font-size:14px; line-height:26px; color:#333;} 
16 16
.h5Font{font-size:14px; line-height:22px; color:#666;} 
17 17
.h6Font{font-size:13px;color:#888;margin-left:8px;} 
@ -38,8 +38,7 @@ input{ outline:none;}
38 38
.searchblock{ width:280px; height:35px; position:absolute; left:50%; top:50%; margin-left:-132px; margin-top:-17.5px; display:none;}
39 39
.search-txt{ width:220px;line-height:35px; height:35px; background:#fff; border:none;-moz-border-radius:6px 0 0 6px;-webkit-border-radius:6px 0 0 6px; border-radius:6px 0 0 6px; behavior:url(../js/ie-css3.htc); float:left;font-size:14px;padding-left:10px; color:#a3a3a3;}
40 40
.search-btn{ width:35px; height:35px; background:#fff; border-radius:0 6px 6px 0;-moz-border-radius:0 6px 6px 0;-webkit-border-radius:0 6px 6px 0; float:left; cursor:pointer; behavior:url(../js/ie-css3.htc);cursor:pointer;}
41
.search-icon{ display:block; width:20px; height:20px; background:
42
url(../images/index-icon.png) no-repeat; background-position:left; margin:8px;}
41
.search-icon{ display:block; width:20px; height:20px; background:url(../images/index-icon.png) no-repeat; background-position:left; margin:8px;}
43 42
/*顶部右边*/
44 43
.header-right{ float:right; margin-right:80px;}
45 44
/*未登录*/
@ -66,7 +65,7 @@ url(../images/index-icon.png) no-repeat; background-position:left; margin:8px;}
66 65
.myWorkspace{font-size: 14px;line-height:40px; text-align: center;float: left; margin-top: 10px;color: #fff;}
67 66
/*主体部分*/
68 67
#container{ min-width:1100px;min-height:90%; background:#fff;overflow: hidden;}
69

68
.contentBody{width:1050px;height:auto; margin:10px auto; padding:80px 0 2px 0; }
70 69
/*footer部分*/
71 70
#footer{ min-width:1100px;background:#ff9900;clear: both;height:100px; position: relative; z-index: 1001; text-align:center;}
72 71
#footer .wrapper {margin-left:80px;position: relative;padding: 15px 20px; min-width:1000px;}
@ -155,10 +154,10 @@ url(../images/index-icon.png) no-repeat; background-position:left; margin:8px;}
155 154
.nodatabox .txtbox .keyword{ padding:0 6px;color:#555555;}
156 155
/***********************缺省页面*******************/
157 156

158
.ResImgBox{display: inline-block;text-align: center;max-width:64px;width:64px;height:60px;padding:1px;background:#FAFAFA;border:1px solid #F8F8F8;overflow: hidden;padding:2px; margin: 6px 0;border-radius:4px;}
157
.ResImgBox{display: inline-block;text-align: center;max-width:100px;width:100px;height:100px;background:#FAFAFA;border:1px solid #F8F8F8;overflow: hidden;padding:2px;border-radius:4px;}
159 158
.ResImgBox .resImg{max-width: 100%;max-height: 100%;vertical-align: middle;position: relative;}
160
.ResImgBox:before {content: ' ';display: inline-block;vertical-align: middle;width: 0;height: 100%;overflow: hidden;margin-left: -4px;}
161

159
.ResImgBox:before {content: ' ';display: inline-block;vertical-align: middle;width: 0;height: 100%;overflow: hidden;margin-left: 0px;}
160
.beforMargin:before{margin-left:-4px;}
162 161

163 162

164 163


+ 26 - 6
css/index.css

@ -215,7 +215,7 @@ input[type='radio'].radio:checked + .radio {background:url(../images/redio.png)
215 215
.coulstblock .coulstbox .prohead{ width:80px;margin-left:40px; overflow:hidden;}
216 216
.coulstblock .coulstbox .proinfomation{margin:0 2%;width:60%; overflow:hidden;}
217 217
.coulstblock .coulstbox .coulstbtn{padding:24px 10px; margin-right: 20px;}
218
.coulstblock .coulstbox .coulstbtn span,#conbtn span{padding:5px 40px; display:block; border-radius:4px; text-align:center; color:#fff; background:#ff9900;cursor:pointer}
218
.coulstbtn span,#conbtn span{padding:5px 40px;margin-right:6px; border-radius:4px; text-align:center; color:#fff; background:#ff9900;cursor:pointer}
219 219
/*专家信息头部*/
220 220
.information-head{ width:1050px; margin:auto;background:#fff; border:1px  solid #eaeaea; margin-top:30px; padding:20px 30px; position: relative;}
221 221
.head-left{ float:left;width:200px; height:200px; position:relative;overflow:hidden;}
@ -377,7 +377,7 @@ label.edu-radio{ float:none;font-size:16px;line-height:26px; color:#868686; }
377 377
.sharescrollbox .briefinfor{ width:100%; max-height:100px; text-overflow:ellipsis; overflow:hidden; color:#777; }
378 378
.sharescrollbox .shareshow{ position: relative; width: 200px; height: 200px;border-radius: 4px; overflow: hidden;}
379 379
.shareopeart{ position:absolute; bottom:0px; left:0px; z-index:100; overflow:hidden; width:100%;}
380
.sharebtn{ display:block; text-align:center; float:left; cursor:pointer; width:100%; height:30px;font-size:14px;line-height:30px; background:rgba(0,0,0,.2); color:#fff; border:1px solid #d6d6d6;}
380
.sharebtn{ display:block; text-align:center; float:left; cursor:pointer; width:100%; height:30px;font-size:14px;line-height:30px; background:rgba(0,0,0,.2); color:#fff; /*border:1px solid #d6d6d6;*/}
381 381
.sharebtn:hover{ color:#fff; background:#ff9900;}
382 382
.resoubtn{ position:absolute;top:40%; width:30px; height:41px; background:#ccc; border-width:1px 1px 0 1px; display:none; cursor:pointer;}
383 383
.resouprev{left:-4px;background:url(../images/arrows.png) -30px 0 no-repeat;}
@ -414,7 +414,27 @@ label.edu-radio{ float:none;font-size:16px;line-height:26px; color:#868686; }
414 414
.subuser li .evaimg{ display:block; width:60px; height:60px; overflow:hidden; border:1px solid #999; border-radius:4px; margin:auto;}
415 415
#evastarboxx .staspan{background: url(../images/evastar.png) 0 1px no-repeat;}
416 416

417

418

419

420

417
/*资源详细信息页面*/
418
.resouLeft{ width: 79%;/*border:1px solid #eaeaea;*/}
419
.resTop{padding:6px;position: relative;padding:20px 10px;background:#FFFFFF;}
420
.resBrief{width:60%;min-height: 300px;margin-right:1%;}
421
.subtit{color:#888888; padding-right:6px; }
422
.resAbout{margin:6px 0;padding: 4px 6px; background: #f0f0f0;margin-bottom: 46px;}
423
.resAbout .subtit{line-height: 36px; }
424
.resUlbox {margin: 1% 2%;}
425
.resUl {width:85%;color:#666666}
426
.resUl li{ float: left; margin: 1%;padding:4px 16px; background: #FFFFFF; /*border: 1px solid #e6e6e6;*/border-radius: 6px;}
427

428
.resBottom{margin:10px 0;padding:20px 10px;background:#FFFFFF;}
429
.resMore{margin:10px 30px 30px 30px; border:1px solid #eaeaea; min-height: 640px;}
430

431
.resouRight{ width: 20%;}
432
.rightBlock{ min-height: 352px;padding:16px 10px;margin-bottom:10px; background: #FFFFFF;}
433
.proImg{ text-align: center;}
434
.proImg img{ width:180px;}
435
.proInfo{padding:10px 16px;}
436
.otherRes{padding:10px;}
437
.otherRes li{border: 1px solid #e4e5e7;margin:10px 0;border-radius: 6px;cursor: pointer;}
438
.otherRes li a{display: block;}
439
.otherRes li .resoumag .resourceImgBox{ max-width:168px;width:168px;height: 168px;}
440
.otherRes li .resoumag h2{color: #666666; text-align: center; padding:10px;}

+ 9 - 7
css/reset.css

@ -1,10 +1,10 @@
1 1
@charset "UTF-8";
2 2
/*base*/
3
hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,a,em,div,span,th,td{margin:0;padding:0; word-break:break-all; font-family: PingFang SC,Helvetica Neue,Hiragino Sans GB,Microsoft Yahei,WenQuanYi Micro Hei,sans-serif;}
4
form,fieldset,legend,label,button,input,select,textarea{font-size:14px; font-family: PingFang SC,Helvetica Neue,Hiragino Sans GB,Microsoft Yahei,WenQuanYi Micro Hei,sans-serif;}
5
h1,h2,h3,h4,h5,h6{font-size:100%;margin:0;padding:0; font-family: PingFang SC,Helvetica Neue,Hiragino Sans GB,Microsoft Yahei,WenQuanYi Micro Hei,sans-serif;}
6
html,body{height:100%; width:100%; margin:0;padding:0;font-family: PingFang SC,Helvetica Neue,Hiragino Sans GB,Microsoft Yahei,WenQuanYi Micro Hei,sans-serif;}
7
b,strong{font-weight:bold;font-family: PingFang SC,Helvetica Neue,Hiragino Sans GB,Microsoft Yahei,WenQuanYi Micro Hei,sans-serif;}
3
hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,a,em,div,span,th,td{margin:0;padding:0; word-break:break-all; font-family: PingFang SC,Arial,Helvetica Neue,Hiragino Sans GB,Microsoft Yahei,WenQuanYi Micro Hei,sans-serif;}
4
form,fieldset,legend,label,button,input,select,textarea{font-size:14px; font-family: PingFang SC,Arial,Helvetica Neue,Hiragino Sans GB,Microsoft Yahei,WenQuanYi Micro Hei,sans-serif;}
5
h1,h2,h3,h4,h5,h6{font-size:100%;margin:0;padding:0; font-family: PingFang SC,Arial,Helvetica Neue,Hiragino Sans GB,Microsoft Yahei,WenQuanYi Micro Hei,sans-serif;}
6
html,body{height:100%; width:100%; margin:0;padding:0;font-family: PingFang SC,Arial,Helvetica Neue,Hiragino Sans GB,Microsoft Yahei,WenQuanYi Micro Hei,sans-serif;}
7
b,strong{font-weight:bold;font-family: PingFang SC,Arial,Helvetica Neue,Hiragino Sans GB,Microsoft Yahei,WenQuanYi Micro Hei,sans-serif;}
8 8
input{vertical-align:middle; outline:none;}
9 9
img{color:transparent;font-size:0;vertical-align:middle;-ms-interpolation-mode:bicubic;border:0;padding:0; margin:0;}
10 10
address,cite,dfn,em,var{font-style:normal;}
@ -25,7 +25,9 @@ a:active,a:hover{outline:0;text-decoration:none;}
25 25
.fr{float:right;}
26 26
.none{display:none;}
27 27

28
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video,search{display:block;margin:0;padding:0;font-family: PingFang SC,Helvetica Neue,Hiragino Sans GB,Microsoft Yahei,WenQuanYi Micro Hei,sans-serif;}
28
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary,time,mark,audio,video,search{
29
	display:block;margin:0;padding:0;
30
	font-family: PingFang SC,Arial,Helvetica Neue,Hiragino Sans GB,Microsoft Yahei,WenQuanYi Micro Hei,sans-serif;}
29 31

30 32
/*goole去除select的上下箭头*/
31 33
input::-webkit-outer-spin-button,
@ -46,7 +48,7 @@ select{/*Chrome和Firefox里面的边框是不一样的,所以复写了一下*
46 48
  -webkit-appearance:none;
47 49

48 50
  /*在选择框的最右侧中间显示小箭头图片*/
49
  background: url("http://ourjs.github.io/static/2015/arrow.png") no-repeat scroll right center transparent;
51
  background: url("arrow.png") no-repeat scroll right center transparent;
50 52

51 53

52 54
  /*为下拉小箭头留出一点位置,避免被文字覆盖*/

BIN
images/default-resource.jpg


BIN
images/dialogue.png


BIN
images/favoricon.png


+ 1 - 1
information-brow.html

@ -253,7 +253,7 @@
253 253
    	<div class="proinfomation floatL">
254 254
    		<div class="clearfix">
255 255
    			<a class="authobject named" id="foot_proname"></a>
256
    			<em class=" authicon-cu" id="foot_promodify"></em>
256
    			<em class="" id="foot_promodify"></em>
257 257
    		</div>
258 258
			<div class="position"><span id="foot_protitle"></span><span></span ></div>				
259 259
			<div class="science"><span id="foot_prodepar"></span><span id="foot_proorgname"></span ><span class="address" id="foot_proaddress"></span></div>								

+ 39 - 7
js/information.brow.js

@ -3,6 +3,9 @@ loginStatus();//读取用户头像
3 3
	 	var userid = $.cookie("userid");
4 4
	 	var professorId = GetQueryString("professorId");
5 5
	 	var name;
6
	 	if(userid==professorId){
7
	 		$("span:contains('咨询')").hide();
8
	 	}
6 9
	 	if(professorId){
7 10
8 11
	 		var subjectShow = function (data){
@ -207,10 +210,13 @@ loginStatus();//读取用户头像
207 210
							if(userid == $photos[j].id)
208 211
								isAgree++;
209 212
						}
213
						if(professorId != userid){
210 214
						if(isAgree) {
211 215
							var showDiv = "<div class='listbox listbox-browse clear'><div class='list-browse'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><span class='plus ' data-pid='" + $data.professorId + "' data-caption='" + $data.caption + "' data-isagree='" + isAgree + "' ></span><div class='like-num'>";
212 216
						} else {
213 217
							var showDiv = "<div class='listbox listbox-browse clear'><div class='list-browse'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><span class='plus' style=' background-position-y:-26px' data-pid='" + $data.professorId + "' data-caption='" + $data.caption + "' data-isagree='" + isAgree + "' ></span><div class='like-num'>";
218
						}}else{
219
							var showDiv = "<div class='listbox listbox-browse clear'><div class='list-browse'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><div class='like-num'>";
214 220
						}
215 221
						if($photos.length < 6) {
216 222
							for(var j = 0; j < $photos.length; ++j) {
@ -581,7 +587,10 @@ var resou;
581 587
					for(var i=0;i<data.data.length;i++){
582 588
						add='<div class="sharesrc">'
583 589
						add+='<div class="shareshow">'
584
	                	add+='<a class="remess" resourceId='+data.data[i].resourceId+'><img src="/images/resource/'+data.data[i].resourceId+'.jpg" width="100%" height="100%" class="resourceImg"></a>'
590
	                	add+='<a class="remess" resourceId='+data.data[i].resourceId+'>'
591
	                	add+='<div class="ResImgBox" style="max-width:200px;width:200px;height: 200px;">'
592
						add+='<img class="resImg headRadius resourceImg" src="/images/resource/'+data.data[i].resourceId+'.jpg" />'
593
						add+='</div></a>'
585 594
	                 	add+='<div class="shareopeart"><a class="sharebtn resourceConsult" professorId='+data.data[i]["professorId"]+'>咨询</a><a class="sharebtn applicant" style="display:none">申请</a></div>'
586 595
	             		add+='</div>'
587 596
	             		add+='<p class="restit">资源名称:<span class="presou consultTitleVal" resourceConsultTitle = "">'+ data.data[i].resourceName+'</span></p>'
@ -914,7 +923,7 @@ if(resou==0&&ass==0){
914 923
				success:function(response){
915 924
					
916 925
					var myData = response["data"];
917
					console.log(myData);
926
					//console.log(myData);
918 927
					$("#foot_proname").html(myData["name"]);
919 928
					if(myData["address"]){
920 929
						$("#foot_proaddress").html(' | '+myData["address"]);
@ -937,11 +946,34 @@ if(resou==0&&ass==0){
937 946
					
938 947
					
939 948
					//是否认证
940
					if(myData["authentication"] == true){
941
						$("#foot_promodify").addClass("authicon");
942
					}else {
943
						$("#foot_promodify").addClass("unauthicon");
944
					}
949
//					if(myData["authentication"] == true){
950
//						$("#foot_promodify").addClass("authicon");
951
//					}else {
952
//						$("#foot_promodify").addClass("unauthicon");
953
//					}
954
					if(myData.authType) {//专家
955
						
956
						$("#foot_promodify").addClass('authicon authicon-cu');
957
												
958
					} else {//普通用户
959
						if(myData.authStatus) {//身份已认证
960
							if(myData.authentication == 1) {//科研工作者
961
								
962
								$("#foot_promodify").addClass('authicon2 authicon-mana');
963
																		
964
							} else if(myData.authentication == 2) {//企业专家
965
								
966
								$("#foot_promodify").addClass('authicon2 authicon-staff');
967
								
968
							} else {//学生
969
								$("#foot_promodify").addClass('authicon2 authicon-stu');
970
																
971
							}
972
						}else{//身份未认证
973
							
974
						}
975
						
976
					};
945 977
					
946 978
					//头像
947 979
					if(myData["hasHeadImage"] == 0){

+ 2 - 1
js/information.js

@ -2021,7 +2021,8 @@ $("#honorShow").on("click", ".infor-save",function () {
2021 2021
					for(var i=0;i<data.data.length;i++){
2022 2022
						add='<div class="sharesrc">'
2023 2023
						add+='<div class="shareshow">'
2024
	                	add+='<a><img src="/images/resource/'+data.data[i].resourceId+'.jpg" width="100%" height="100%" class="resouImage"></a>'
2024
	                	add+='<a><div class="ResImgBox" style="max-width:200px;width:200px;height: 200px;">'
2025
						add+='<img class="resImg headRadius resourceImg" src="/images/resource/'+data.data[i].resourceId+'.jpg" /></div></a>'
2025 2026
	                 	add+='<div class="shareopeart"></div>'
2026 2027
	             		add+='</div>'	             
2027 2028
	             		add+='<p class="restit">资源名称:<span class="presou">'+ data.data[i].resourceName+'</span></p>'

+ 2 - 2
js/newsciresource.js

@ -293,7 +293,7 @@ $(function(){
293 293
							add+='<th width="12%">联系人</th><th width="14%">交付时间</th>'        
294 294
							add+='<th width="20%">付款进程</th><th width="12%">状态/操作</th></tr></table><div class="tcdPageCode tcdPageCod'+i+'"></div></div>';*/
295 295
						    var add='<div class="addworkbtn-list"> <div class="resoumag">'
296
						    	add+='<h3><img src="" class="resourceImg"></h3>'               
296
						    	add+='<div class="ResImgBox" style="max-width:226px;width:226px;height: 226px;"><img class="resImg headRadius resourceImg" src="" /></div>'               
297 297
								add+='<h2>'+data.data[i].resourceName+'</h2>' 
298 298
								add+='<p>'+data.data[i].supportedServices+'</p>' 
299 299
								add+='</div></div>'; 	
@ -1673,4 +1673,4 @@ function ajaxGet1(operationId){
1673 1673
	});
1674 1674

1675 1675

1676
});
1676
});

+ 3 - 3
js/popup.js

@ -293,7 +293,7 @@ function ResourceMessage() {
293 293
	PopHtml +='<div class="resouimgbox floatL" style="width:240px;">';
294 294
	PopHtml += '<div class="resouinforcon">';
295 295
	PopHtml += '<div class="resouimg" >';
296
	PopHtml += '<div class="resouimgshow" style="height:220px;width:220px;"><img width="100%" height="100%" src="" class="resouImage" /></div></div>';
296
	PopHtml += '<div class="resouimgshow" style="height:220px;width:220px;"><div class="ResImgBox" style="max-width:220px;width:220px;height: 220px;margin:0;"><img class="resImg headRadius resouImage" src="" /></div></div></div>';
297 297
	PopHtml += '</div></div>';
298 298
	PopHtml += '</div></form>';
299 299
	//关闭按钮
@ -337,7 +337,7 @@ function ResourceApply(){
337 337
		PopHtml += '<tr><th class="resouinfotype " scope="row">交付时间</th><td><div class="resouinforcon"><input type="text" readOnly="true" id="datepicker"class="frmtype dealTime"style="width:200px;"></div></td></tr>';
338 338
		PopHtml += '<tr class="limitBox"><th class="resouinfotype"  scope="row">具体需求</th><td class="limitwordbox"><div class="resouinforcon limitwords"><textarea class="frmtype detail"></textarea></div></td></tr></table>';
339 339
		
340
		PopHtml += '<div class="resouimgbox floatL"><div class="resouinforcon"><div class="resouimg2" ><img src="" width="100%" height="100%"  class="resouImage"></div></div></div></div>';
340
		PopHtml += '<div class="resouimgbox floatL"><div class="resouinforcon"><div class="resouimg2" ><div class="ResImgBox" style="max-width:220px;width:220px;height: 220px;margin:0;"><img class="resImg headRadius resouImage" src="" /></div></div></div></div></div>';
341 341
		
342 342
		//相关文件上传
343 343
		PopHtml += '<div class="filebox"style="display:none;"> ';
@ -620,7 +620,7 @@ function DetailInfo(){
620 620
		PopHtml += '<tr class="limitBox"><th class="resouinfotype" scope="row">备注</th><td class="limitwordbox"><div class="resouinforcon limitwords"id="consultContent"></div></td></tr></table>';
621 621
		PopHtml += '</table>';
622 622
		
623
		PopHtml += '<div class="resouimgbox1 floatL"><div class="resouinforcon"><div class="resoushowimg1" ><img src="" width="100%" height="100%"  class="resouImage"></div></div></div></div>';
623
		PopHtml += '<div class="resouimgbox1 floatL"><div class="resouinforcon"><div class="resoushowimg1" ><div class="ResImgBox" style="max-width:220px;width:220px;height: 220px;margin:0;"><img class="resImg headRadius resouImage" src="" /></div></div></div></div></div>';
624 624
		//文件	
625 625
		PopHtml += '<div class="filebox"> ';
626 626
		PopHtml += '<div class="worktit">相关文件<div class="uploadbtn">上传文件</div></div>';

+ 113 - 0
js/resourceInfo.js

@ -0,0 +1,113 @@
1
$(document).ready(function() {
2
	/*获取资源ID*/
3
	var resourceId = GetQueryString("resourceId");
4
	/*判断是否登录*/
5
	loginStatus();
6
	//填充学术领域
7
	var subjectShow = function(data) {
8
			if(data != undefined && data.length != 0) {
9
				var subs = new Array();
10
				if(data.indexOf(',')) {
11
					subs = data.split(',');
12
				} else {
13
					subs[0] = data;
14
				}
15
				if(subs.length > 0) {
16
					for(var i = 0; i < subs.length; i++) {
17
						$("#subjectList").append("<li>" + subs[i] + "</li>")
18
					};
19
				}
20
			}
21
		}
22
		//填充应用行业
23
	var industryShow = function(data) {
24

25
			if(data != undefined && data.length != 0) {
26
				var subs = new Array();
27
				if(data.indexOf(',')) {
28
					subs = data.split(',');
29
				} else {
30
					subs[0] = data;
31
				}
32
				if(subs.length > 0) {
33
					for(var i = 0; i < subs.length; i++) {
34
						$("#industryList").append("<li>" + subs[i] + "</li>")
35
					};
36
				}
37
			}
38
		}
39
		/*获取资源的数据的函数*/
40
	var resourceData = function() {
41
		$.ajax({
42
			"url": "/ajax/resource/resourceInfo",
43
			data: {
44
				'resourceId': resourceId
45
			},
46
			"type": "get",
47
			"async": true,
48
			"success": function(info) {
49
				if(info.success) {
50
					var $info = info.data;
51
					console.log(info);
52
					$(".h2Font").text($info.resourceName);
53
					$("#application").text($info.supportedServices);
54
					if($info.subject) {
55
						subjectShow($info.subject)
56
					}else{
57
						$("span:contains('学术领域')").hide();
58
					}
59
					if($info.industry) {
60
						industryShow($info.industry)
61
					}else{
62
						$("span:contains('应用行业')").hide();
63
					}
64
					if($info.cooperationNotes) {
65
						$("#cooperationNote").text($info.cooperationNotes);
66
					}else{
67
						$("span:contains('合作备注')").hide();
68
					}
69
					if(!$info.subject&&!$info.industry&&!$info.cooperationNotes){
70
						$(".resAbout").hide();
71
					}
72
					if($info.images) {
73
						$("#resouImg").attr("src", "/images/resource/" + $info.resourceId + ".jpg")
74
					}
75
					if($info.descp) {
76
						$(".resMore").html($info.descp)
77
					}
78
					$("#nameS").text($info.professor.name);
79
					if($info.professor.title) {
80
						if($info.professor.office) {
81
							$("#title").text($info.professor.title + ",");
82
						} else {
83
							$("#title").text($info.professor.title);
84
						}
85
					}
86
					if($info.professor.office) {
87

88
						$("#office").text($info.professor.office);
89
					}
90
					if($info.professor.department) {
91
						$("#department").text($info.professor.department);
92
					}
93
					if($info.professor.orgName) {
94
						$("#orgName").text($info.professor.orgName);
95
					}
96
					if($info.professor.address) {
97
						$("#address").text($info.professor.address);
98
					}
99
					if($info.professor.hasHeadImage) {
100
						$("#headImg").attr("src", "/images/head/" + $info.professorId + "_l.jpg")
101
					}
102
				} else {
103
					$.MsgBox.Alert('消息提醒', "系统异常!");
104
				}
105
			},
106
			"error": function() {
107
				$.MsgBox.Alert('message', 'failed')
108
			}
109
		});
110
	}
111
	resourceData();
112
	
113
})

+ 1 - 1
js/sciresource.js

@ -268,7 +268,7 @@ $(function(){
268 268
					$("#consd").html("");
269 269
					for(var i=0;i<data.data.length;i++)
270 270
						{
271
							var add='<div class="maintab"><div class="lefttab fl"><table class="resoubrief"><tr><td><div class="resoimgbox"><img class="resourceImg" width="100%" height="100%" src=""></div></td>'
271
							var add='<div class="maintab"><div class="lefttab fl"><table class="resoubrief"><tr><td><div class="resoimgbox"><div class="ResImgBox" style="max-width:160px;width:160px;height: 160px;"><img class="resImg headRadius resourceImg" src="" /></div></div></td>'
272 272
							add+='</tr><tr><td><ul><li>'+data.data[i].resourceName+'</li><li>'+data.data[i].supportedServices+'</li> '               
273 273
							/*add+='<li class="li1">'+data.data[i].subject+'</li>' */                  
274 274
							add+='</ul></td></tr><tr>'                

+ 634 - 654
js/search.js

@ -1,7 +1,7 @@
1
$(function(){
1
$(function() {
2 2
	var userid = $.cookie("userid");
3
	if (userid && userid != "null" && userid != null) {
4
		$(".myWorkspace").attr("href","workspaces.html?"+userid);
3
	if(userid && userid != "null" && userid != null) {
4
		$(".myWorkspace").attr("href", "workspaces.html?" + userid);
5 5
		loginStatus();
6 6
	}
7 7
@ -12,8 +12,8 @@ $(function(){
12 12
		$(".personal-infor").stop(true, false).slideUp(500);
13 13
	});
14 14
	$(document).scroll(function() {
15
		var top = $(document).scrollTop();		
16
		if (top != 0) {
15
		var top = $(document).scrollTop();
16
		if(top != 0) {
17 17
			$(".searchbox").fadeIn(1000);
18 18
19 19
		} else {
@ -21,7 +21,7 @@ $(function(){
21 21
		}
22 22
	});
23 23
	var newc = GetQueryString("lookFor");
24
	if (newc == 0 || newc == "") {
24
	if(newc == 0 || newc == "") {
25 25
		var c = 0;
26 26
	} else {
27 27
		var c = 1;
@ -50,312 +50,293 @@ $(function(){
50 50
	$("#hsearchContent").val(GetQueryString("searchContent"));
51 51
	var key = $("#searchContent").val();
52 52
	var getData = function(key, subject, industry, pageSize, pageNo, isbind,
53
			add) {
54
		if (c == 0) {
53
		add) {
54
		if(c == 0) {
55 55
			$
56
					.ajax({
57
						"url" : "/ajax/professor/pqBaseInfo",
58
						"type" : "GET",
59
						"data" : {
60
							"key" : key,
61
							"subject" : subject,
62
							"industry" : industry,
63
							"pageSize" : pageSize,
64
							"pageNo" : pageNo,
65
							"address" : add
66
						},
67
						"contentType" : "application/x-www-form-urlencoded",
68
						"success" : function($data) {
69
							if ($data.success) {
70
								// console.log($data);
71
								$("#professorList").html("");
72
								for (var i = 0; i < $data.data.data.length; i++) {
73
									// 创建HTML标签
74
									var dataHtml = "<div class='item'>";
75
									dataHtml += "<a  class='infoi'  href='information-brow.html?professorId="
76
											+ $data.data.data[i].id
77
											+ "' ><div class='photo1 headRadius'>"
78
									if ($data.data.data[i].hasHeadImage) {
79
										dataHtml += "<img class='images' style='width:100%;'  src='/images/head/"
80
												+ $data.data.data[i].id
81
												+ "_l.jpg'/></div></a>";
82
									} else {
83
										dataHtml += "<img class='images' style='width:100%;'  src='/images/default-photo.jpg'/></div></a>";
84
									}
85
									dataHtml += "<div class='synopsis'>";
86
									dataHtml += "<a href='javascript:void();' class='named'>";
87
									if (typeof ($data.data.data[i].name) !== "undefined") {
88
										dataHtml += $data.data.data[i].name;
89
									}
90
									dataHtml += "</a><a href='information-brow.html?professorId="
91
											+ $data.data.data[i].id
92
											+ "' class='modify'></a>";
93
									dataHtml += "<div class='position'>";
94
									if ($data.data.data[i].office) {
95
										dataHtml += $data.data.data[i].office
96
												+ ", ";
97
									}
98
									if ($data.data.data[i].title) {
99
										dataHtml += $data.data.data[i].title
100
												+ ", ";
101
									}
102
									if ($data.data.data[i].department) {
103
										dataHtml += $data.data.data[i].department
104
												+ ", ";
105
									}
106
									if ($data.data.data[i].orgName) {
107
										dataHtml += $data.data.data[i].orgName;
108
									}
109
									if ($data.data.data[i].address) {
110
										dataHtml += " | "
111
												+ $data.data.data[i].address;
112
									}
113
									dataHtml += "</div>";
114
									dataHtml += "<div class='ellipsisbox science'>";
115
									if (typeof ($data.data.data[i].subject) !== "undefined") {
116
										dataHtml += "<p>学术领域:"
117
												+ $data.data.data[i].subject
118
												+ "</p>";
119
									}
120
									dataHtml += "</div>";
121
									dataHtml += "<div class='ellipsisbox industry'>";
122
									if (typeof ($data.data.data[i].industry) !== "undefined") {
123
										dataHtml += "<p>应用行业:"
124
												+ $data.data.data[i].industry
125
												+ "</p>";
126
									}
127
									if ($data.data.data[i].researchAreas.length) {
128
										dataHtml += "<p>研究方向:"
129
												+ $data.data.data[i].researchAreas[0].caption
130
												+ "</p>";
131
										// console.log($data.data.data[i].researchAreas[0].caption);
132
									}
56
				.ajax({
57
					"url": "/ajax/professor/pqBaseInfo",
58
					"type": "GET",
59
					"data": {
60
						"key": key,
61
						"subject": subject,
62
						"industry": industry,
63
						"pageSize": pageSize,
64
						"pageNo": pageNo,
65
						"address": add
66
					},
67
					"contentType": "application/x-www-form-urlencoded",
68
					"success": function($data) {
69
						if($data.success) {
70
							// console.log($data);
71
							$("#professorList").html("");
72
							for(var i = 0; i < $data.data.data.length; i++) {
73
								// 创建HTML标签
74
								var dataHtml = "<div class='item'>";
75
								dataHtml += "<a  class='infoi'  href='information-brow.html?professorId=" +
76
									$data.data.data[i].id +
77
									"' ><div class='photo1 headRadius'>"
78
								if($data.data.data[i].hasHeadImage) {
79
									dataHtml += "<img class='images' style='width:100%;'  src='/images/head/" +
80
										$data.data.data[i].id +
81
										"_l.jpg'/></div></a>";
82
								} else {
83
									dataHtml += "<img class='images' style='width:100%;'  src='/images/default-photo.jpg'/></div></a>";
84
								}
85
								dataHtml += "<div class='synopsis'>";
86
								dataHtml += "<a href='javascript:void();' class='named'>";
87
								if(typeof($data.data.data[i].name) !== "undefined") {
88
									dataHtml += $data.data.data[i].name;
89
								}
90
								dataHtml += "</a><a href='information-brow.html?professorId=" +
91
									$data.data.data[i].id +
92
									"' class='modify'></a>";
93
								dataHtml += "<div class='position'>";
94
								if($data.data.data[i].office) {
95
									dataHtml += $data.data.data[i].office +
96
										", ";
97
								}
98
								if($data.data.data[i].title) {
99
									dataHtml += $data.data.data[i].title +
100
										", ";
101
								}
102
								if($data.data.data[i].department) {
103
									dataHtml += $data.data.data[i].department +
104
										", ";
105
								}
106
								if($data.data.data[i].orgName) {
107
									dataHtml += $data.data.data[i].orgName;
108
								}
109
								if($data.data.data[i].address) {
110
									dataHtml += " | " +
111
										$data.data.data[i].address;
112
								}
113
								dataHtml += "</div>";
114
								dataHtml += "<div class='ellipsisbox science'>";
115
								if(typeof($data.data.data[i].subject) !== "undefined") {
116
									dataHtml += "<p>学术领域:" +
117
										$data.data.data[i].subject +
118
										"</p>";
119
								}
120
								dataHtml += "</div>";
121
								dataHtml += "<div class='ellipsisbox industry'>";
122
								if(typeof($data.data.data[i].industry) !== "undefined") {
123
									dataHtml += "<p>应用行业:" +
124
										$data.data.data[i].industry +
125
										"</p>";
126
								}
127
								if($data.data.data[i].researchAreas.length) {
128
									dataHtml += "<p>研究方向:" +
129
										$data.data.data[i].researchAreas[0].caption +
130
										"</p>";
131
									// console.log($data.data.data[i].researchAreas[0].caption);
132
								}
133 133
134
									dataHtml += "</div>";
135
									dataHtml += "</div>";
136
									if ($data.data.data[i].id != userid) {
137
										dataHtml += "<div class='operbox'><span class='operbtn onlyConsultbtn' id='"
138
												+ $data.data.data[i]['id']
139
												+ "'>咨询</span></div>";
140
									}
141
										
142
											
143
									$("#professorList").append(dataHtml);
144
									var photoHeight=$(".photo1").eq(i).height();
145
									var middleHeight=$(".synopsis").eq(i).height();									
146
									if(middleHeight<photoHeight) {										
147
										$(".synopsis").eq(i).height(photoHeight);
148
									}
149
									if($data.data.data[i].authType) {
150
										$(".modify").eq(i).addClass("authicon authicon-cu");								
151
									} else {
152
										if($data.data.data[i].authStatus) {
153
											if($data.data.data[i].authentication == 1) {
154
												$(".modify").eq(i).addClass("authicon2 authicon-mana");
155
												//$(".modify").eq(i).html("<span>科研</span>");										
156
											} else if($data.data.data[i].authentication == 2) {
157
												$(".modify").eq(i).addClass("authicon2 authicon-staff");
158
												//$(".modify").eq(i).html("<span>企业</span>");										
159
											} else {
160
												$(".modify").eq(i).addClass("authicon2 authicon-stu");
161
												//$(".modify").eq(i).html("<span>学生</span>");										
162
											}
134
								dataHtml += "</div>";
135
								dataHtml += "</div>";
136
								if($data.data.data[i].id != userid) {
137
									dataHtml += "<div class='operbox'><span class='operbtn onlyConsultbtn' id='" +
138
										$data.data.data[i]['id'] +
139
										"'>咨询</span></div>";
140
								}
141
								var $datahtml = $(dataHtml);
142
								$("#professorList").append(dataHtml);
143
								var photoHeight = $(".photo1").eq(i).height();
144
								var middleHeight = $(".synopsis").eq(i).height();
145
								if(middleHeight < photoHeight) {
146
									$(".synopsis").eq(i).height(photoHeight);
147
								}
148
								if($data.data.data[i].authType) {
149
									$(".modify").eq(i).addClass("authicon authicon-cu");
150
								} else {
151
									if($data.data.data[i].authStatus) {
152
										if($data.data.data[i].authentication == 1) {
153
											$(".modify").eq(i).addClass("authicon2 authicon-mana");
154
											//$(".modify").eq(i).html("<span>科研</span>");										
155
										} else if($data.data.data[i].authentication == 2) {
156
											$(".modify").eq(i).addClass("authicon2 authicon-staff");
157
											//$(".modify").eq(i).html("<span>企业</span>");										
158
										} else {
159
											$(".modify").eq(i).addClass("authicon2 authicon-stu");
160
											//$(".modify").eq(i).html("<span>学生</span>");										
163 161
										}
164
									}						
165
									// 点击查看当前信息
166
									(function(i) {
167
										$('.photo1')
168
												.click(
169
														function() {
170
															if (userid == $data.data.data[i].id) {
171
																$(".infoi")
172
																		.attr(
173
																				"href",
174
																				"information.html");
175
															}
176
														})
177 162
									}
178
179
									)(i);
180
									// 点击查看当前信息
181
									(function(i) {
163
								}
164
								// 点击查看当前信息
165
								(function(i) {
182 166
										$('.synopsis')
183
												.eq(i)
184
												.click(
185
														function() {
186
															if (userid == $data.data.data[i].id) {
187
																location.href = 'information.html';
188
															} else {
189
																location.href = 'information-brow.html?professorId='
190
																		+ $data.data.data[i].id;
191
															}
192
193
														})
167
											.eq(i)
168
											.click(
169
												function() {
170
													location.href = 'information-brow.html?professorId=' +
171
														$data.data.data[i].id;
172
												})
194 173
									}
195 174
196
									)(i);
175
								)(i);
197 176
198 177
							}
199 178
							//找专家点击咨询
200
							$(".onlyConsultbtn").bind("click",clickSeachProConsultHandler);
201
							
202
							if(isbind == true){
179
							$(".onlyConsultbtn").bind("click", clickSeachProConsultHandler);
180
181
							if(isbind == true) {
203 182
								$(".tcdPageCode").createPage({
204
							        pageCount:Math.ceil($data.data.total/pageSize),
205
							        current:$data.data.pageNo,
206
							        backFn:function(p){
207
							        	getData(key,subject,industry,pageSize,p,false);
208
							        }
209
							    });
183
									pageCount: Math.ceil($data.data.total / pageSize),
184
									current: $data.data.pageNo,
185
									backFn: function(p) {
186
										getData(key, subject, industry, pageSize, p, false);
187
									}
188
								});
210 189
							}
211
							
190
212 191
						} else {
213
							$.MsgBox.Alert("message",$data.msg);
192
							$.MsgBox.Alert("message", $data.msg);
214 193
						}
215 194
					}
216 195
				});
217
 			}
218
 			else
219
 			{
220
 				//查询我的所有资源
221
 				$.ajax({
222
 					"url" :"/ajax/resource/pq",
223
 					"type" : "get",	
224
 					"data" : {"key":key,"subject":subject,"industry":industry,"pageSize":pageSize,"pageNo":pageNo,"address":add},
225
 					"contentType" : "application/x-www-form-urlencoded",
226
 					"success" : function(data) 
227
 					{console.log(data);
228
 						if (data.success) 
229
 						{
230
 							$("#professorList").html("");	
231
 							var $da=data.data.data;
232
 							for(var i=0;i<$da.length;i++)
233
 							{
234
 								var add='<div class="item"><div class="remess" resourceId='+$da[i].resourceId+'>'
235
 			                    add+='<a class="resourcephoto headRadius" ><img src="" class="resourceImg" width="100%" height="100%" ></a>'
236
 			                    add+='<div class="synopsis" style="width:66%;">' 			                  
237
 			                     add+='<div class="cousultName"><a class="resouname" href="javascript:void();">'+$da[i].resourceName+'</a></div>'
238
 			                     if($da[i].professor.name){
239
 			                    	 add+='<div class="belongname"><a style="float:left;display:block;">'+$da[i].professor.name+'</a><a class="modicon" style="display:block;top:4px;left:2px;"></a></div>'  
240
 			                    		  } 			                   
241
 			                   if($da[i].professor.title==undefined){
242
 			                	  $da[i].professor.title="";
243
 			                   }
244
 			                  if($da[i].professor.department==undefined){
245
 			                	 $da[i].professor.department="";
246
 			                   }
247
 			                 if($da[i].professor.orgName==undefined){
248
 			                	$da[i].professor.orgName="";
249
			                   }
250
 			                add+='<div style="clear:both"></div><div class="positionbox">'
251
 			                	if($da[i].professor.title&&$da[i].professor.department&&$da[i].professor.orgName){
252
 			                		add+=$da[i].professor.title+","+$da[i].professor.department+","+$da[i].professor.orgName;
253
 			                	}else if(!$da[i].professor.title&&$da[i].professor.department&&$da[i].professor.orgName){
254
 			                		add+=$da[i].professor.department+","+$da[i].professor.orgName;
255
 			                	}else if($da[i].professor.title&&!$da[i].professor.department&&$da[i].professor.orgName){
256
 			                		add+=$da[i].professor.title+","+$da[i].professor.orgName;
257
 			                	}else if($da[i].professor.title&&$da[i].professor.department&&!$da[i].professor.orgName){
258
 			                		add+=$da[i].professor.title+","+$da[i].professor.department;
259
 			                	}else if(!$da[i].professor.title&&!$da[i].professor.department&&$da[i].professor.orgName){
260
 			                		add+=$da[i].professor.orgName
261
 			                	}else if(!$da[i].professor.title&&$da[i].professor.department&&!$da[i].professor.orgName){
262
 			                		add+=$da[i].professor.department
263
 			                	}else if($da[i].professor.title&&!$da[i].professor.department&&!$da[i].professor.orgName){
264
 			                		add+=$da[i].professor.title
265
 			                	}			                	
266
 			                	add+='</div>'
267
 			                    if($da[i].subject)
268
 			                    {
269
 			                    	add+='<div class="ellipsisbox sciencebox"><p>学术领域:'+$da[i].subject+'</p></div>'
270
 			    				}	
271
 								if($da[i].industry)
272
 								{
273
 									add+='<div class="ellipsisbox industrybox"><p>应用行业:'+$da[i].industry+'</p></div>'
274
 								}	
275
 								if($da[i].supportedServices)
276
 								{
277
 									 add+='<div class="ellipsisbox provideservice"><p>应用用途:'+$da[i].supportedServices+'</p></div></div>' 
278
 								}	                                              
279
 			                    add+='<div class="operbox"><span class="operbtn consultbtn" id="'+$da[i]["professor"]["id"]+'">咨询</span><span style="display: none;" class="operbtn applybtn appl" resourceId='+$da[i].resourceId+' resourceName='+$da[i].resourceName+' professor='+$da[i].professor.name+'>申请</span></div>'
280
 			                	add+='</div></div>'
281
 			                		var $add=$(add);
282
 			                	$("#professorList").append($add);			                	
283
 			                	if($da[i].professor.authType) {
284
 			                		$add.find(".modicon").addClass("authicon authicon-cu");								
285
 								} else {
286
 									if($da[i].professor.authStatus) {
287
 										if($da[i].professor.authentication == 1) {
288
 											$add.find(".modicon").addClass("authicon2 authicon-mana");
289
 											//$add.find(".modicon").html("<span style='top:35%'>科研</span>");										
290
 										} else if($da[i].professor.authentication == 2) {
291
 											$add.find(".modicon").addClass("authicon2 authicon-staff");
292
 											//$add.find(".modicon").html("<span style='top:35%'>企业</span>");										
293
 										} else {
294
 											$add.find(".modicon").addClass("authicon2 authicon-stu");
295
 											//$add.find(".modicon").html("<span style='top:35%'>学生</span>");										
296
 										}
297
 									}
298
 								}
299
 			                   if(data.data.data[i].images.length)
300
 								{
301
 								$add.find(".resourceImg").attr("src","/images/resource/"+$da[i].resourceId+".jpg");
302
 								}
303
 								else{
304
 									$add.find(".resourceImg").attr("src","/images/default-resource.jpg");
305
 								}			                 
306
 							}
307
 							if(isbind == true){
308
								$(".tcdPageCode").createPage({
309
							        pageCount:Math.ceil(data.data.total/pageSize),
310
							        current:data.data.pageNo,
311
							        backFn:function(p){
312
							        	getData(key,subject,industry,pageSize,p,false);
313
							        }
314
							    });
196
		} else {
197
			//查询我的所有资源
198
			$.ajax({
199
				"url": "/ajax/resource/pq",
200
				"type": "get",
201
				"data": {
202
					"key": key,
203
					"subject": subject,
204
					"industry": industry,
205
					"pageSize": pageSize,
206
					"pageNo": pageNo,
207
					"address": add
208
				},
209
				"contentType": "application/x-www-form-urlencoded",
210
				"success": function(data) {
211
					console.log(data);
212
					if(data.success) {
213
						$("#professorList").html("");
214
						var $da = data.data.data;
215
						for(var i = 0; i < $da.length; i++) {
216
							var add = '<div class="item"><div class="remess" resourceId=' + $da[i].resourceId + '>'
217
							add += '<div class="clearfix"><a class="resourcephoto headRadius" ><div class="ResImgBox" style="background:#ffffff;"><img class="resImg headRadius resourceImg" src="" /></div></a>'
218
							add += '<div class="synopsis" style="width:66%;">'
219
							add += '<div class="cousultName"><a class="resouname" href="javascript:void();">' + $da[i].resourceName + '</a></div>'
220
							if($da[i].professor.name) {
221
								add += '<div class="belongname"><a style="float:left;display:block;">' + $da[i].professor.name + '</a><a class="modicon" style="display:block;top:4px;left:2px;"></a></div>'
315 222
							}
316
 						}
317
 						 else
318
 						 {
319
 							$.MsgBox.Alert("消息提醒","请先登录再进行咨询");
320
 							$("#mb_btn_ok").val("去登录");
321
 							
322
 						}
323
 						
324
 						//资源中点击咨询
325
						//$(".consultbtn").bind("click",clickResouceConsultHandler);
326
						$(".about").on("click",'.consultbtn',function(e){
327
							
328
							e.stopPropagation();//阻止事件冒泡,影响点击咨询
329
							e.cancelBubble = true;// ie下阻止冒泡
330
							clickResouceConsultHandler($(this),$(this).attr('id'));
331
							
332
						});
333
 					},				
334
 				});	
335
 			}
336
			
337
 		}
338
		
339
 		var subjectList = function (){
340
		$.get("../ajax/dataDict/qaDictCode",{dictCode:"SUBJECT"}, function(data) {
341
			if (data.success) {
223
							if($da[i].professor.title == undefined) {
224
								$da[i].professor.title = "";
225
							}
226
							if($da[i].professor.department == undefined) {
227
								$da[i].professor.department = "";
228
							}
229
							if($da[i].professor.orgName == undefined) {
230
								$da[i].professor.orgName = "";
231
							}
232
							add += '<div style="clear:both"></div><div class="positionbox">'
233
							if($da[i].professor.title && $da[i].professor.department && $da[i].professor.orgName) {
234
								add += $da[i].professor.title + "," + $da[i].professor.department + "," + $da[i].professor.orgName;
235
							} else if(!$da[i].professor.title && $da[i].professor.department && $da[i].professor.orgName) {
236
								add += $da[i].professor.department + "," + $da[i].professor.orgName;
237
							} else if($da[i].professor.title && !$da[i].professor.department && $da[i].professor.orgName) {
238
								add += $da[i].professor.title + "," + $da[i].professor.orgName;
239
							} else if($da[i].professor.title && $da[i].professor.department && !$da[i].professor.orgName) {
240
								add += $da[i].professor.title + "," + $da[i].professor.department;
241
							} else if(!$da[i].professor.title && !$da[i].professor.department && $da[i].professor.orgName) {
242
								add += $da[i].professor.orgName
243
							} else if(!$da[i].professor.title && $da[i].professor.department && !$da[i].professor.orgName) {
244
								add += $da[i].professor.department
245
							} else if($da[i].professor.title && !$da[i].professor.department && !$da[i].professor.orgName) {
246
								add += $da[i].professor.title
247
							}
248
							add += '</div>'
249
							if($da[i].subject) {
250
								add += '<div class="ellipsisbox sciencebox"><p>学术领域:' + $da[i].subject + '</p></div>'
251
							}
252
							if($da[i].industry) {
253
								add += '<div class="ellipsisbox industrybox"><p>应用行业:' + $da[i].industry + '</p></div>'
254
							}
255
							if($da[i].supportedServices) {
256
								add += '<div class="ellipsisbox provideservice"><p>应用用途:' + $da[i].supportedServices + '</p></div></div>'
257
							}
258
							add+="</div>"
259
							if(userid==$da[i]["professor"]["id"]){
260
								add += '<div class="operbox"><span class="operbtn consultbtn" id="' + $da[i]["professor"]["id"] + '" style="display:none;">咨询</span><span style="display: none;" class="operbtn applybtn appl" resourceId=' + $da[i].resourceId + ' resourceName=' + $da[i].resourceName + ' professor=' + $da[i].professor.name + '>申请</span></div>'
261
							}else{
262
								add += '<div class="operbox"><span class="operbtn consultbtn" id="' + $da[i]["professor"]["id"] + '">咨询</span><span style="display: none;" class="operbtn applybtn appl" resourceId=' + $da[i].resourceId + ' resourceName=' + $da[i].resourceName + ' professor=' + $da[i].professor.name + '>申请</span></div>'
263
							}
264
							add += '</div></div>'
265
							var $add = $(add);
266
							$("#professorList").append($add);
267
							if($da[i].professor.authType) {
268
								$add.find(".modicon").addClass("authicon authicon-cu");
269
							} else {
270
								if($da[i].professor.authStatus) {
271
									if($da[i].professor.authentication == 1) {
272
										$add.find(".modicon").addClass("authicon2 authicon-mana");
273
										//$add.find(".modicon").html("<span style='top:35%'>科研</span>");										
274
									} else if($da[i].professor.authentication == 2) {
275
										$add.find(".modicon").addClass("authicon2 authicon-staff");
276
										//$add.find(".modicon").html("<span style='top:35%'>企业</span>");										
277
									} else {
278
										$add.find(".modicon").addClass("authicon2 authicon-stu");
279
										//$add.find(".modicon").html("<span style='top:35%'>学生</span>");										
280
									}
281
								}
282
							}
283
							if(data.data.data[i].images.length) {
284
								$add.find(".resourceImg").attr("src", "/images/resource/" + $da[i].resourceId + ".jpg");
285
							} else {
286
								$add.find(".resourceImg").attr("src", "/images/default-resource.jpg");
287
							}
288
						}
289
						if(isbind == true) {
290
							$(".tcdPageCode").createPage({
291
								pageCount: Math.ceil(data.data.total / pageSize),
292
								current: data.data.pageNo,
293
								backFn: function(p) {
294
									getData(key, subject, industry, pageSize, p, false);
295
								}
296
							});
297
						}
298
					} else {
299
						$.MsgBox.Alert("消息提醒", "请先登录再进行咨询");
300
						$("#mb_btn_ok").val("去登录");
301
302
					}
303
304
					//资源中点击咨询
305
					//$(".consultbtn").bind("click",clickResouceConsultHandler);
306
					$(".about").on("click", '.consultbtn', function(e) {						
307
						e.stopPropagation(); //阻止事件冒泡,影响点击咨询
308
						e.cancelBubble = true; // ie下阻止冒泡
309
						clickResouceConsultHandler($(this), $(this).attr('id'));
310
311
					});
312
				},
313
			});
314
		}
315
316
	}
317
318
	var subjectList = function() {
319
		$.get("../ajax/dataDict/qaDictCode", {
320
			dictCode: "SUBJECT"
321
		}, function(data) {
322
			if(data.success) {
342 323
				console.log(data);
343 324
				/*if (data.data.length <= 10) {
344 325
					$(".andmore").eq(0).hide();
345 326
				}*/
346 327
				$("#subject").find(".sub").remove();
347
				for (var i = 0; i < data.data.length; i++) {
328
				for(var i = 0; i < data.data.length; i++) {
348 329
					$("#subject").append(
349
							"<a href='#' class='sub'title='"
350
									+ data.data[i].caption + "'>"
351
									+ data.data[i].caption + "</a>");
352
					if (subb) {
353
						if (subb == data.data[i].caption) {
330
						"<a href='#' class='sub'title='" +
331
						data.data[i].caption + "'>" +
332
						data.data[i].caption + "</a>");
333
					if(subb) {
334
						if(subb == data.data[i].caption) {
354 335
							$('.sub').eq(i).addClass('colorbg').siblings()
355
									.removeClass("colorbg");
336
								.removeClass("colorbg");
356 337
						}
357 338
					}
358
					if (i > 20)
339
					if(i > 20)
359 340
						break;
360 341
				}
361 342
			} else {
@ -364,18 +345,20 @@ $(function(){
364 345
		})
365 346
	}
366 347
	var Address = function() {
367
		$.get("../ajax/dataDict/qaCity",{dictCode:"ADDRESS"}, function(data) {
368
			if (data.success) {	
348
		$.get("../ajax/dataDict/qaCity", {
349
			dictCode: "ADDRESS"
350
		}, function(data) {
351
			if(data.success) {
369 352
				$("#address").empty();
370 353
				$("#address").prepend('<a href="#" class="colorbg no3" title="">不限</a>');
371 354
				/*if (data.data.length <= 10) {
372 355
					$(".andmore").eq(2).hide();
373 356
				}*/
374
				for (var i = 0; i < data.data.length; i++) {
357
				for(var i = 0; i < data.data.length; i++) {
375 358
					$("#address").append(
376
							"<a href='#' title='" + data.data[i].caption + "'>"
377
									+ data.data[i].caption + "</a>");
378
					if (i > 20)
359
						"<a href='#' title='" + data.data[i].caption + "'>" +
360
						data.data[i].caption + "</a>");
361
					if(i > 20)
379 362
						break;
380 363
				}
381 364
			} else {
@ -384,19 +367,21 @@ $(function(){
384 367
		})
385 368
	}
386 369
	var industryList = function() {
387
		$.get("../ajax/dataDict/qaDictCode",{dictCode:"INDUSTRY"}, function(data) {
370
		$.get("../ajax/dataDict/qaDictCode", {
371
			dictCode: "INDUSTRY"
372
		}, function(data) {
388 373
			console.log(data);
389
			if (data.success) {
374
			if(data.success) {
390 375
				/*if (data.data.length <= 10) {
391 376
					$(".andmore").eq(1).hide();
392 377
				}*/
393 378
				$("#industry").find(".indu").remove();
394
				for (var i = 0; i < data.data.length; i++) {
379
				for(var i = 0; i < data.data.length; i++) {
395 380
					$("#industry").append(
396
							"<a href='#' class='indu'title='"
397
									+ data.data[i].caption + "'>"
398
									+ data.data[i].caption + "</a>");
399
					if (i > 20)
381
						"<a href='#' class='indu'title='" +
382
						data.data[i].caption + "'>" +
383
						data.data[i].caption + "</a>");
384
					if(i > 20)
400 385
						break;
401 386
				}
402 387
			} else {
@ -405,18 +390,18 @@ $(function(){
405 390
		})
406 391
	}
407 392
	var findProfessor = function() {
408
		if (subb) {
409
			subject = subb;
410
		} else {
411
			subject = $("#subject .colorbg")[0].title;
393
			if(subb) {
394
				subject = subb;
395
			} else {
396
				subject = $("#subject .colorbg")[0].title;
397
			}
398
			industry = $("#industry .colorbg")[0].title;
399
			pageSize = 10;
400
			getData(key, subject, industry, pageSize, 1, true, address);
412 401
		}
413
		industry = $("#industry .colorbg")[0].title;
414
		pageSize = 10;
415
		getData(key, subject, industry, pageSize, 1, true, address);
416
	}
417
	// enter键搜索
402
		// enter键搜索
418 403
	function synContent(type) {
419
		if (type == 1) {
404
		if(type == 1) {
420 405
			$("#searchContent").val($("#hsearchContent").val());
421 406
		} else {
422 407
			$("#hsearchContent").val($("#searchContent").val());
@ -428,439 +413,436 @@ $(function(){
428 413
	$("#searchContent").blur(function() {
429 414
		synContent(2);
430 415
	});
431
	$("#searchContent").keydown(function(e){
432
		if(e.which==13) {
433
			synContent(2);		
416
	$("#searchContent").keydown(function(e) {
417
		if(e.which == 13) {
418
			synContent(2);
434 419
			key = $("#searchContent").val();
435 420
			$("#professorList").remove();
436 421
			$(".aboutpro").append(
437
					'<div class="about-in" id="professorList"></div>')
422
				'<div class="about-in" id="professorList"></div>')
438 423
			$(".tcdPageCode").remove();
439 424
			$(".aboutpro").append('<div class="tcdPageCode"></div>');
440 425
			getData(key, subject, industry, 10, 1, true, address);
441 426
		}
442
		
427
443 428
	})
444
	$("#hsearchContent").keydown(function(e){
445
		if(e.which==13) {
429
	$("#hsearchContent").keydown(function(e) {
430
		if(e.which == 13) {
446 431
			synContent(1);
447 432
			key = $("#searchContent").val();
448 433
			$("#professorList").remove();
449 434
			$(".aboutpro").append(
450
					'<div class="about-in" id="professorList"></div>')
435
				'<div class="about-in" id="professorList"></div>')
451 436
			$(".tcdPageCode").remove();
452 437
			$(".aboutpro").append('<div class="tcdPageCode"></div>');
453 438
			getData(key, subject, industry, 10, 1, true, address);
454 439
		}
455 440
	})
456 441
	$("#search1").on(
457
			"click",
458
			function() {
459
				$("#hsearchContent").val($("#searchContent").val());
460
				key = $("#searchContent").val();
461
				$("#professorList").remove();
462
				$(".aboutpro").append(
463
						'<div class="about-in" id="professorList"></div>')
464
				$(".tcdPageCode").remove();
465
				$(".aboutpro").append('<div class="tcdPageCode"></div>');
466
				getData(key, subject, industry, 10, 1, true, address);
467
			})
442
		"click",
443
		function() {
444
			$("#hsearchContent").val($("#searchContent").val());
445
			key = $("#searchContent").val();
446
			$("#professorList").remove();
447
			$(".aboutpro").append(
448
				'<div class="about-in" id="professorList"></div>')
449
			$(".tcdPageCode").remove();
450
			$(".aboutpro").append('<div class="tcdPageCode"></div>');
451
			getData(key, subject, industry, 10, 1, true, address);
452
		})
468 453
	$("#hsearch1").on(
469
			"click",
470
			function() {
471
				$("#searchContent").val($("#hsearchContent").val());
472
				key = $("#hsearchContent").val();
473
				$("#professorList").remove();
474
				$(".aboutpro").append(
475
						'<div class="about-in" id="professorList"></div>')
476
				$(".tcdPageCode").remove();
477
				$(".aboutpro").append('<div class="tcdPageCode"></div>');
478
				getData(key, subject, industry, 10, 1, true, address);
479
			})
454
		"click",
455
		function() {
456
			$("#searchContent").val($("#hsearchContent").val());
457
			key = $("#hsearchContent").val();
458
			$("#professorList").remove();
459
			$(".aboutpro").append(
460
				'<div class="about-in" id="professorList"></div>')
461
			$(".tcdPageCode").remove();
462
			$(".aboutpro").append('<div class="tcdPageCode"></div>');
463
			getData(key, subject, industry, 10, 1, true, address);
464
		})
480 465
481 466
	subjectList();
482 467
	industryList();
483 468
	findProfessor();
484 469
	Address();
485 470
	$(".class1").eq(0).on(
486
			"click",
487
			"a",
488
			function() {
489
				$(this).addClass("colorbg").siblings().removeClass("colorbg");
490
				key = $("#searchContent").val();
491
				subject = $(this).attr('title');
492
				$("#professorList").remove();
493
				$(".aboutpro").append(
494
						'<div class="about-in" id="professorList"></div>')
495
				$(".tcdPageCode").remove();
496
				$(".aboutpro").append('<div class="tcdPageCode"></div>');
497
				getData(key, subject, industry, 10, 1, true, address);
471
		"click",
472
		"a",
473
		function() {
474
			$(this).addClass("colorbg").siblings().removeClass("colorbg");
475
			key = $("#searchContent").val();
476
			subject = $(this).attr('title');
477
			$("#professorList").remove();
478
			$(".aboutpro").append(
479
				'<div class="about-in" id="professorList"></div>')
480
			$(".tcdPageCode").remove();
481
			$(".aboutpro").append('<div class="tcdPageCode"></div>');
482
			getData(key, subject, industry, 10, 1, true, address);
498 483
499
			});
484
		});
500 485
	$(".class1").eq(1).on(
501
			"click",
502
			"a",
503
			function() {
504
				$(this).addClass("colorbg").siblings().removeClass("colorbg");
505
				industry = $(this).attr('title');
506
				key = $("#searchContent").val();
507
				$("#professorList").remove();
508
				$(".aboutpro").append(
509
						'<div class="about-in" id="professorList"></div>')
510
				$(".tcdPageCode").remove();
511
				$(".aboutpro").append('<div class="tcdPageCode"></div>');
512
				getData(key, subject, industry, 10, 1, true, address);
513
			});
486
		"click",
487
		"a",
488
		function() {
489
			$(this).addClass("colorbg").siblings().removeClass("colorbg");
490
			industry = $(this).attr('title');
491
			key = $("#searchContent").val();
492
			$("#professorList").remove();
493
			$(".aboutpro").append(
494
				'<div class="about-in" id="professorList"></div>')
495
			$(".tcdPageCode").remove();
496
			$(".aboutpro").append('<div class="tcdPageCode"></div>');
497
			getData(key, subject, industry, 10, 1, true, address);
498
		});
514 499
	$(".class1").eq(2).on(
515
			"click",
516
			"a",
517
			function() {
518
				$(this).addClass("colorbg").siblings().removeClass("colorbg");
519
				address = $(this).attr('title');
520
				key = $("#searchContent").val();
521
				$("#professorList").remove();
522
				$(".aboutpro").append(
523
						'<div class="about-in" id="professorList"></div>')
524
				$(".tcdPageCode").remove();
525
				$(".aboutpro").append('<div class="tcdPageCode"></div>');
526
				getData(key, subject, industry, 10, 1, true, address);
527
			});
500
		"click",
501
		"a",
502
		function() {
503
			$(this).addClass("colorbg").siblings().removeClass("colorbg");
504
			address = $(this).attr('title');
505
			key = $("#searchContent").val();
506
			$("#professorList").remove();
507
			$(".aboutpro").append(
508
				'<div class="about-in" id="professorList"></div>')
509
			$(".tcdPageCode").remove();
510
			$(".aboutpro").append('<div class="tcdPageCode"></div>');
511
			getData(key, subject, industry, 10, 1, true, address);
512
		});
528 513
	/* 搜索分类展开 */
529 514
	var listi = 0;
530 515
	$(".andmore").click(function() {
531 516
		$(this).find(".updown").css("background-position", "left");
532 517
		$(this).parent().css("height", "48px");
533
		if (listi % 2 == 0) {
534
	
518
		if(listi % 2 == 0) {
519
535 520
		} else {
536 521
			$(this).find(".updown").css("background-position", "right");
537 522
			$(this).parent().css("height", "auto");
538
	
523
539 524
		}
540 525
		listi++;
541
	 })
542
	 
526
	})
527
543 528
	/*搜索分类背景切换*/
544
	$(".class1").on("click","a",function (){
529
	$(".class1").on("click", "a", function() {
545 530
		$(this).addClass("colorbg").siblings().removeClass("colorbg");
546
	}) 
547
	
531
	})
532
548 533
	/*专家、资源菜单切换*/
549
//	$(".lookwho").change(function(){
550
//		//$(this).addClass("tabcurrent").siblings().removeClass("tabcurrent");
551
//		//$(".aboutcon").eq($(this).index()).show().siblings().hide();
552
//		if($(this).value == "0"){
553
//			$(".aboutpro").show();
554
//			$(".aboutresou").hide();	
555
//		}
556
//		else{
557
//			$(".aboutresou").show();
558
//			$(".aboutpro").hide();
559
//		}
560
//		
561
//	})
562
	
563
	 //判断是搜寻专家还是资源
534
	//	$(".lookwho").change(function(){
535
	//		//$(this).addClass("tabcurrent").siblings().removeClass("tabcurrent");
536
	//		//$(".aboutcon").eq($(this).index()).show().siblings().hide();
537
	//		if($(this).value == "0"){
538
	//			$(".aboutpro").show();
539
	//			$(".aboutresou").hide();	
540
	//		}
541
	//		else{
542
	//			$(".aboutresou").show();
543
	//			$(".aboutpro").hide();
544
	//		}
545
	//		
546
	//	})
547
548
	//判断是搜寻专家还是资源
564 549
	$(".lishow li").on(
565
			"click",
566
			function() {
567
				c = $(this).index();
568
569
				$("#industry").find(".no2").addClass("colorbg").siblings()
570
						.removeClass("colorbg");
571
				$("#subject").find(".nox").addClass("colorbg").siblings()
572
						.removeClass("colorbg");
573
				key = $("#searchContent").val();
574
				industry = "";
575
				subject = "";
576
				address = "";
577
				if (c == 0) {
578
					sub = "SUBJECT";
579
					indu = "INDUSTRY";
580
				} else {
581
					sub = "SUBJECT";
582
					indu = "INDUSTRY";
550
		"click",
551
		function() {
552
			c = $(this).index();
583 553
584
				}
585
				industryList();
586
				subjectList();
587
				Address();
588
				$("#professorList").remove();
589
				$(".aboutpro").append(
590
						'<div class="about-in" id="professorList"></div>')
591
				$(".tcdPageCode").remove();
592
				$(".aboutpro").append('<div class="tcdPageCode"></div>');
593
				getData(key, subject, industry, pageSize, 1, true, address);
594
			});
554
			$("#industry").find(".no2").addClass("colorbg").siblings()
555
				.removeClass("colorbg");
556
			$("#subject").find(".nox").addClass("colorbg").siblings()
557
				.removeClass("colorbg");
558
			key = $("#searchContent").val();
559
			industry = "";
560
			subject = "";
561
			address = "";
562
			if(c == 0) {
563
				sub = "SUBJECT";
564
				indu = "INDUSTRY";
565
			} else {
566
				sub = "SUBJECT";
567
				indu = "INDUSTRY";
568
569
			}
570
			industryList();
571
			subjectList();
572
			Address();
573
			$("#professorList").remove();
574
			$(".aboutpro").append(
575
				'<div class="about-in" id="professorList"></div>')
576
			$(".tcdPageCode").remove();
577
			$(".aboutpro").append('<div class="tcdPageCode"></div>');
578
			getData(key, subject, industry, pageSize, 1, true, address);
579
		});
595 580
	// 查询资源详细信息
596 581
	$('.about')
597
			.on(
598
					"click",
599
					'.remess',
600
					function() {
601
						var resourceID = $(this).attr("resourceId");
602
						ResourceMessage();
603
						$
604
								.ajax({
605
									"url" : "/ajax/resource/" + resourceID,
606
									"type" : "get",
607
									"async" : true,
608
									"success" : function(info) {
609
										if (info.success) {
610
											$("#resourceName").text(
611
													info.data.resourceName);
612
											$("#supportedServices")
613
													.text(
614
															info.data.supportedServices);
615
											$("#hopePayMethod").text(
616
													info.data.hopePayMethod);
617
											$("#cooperationNotes").text(
618
													info.data.cooperationNotes);
619
											$("#subject").text(
620
													info.data.subject);
621
											$("#industry").text(
622
													info.data.industry);
623
											$("#descp").text(info.data.descp);
624
											$("#professor").text(
625
													info.data.professor.name);
626
											$(".resouImage").attr(
627
													"src",
628
													"/images/resource/"
629
															+ resourceID
630
															+ ".jpg");
631
											$(".resouImage")
632
													.load(function() {
633
													})
634
													.error(
635
															function() {
636
																$(this)
637
																		.attr(
638
																				"src",
639
																				"/images/default-resource.jpg");
640
															});
641
											limitHeight();
642
										} else {
643
											$.MsgBox.Alert('消息提醒', "系统异常!");
644
										}
645
									},
646
									"error" : function() {
647
										$.MsgBox.Alert('message', 'failed')
648
									}
649
								});
650
					})
651
	// 资源申请
582
		.on(
583
			"click",
584
			'.remess',
585
			function() {
586
				var resourceID = $(this).attr("resourceId");
587
				location.href="resourceInfo.html?resourceId="+resourceID;
588
				//ResourceMessage();
589
//				$
590
//					.ajax({
591
//						"url": "/ajax/resource/" + resourceID,
592
//						"type": "get",
593
//						"async": true,
594
//						"success": function(info) {
595
//							if(info.success) {
596
//								$("#resourceName").text(
597
//									info.data.resourceName);
598
//								$("#supportedServices")
599
//									.text(
600
//										info.data.supportedServices);
601
//								$("#hopePayMethod").text(
602
//									info.data.hopePayMethod);
603
//								$("#cooperationNotes").text(
604
//									info.data.cooperationNotes);
605
//								$("#subject").text(
606
//									info.data.subject);
607
//								$("#industry").text(
608
//									info.data.industry);
609
//								$("#descp").text(info.data.descp);
610
//								$("#professor").text(
611
//									info.data.professor.name);
612
//								$(".resouImage").attr(
613
//									"src",
614
//									"/images/resource/" +
615
//									resourceID +
616
//									".jpg");
617
//								$(".resouImage")
618
//									.load(function() {})
619
//									.error(
620
//										function() {
621
//											$(this)
622
//												.attr(
623
//													"src",
624
//													"/images/default-resource.jpg");
625
//										});
626
//								limitHeight();
627
//							} else {
628
//								$.MsgBox.Alert('消息提醒', "系统异常!");
629
//							}
630
//						},
631
//						"error": function() {
632
//							$.MsgBox.Alert('message', 'failed')
633
//						}
634
//					});
635
			})
636
		// 资源申请
652 637
	function getIdentity(professorId) {
653 638
		$
654
				.ajax({
655
					"url" : "ajax/professor/" + professorId,
656
					"type" : "get",
657
					"async" : false,
658
					"success" : function(data) {
659
						if (data.success) {
660
							$(".frmtype option")[0].value = data.data.name;
661
							$(".frmtype option")[1].value = data.data.organization.name;
662
						} else {
663
							$.MsgBox.Alert("消息提醒", "系统异常!");
664
						}
665
					},
666
					"error" : function() {
667
						$.MsgBox.Alert('message', 'failddd')
639
			.ajax({
640
				"url": "ajax/professor/" + professorId,
641
				"type": "get",
642
				"async": false,
643
				"success": function(data) {
644
					if(data.success) {
645
						$(".frmtype option")[0].value = data.data.name;
646
						$(".frmtype option")[1].value = data.data.organization.name;
647
					} else {
648
						$.MsgBox.Alert("消息提醒", "系统异常!");
668 649
					}
669
				})
650
				},
651
				"error": function() {
652
					$.MsgBox.Alert('message', 'failddd')
653
				}
654
			})
670 655
	}
656
671 657
	function replaceStr(s) {
672 658
		var pattern = new RegExp("-");
673 659
		var rs = "";
674
		for (var i = 0; i < s.length; i++) {
660
		for(var i = 0; i < s.length; i++) {
675 661
			rs = rs + s.substr(i, 1).replace(pattern, '');
676 662
		}
677 663
		return rs;
678 664
	}
679 665
	$('.aboutpro')
680
			.on(
681
					"click",
682
					'.appl',
683
					function() {
684
						ResourceApply();// 调用资源申请HTML创建函数
685
						$(".limitBox").removeClass("limitBox");
686
						$(".limitwords").removeClass("limitwords");
687
						$(".limitwordbox").removeClass("limitwordbox");
688
						// 获取当前时间并且格式化时间
689
						var myDate = new Date();
690
						var nowYear = myDate.getFullYear();
691
						var nowMonth = myDate.getMonth() + 1;
692
						var nowDate = myDate.getDate();
693
						if (nowMonth < 10) {
694
							nowMonth = "0" + nowMonth.toString();
695
						}
696
						if (nowDate < 10) {
697
							nowDate = "0" + nowDate.toString();
666
		.on(
667
			"click",
668
			'.appl',
669
			function() {
670
				ResourceApply(); // 调用资源申请HTML创建函数
671
				$(".limitBox").removeClass("limitBox");
672
				$(".limitwords").removeClass("limitwords");
673
				$(".limitwordbox").removeClass("limitwordbox");
674
				// 获取当前时间并且格式化时间
675
				var myDate = new Date();
676
				var nowYear = myDate.getFullYear();
677
				var nowMonth = myDate.getMonth() + 1;
678
				var nowDate = myDate.getDate();
679
				if(nowMonth < 10) {
680
					nowMonth = "0" + nowMonth.toString();
681
				}
682
				if(nowDate < 10) {
683
					nowDate = "0" + nowDate.toString();
684
				}
685
				var now = nowYear + "-" + nowMonth + "-" + nowDate;
686
				$("#datepicker").val(now);
687
				$("#datepicker").datepicker({
688
					"dateFormat": " yy-mm-dd"
689
				});
690
				$(".timelo").css("display", "none");
691
				var resName = $(this).attr("resourcename");
692
				var name = $(this).attr("professor");
693
				var resourceID = $(this).attr("resourceId");
694
				$
695
					.ajax({
696
						"url": "/ajax/resource/" + resourceID,
697
						"type": "get",
698
						"async": false,
699
						"success": function(info) {
700
							if(info.success) {
701
								if(info.data.images.length) {
702
									$(".resouImage").attr(
703
										"src",
704
										"/images/resource/" +
705
										resourceID +
706
										".jpg");
707
								} else {
708
									$(".resouImage")
709
										.attr("src",
710
											"/images/default-resource.jpg");
711
								}
712
							}
698 713
						}
699
						var now = nowYear + "-" + nowMonth + "-" + nowDate;
700
						$("#datepicker").val(now);
701
						$("#datepicker").datepicker({
702
							"dateFormat" : " yy-mm-dd"
703
						});
704
						$(".timelo").css("display", "none");
705
						var resName = $(this).attr("resourcename");
706
						var name = $(this).attr("professor");
707
						var resourceID = $(this).attr("resourceId");
708
						$
714
					})
715
				$(".namecon").text(name);
716
				$(".applysure").hide();
717
				$(".btnboxup").hide();
718
				$(".log").text(resName);
719
				getIdentity(userid);
720
				$("#deliver")
721
					.on(
722
						"click",
723
						function() {
724
							var $data = {};
725
							$data.demandId = userid;
726
							$data.resourceId = resourceID;
727
							$data.detailDemand = $(".detail")
728
								.val();
729
							// 去除时间里面的- 和字符串前后的空格
730
							$data.deliverTime = replaceStr($
731
								.trim($(".dealTime").val()));
732
							$data.operationStatus = 1;
733
							$data.applysquare = $(
734
									".frmtype option:selected")
735
								.val();
736
							$
709 737
								.ajax({
710
									"url" : "/ajax/resource/" + resourceID,
711
									"type" : "get",
712
									"async" : false,
713
									"success" : function(info) {
714
										if (info.success) {
715
											if (info.data.images.length) {
716
												$(".resouImage").attr(
717
														"src",
718
														"/images/resource/"
719
																+ resourceID
720
																+ ".jpg");
721
											} else {
722
												$(".resouImage")
723
														.attr("src",
724
																"/images/default-resource.jpg");
725
											}
738
									"url": "/ajax/operation",
739
									"type": "POST",
740
									"success": function(
741
										rdata) {
742
										if(rdata.success) {
743
											$.MsgBox
744
												.Alert(
745
													'消息提醒',
746
													'资源"' +
747
													resName +
748
													'"申请发送成功!');
749
											$(".blackcover")
750
												.remove();
751
											$("body")
752
												.css(
753
													"position",
754
													"static");
755
											// location.reload(true);
756
										} else {
757
											$.MsgBox
758
												.Alert(
759
													'消息提醒',
760
													'资源"' +
761
													resName +
762
													'"申请发送失败,请重新申请!');
726 763
										}
727
									}
728
								})
729
						$(".namecon").text(name);
730
						$(".applysure").hide();
731
						$(".btnboxup").hide();
732
						$(".log").text(resName);
733
						getIdentity(userid);
734
						$("#deliver")
735
								.on(
736
										"click",
737
										function() {
738
											var $data = {};
739
											$data.demandId = userid;
740
											$data.resourceId = resourceID;
741
											$data.detailDemand = $(".detail")
742
													.val();
743
											// 去除时间里面的- 和字符串前后的空格
744
											$data.deliverTime = replaceStr($
745
													.trim($(".dealTime").val()));
746
											$data.operationStatus = 1;
747
											$data.applysquare = $(
748
													".frmtype option:selected")
749
													.val();
750
											$
751
													.ajax({
752
														"url" : "/ajax/operation",
753
														"type" : "POST",
754
														"success" : function(
755
																rdata) {
756
															if (rdata.success) {
757
																$.MsgBox
758
																		.Alert(
759
																				'消息提醒',
760
																				'资源"'
761
																						+ resName
762
																						+ '"申请发送成功!');
763
																$(".blackcover")
764
																		.remove();
765
																$("body")
766
																		.css(
767
																				"position",
768
																				"static");
769
																// location.reload(true);
770
															} else {
771
																$.MsgBox
772
																		.Alert(
773
																				'消息提醒',
774
																				'资源"'
775
																						+ resName
776
																						+ '"申请发送失败,请重新申请!');
777
															}
778
														},
779
														"data" : $data,
780
														"beforeSend" : function() {/* console.log(this.data) */
781
														},
782
														"contentType" : "application/x-www-form-urlencoded",
783
														dataType : "json"
784
													});
785
										});
786
					});
764
									},
765
									"data": $data,
766
									"beforeSend": function() { /* console.log(this.data) */ },
767
									"contentType": "application/x-www-form-urlencoded",
768
									dataType: "json"
769
								});
770
						});
771
			});
787 772
788 773
	// 找专家中 点击咨询处理函数
789 774
	function clickSeachProConsultHandler() {
790 775
791
		if (userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
776
		if(userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
792 777
			var professorId = $(this).attr("id");
793
			
778
794 779
			ConsultApply();
795 780
			//点击的发送
796
			$("#sendConsultBtn").click(function(){
781
			$("#sendConsultBtn").click(function() {
797 782
				sendConsultHandler($(this).attr("proId"))
798 783
			});
799 784
			concultProInfo(professorId);
800
			
801
		}else {
802
			$.MsgBox.Alert("消息提醒","请先登录再进行咨询");
785
786
		} else {
787
			$.MsgBox.Alert("消息提醒", "请先登录再进行咨询");
803 788
			$("#mb_btn_ok").val("去登录");
804 789
			var aele = document.createElement('a');
805 790
			$("#mb_btnbox").append(aele);
806 791
			$("#mb_btnbox a").css({
807
				'display':"block",
808
				'width':'100%',
809
				'height':'40px',
810
				'position':'absolute',
811
				'bottom':'-6px',
812
				'left':'0'
813
				});
792
				'display': "block",
793
				'width': '100%',
794
				'height': '40px',
795
				'position': 'absolute',
796
				'bottom': '-6px',
797
				'left': '0'
798
			});
814 799
			aele.setAttribute('href', '../login.html');
815 800
		}
816
			
817
	 };
818
	 
819
	 
820
	 
821
	 //找资源中 点击咨询 obj点击对象
822
	 function clickResouceConsultHandler(obj,professorId){
823
		
824
		if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined'){
825
			
826
//			var professorId = $(this).attr("id");
801
802
	};
803
804
	//找资源中 点击咨询 obj点击对象
805
	function clickResouceConsultHandler(obj, professorId) {
806
807
		if(userid && userid != null && userid != 'null' && userid != undefined && userid != 'undefined') {
808
809
			//			var professorId = $(this).attr("id");
827 810
			ConsultApply();
828 811
			//默认选中资源咨询和标题
829
			for(var i = 0; i < $("ul.menucon").children().length;i++){
812
			for(var i = 0; i < $("ul.menucon").children().length; i++) {
830 813
				$("ul.menucon").children().eq(i).removeClass("clicknow");
831 814
				$("ul.menucon").children().eq(1).addClass("clicknow");
832 815
			}
833
			
816
834 817
			var item = obj.parent().parent().parent();
835 818
			var consultTitleVal = item.find(".resouname").text();
836
			
837
			$("#consultTitle").val("关于"+consultTitleVal+"的咨询");
819
820
			$("#consultTitle").val("关于" + consultTitleVal + "的咨询");
838 821
			//点击的发送
839
			$("#sendConsultBtn").click(function(){
840
				sendConsultHandler($(this).attr("proId"));//common.js中
822
			$("#sendConsultBtn").click(function() {
823
				sendConsultHandler($(this).attr("proId")); //common.js中
841 824
			});
842
			concultProInfo(professorId);//common.js中
843
					
844
		}else {
845
			
846
			$.MsgBox.Alert("消息提醒","请先登录再进行咨询");
825
			concultProInfo(professorId); //common.js中
826
827
		} else {
828
829
			$.MsgBox.Alert("消息提醒", "请先登录再进行咨询");
847 830
			$("#mb_btn_ok").val("去登录");
848 831
			var aele = document.createElement('a');
849 832
			$("#mb_btnbox").append(aele);
850 833
			$("#mb_btnbox a").css({
851
				'display':"block",
852
				'width':'100%',
853
				'height':'40px',
854
				'position':'absolute',
855
				'bottom':'-6px',
856
				'left':'0'
857
				});
834
				'display': "block",
835
				'width': '100%',
836
				'height': '40px',
837
				'position': 'absolute',
838
				'bottom': '-6px',
839
				'left': '0'
840
			});
858 841
			aele.setAttribute('href', '../login.html');
859 842
		}
860
		 
861
	 };
862 843
863
	 
844
	};
845
864 846
	/* function sendConsultHandler(){
865 847
		 	var professorId = $(this).attr("proId");
866 848
			var consult_type = $(".clicknow").text();//咨询类型
@ -917,7 +899,5 @@ $(function(){
917 899
			}
918 900
919 901
		}*/
920
	 
921
	 
922
});
923
 
902
903
});

+ 1 - 1
js/workindex.js

@ -107,7 +107,7 @@ $(function(){
107 107
					for(var i=0;i<data.data.length;i++)
108 108
						{
109 109
						    var add='<div class="addworkbtn-list"> <div class="resoumag">'
110
						    	add+='<h3><img src="" class="resourceImg"></h3>'               
110
						    	add+='<div class="ResImgBox" style="max-width:200px;width:200px;height: 200px;"><img class="resImg headRadius resourceImg" src="" /></div>'               
111 111
								add+='<h2>'+data.data[i].resourceName+'</h2>' 
112 112
								add+='<p>'+data.data[i].supportedServices+'</p>' 
113 113
								add+='</div></div>'; 	

+ 196 - 0
resourceInfo.html

@ -0,0 +1,196 @@
1
 <!DOCTYPE html>
2
<html>
3
<head>
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
6
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7
<title>科袖-资源信息</title>
8
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.png" media="screen" />
9
<link href="css/bootstrap.min.css" rel="stylesheet">
10
<link rel="stylesheet" href="css/reset.css" />
11
<link rel="stylesheet" type="text/css" href="css/style.css" />
12
<link type="text/css" href="css/index.css" rel="stylesheet">
13
<link type="text/css" href="css/common.css" rel="stylesheet">
14
15
</head>
16
17
<body>
18
19
<div id="header">
20
	<a href="index.html" alt="科袖" class="logo"></a>
21
	<div class="searchblock" style="display:block;">
22
		<input type="text" placeholder="搜索专家、研发资源" class="search-txt" id="hsearchContent">
23
		<div class="search-btn" id="hsearch"><span class="search-icon"></span></div>
24
	</div>
25
	<div class="header-right"> 
26
        <!--未登录-->
27
        <div class="unlogin">
28
        	<a class="loginbtn loginlbtn" href="login-invite-code.html">特邀专家登录</a>
29
        	<a class="loginbtn loginrbtn" href="login.html">登录&nbsp;&nbsp;|</a>
30
        	<a class="loginbtn loginrbtn" href="register.html">注册</a>
31
        </div>
32
        <!--已登录-->
33
        <div class="onlogin">
34
        	<a class="myWorkspace" href="workspaces.html">我的工作台</a>
35
	        <div class="head-portrait headRadius">
36
	        	<img class="portrait-p" />
37
	            <div class="personal-infor">
38
	                <div class="triangleB"></div>
39
	                <div class="personal-box bgRadius">
40
	                    <!-- <a href="#"><span class="icon icon1"></span>我的主页</a> -->
41
	                    <a href="information.html"><span class="icon icon2"></span>修改资料</a>
42
	                    <a href="account-set.html"><span class="icon icon3"></span>账户设置</a>
43
	                    <a href="#" onClick="exit()"><span class="icon icon4"></span>退出登录</a>
44
	                </div>
45
	                
46
	            </div>
47
	        </div>
48
	        
49
        </div>
50
	</div>
51
</div>
52
<div id="container" style="background: #f8f8f8;">
53
	<div class="contentBody clearfix">
54
		<div class="resouLeft floatL">
55
			<div class="resTop clearfix">
56
				<div class="ResImgBox beforMargin floatL" style="max-width: 300px;width:300px;height: 300px;">
57
					<img class="resImg headRadius" src="images/default-resource.jpg" id="resouImg"/>
58
				</div>
59
				<div class="resBrief floatR">
60
					<div class="h2Font"></div>
61
					<div class="h3Font"><span class="subtit">应用用途 </span> <span id="application"></span></div>
62
					<div class="resAbout">
63
						<div class="resUlbox clearfix">
64
							<span class="subtit floatL">学术领域</span>
65
							<ul class="resUl floatL" id="subjectList">
66
							</ul>
67
						</div>
68
						<div class="resUlbox clearfix">
69
							<span class="subtit floatL">应用行业</span>
70
							<ul class="resUl floatL" id="industryList">
71
							</ul>
72
						</div>
73
						<div class="resUlbox clearfix">
74
							<span class="subtit floatL">合作备注</span>
75
							<div class="resUl floatL" style="padding:4px 2px" id="cooperationNote">
76
								 
77
							</div>
78
						</div>
79
					</div>
80
					<div class="coulstbtn" style="position:absolute;bottom:30px;">
81
						<span>咨询</span>
82
					</div>
83
				</div>
84
			</div>
85
			<div class="resBottom">
86
				<div class="right-title"><span>详细描述</span></div>
87
				<div class="resMore">
88
					
89
				</div>
90
			</div>
91
		</div>
92
		<div class="resouRight floatR">
93
			<div class="rightBlock">
94
				<a style="display: block;" >
95
					<div class="proImg">
96
						<img class=" headRadius" src="images/default-photo.jpg" id="headImg" style="display:block;">
97
					</div>
98
					<div class="proInfo">
99
						<div class="h3Font clearfix">
100
							<span class="named" id="nameS"></span>
101
							<span class="modifyicon authicon authicon-cu" style="margin-top:3px;" ></span>
102
						</div>
103
						<p class="h5Font"><span id="title">职称</span><span id="office">,职位</span></p>
104
						<p class="h5Font"><span id="department">所属部门</span></p>
105
						<p class="h5Font"><span id="orgName">所在机构</span></p>
106
						<p class="h6Font" style="margin: 0;" id="address"><span>所在城市</span></p>
107
					</div>
108
				</a>
109
			</div>
110
			<div class="rightBlock">
111
				<div class="left-title" >相关资源</div>
112
				<ul class="otherRes">
113
					<li>
114
						<a class="resoumag" href="resourceInfo.html">
115
							<div class="ResImgBox beforMargin resourceImgBox">
116
								<img class="resImg headRadius resourceImg" src="images/default-resource.jpg" />
117
							</div>
118
							<h2>资源名称</h2>
119
						</a>
120
					</li>
121
					<li>
122
						<a class="resoumag" href="resourceInfo.html">
123
							<div class="ResImgBox beforMargin resourceImgBox">
124
								<img class="resImg headRadius resourceImg" src="images/default-resource.jpg" />
125
							</div>
126
							<h2>资源名称</h2>
127
						</a>
128
					</li>
129
					<li>
130
						<a class="resoumag" href="resourceInfo.html">
131
							<div class="ResImgBox beforMargin resourceImgBox">
132
								<img class="resImg headRadius resourceImg" src="images/default-resource.jpg" />
133
							</div>
134
							<h2>资源名称</h2>
135
						</a>
136
					</li>
137
				</ul>
138
				<!--<div style="text-align: center;margin: 10px;"><a href="" style="text-align: center;color: #FF9900;">查看更多</a></div>-->
139
			</div>
140
		</div>
141
	</div>
142
</div>
143
144
<div id="footer" class="clearfix">
145
    <div class="wrapper clearfix">
146
        <i class="footer-logo floatL"></i>
147
        <div class="word_wrapper floatL">
148
        	<a class="listlink" href="javascript:void(0);" target="_blank" rel="nofollow">关于我们</a><span> | </span>
149
            <a class="listlink" href="privacy.html" target="_blank" rel="nofollow">用户协议</a><span> | </span>
150
            <a class="listlink" href="download.html" target="_blank" rel="nofollow">产品下载</a><span> | </span>
151
            <a class="listlink codehover" href="javascript:void(0);" rel="nofollow">科袖微信
152
            	<div class="code weixin_code"></div> 
153
            </a><span> | </span>
154
            <a class="listlink codehover" href="javascript:void(0);" rel="nofollow">科袖APP
155
            	<div class="code app_code"></div> 
156
            </a><span> | </span>
157
            <span class="listlink">客服邮箱:<a style="color:#fff" target="_black" rel="nofollow" href=""> service@ekexiu.com</a></span>
158
            <span> | </span>
159
            <span class="listlink">客服热线: 010-62343359(9:00-17:00)</span>
160
        </div>
161
        <!--<div class="inner_wrapper floatR">
162
        	<div class="codebox">
163
           		<span class="code weixin_code"></span> 
164
                <p>科袖微信公众号</p>
165
           </div>
166
        </div>-->
167
    </div>
168
    <div class="copyright">
169
        <span><em> © </em>2016 北京科袖科技有限公司</span>
170
        <span> | 京ICP备16042588号-1 | </span>
171
        <a class="beianbox" target="_black" rel="nofollow" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010802022306"><span class="beian-icon"></span> 京公网安备11010802022306号</a>
172
    </div>
173
</div>
174
175
<!--咨询模块按钮入口-->
176
 <div class="coulstblock">    
177
    <div class="coulstbox" id="consultbtn">
178
    	<div class="prohead headRadius floatL"><img src="images/default-photo.jpg" width="100%" height="100%" id="foot_proimg"></div>
179
    	<div class="proinfomation floatL">
180
    		<div class="clearfix">
181
    			<a class="authobject named" id="foot_proname"></a>
182
    			<em class=" authicon-cu" id="foot_promodify"></em>
183
    		</div>
184
			<div class="position"><span id="foot_protitle"></span><span></span ></div>				
185
			<div class="science"><span id="foot_prodepar"></span><span id="foot_proorgname"></span ><span class="address" id="foot_proaddress"></span></div>								
186
    	</div>
187
        <div class="coulstbtn floatR"><span>咨询</span></div>
188
    </div>
189
</div>
190
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
191
<script type="text/javascript" src="/js/jquery.cookie.js"></script>
192
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
193
<script type="text/javascript" src="/js/common.js"></script>
194
<script type="text/javascript" src="/js/resourceInfo.js"></script>
195
</body>
196
</html>

+ 768 - 0
shareProinfor.html

@ -0,0 +1,768 @@
1
<!DOCTYPE html>
2
<html>
3
4
	<head>
5
		<meta charset="UTF-8">
6
		<title></title>
7
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
8
		<link rel="stylesheet" href="css/reset.css" />
9
		<link rel="stylesheet" href="css/common.css" />
10
	</head>
11
	<style>
12
		html,
13
		body {
14
			background: #efeff4;
15
		}
16
		/*input输入相关*/
17
		
18
		.frmbox {
19
			width: 100%;
20
			margin: 2% auto;
21
			border-radius: 6px;
22
		}
23
		
24
		.frmtype {
25
			width: 100%;
26
			margin: auto;
27
			line-height: 30px;
28
			padding: 1% 2%;
29
			font-size: 14px;
30
			line-height: 20px;
31
		}
32
		
33
		.frmbtn {
34
			width: 100%;
35
			margin: 4% auto;
36
			font-size: 14px;
37
			line-height: 24px;
38
			padding: 1% 2%;
39
			border: 1px solid #FF9900;
40
			border-radius: 6px;
41
			color: #FF9900;
42
		}
43
		
44
		.frmbox {
45
			border: none;
46
			width: 90%;
47
			height: 100%;
48
		}
49
		
50
		.frmactive {
51
			color: #fff;
52
			background-color: #FF9900;
53
			border: 1px solid #FF9900;
54
		}
55
		
56
		.clearfix:before,
57
		.clearfix:after {
58
			display: table;
59
			content: " "
60
		}
61
		
62
		.clearfix:after {
63
			clear: both
64
		}
65
		
66
		.pull-right {
67
			float: right!important
68
		}
69
		
70
		.pull-left {
71
			float: left!important
72
		}
73
		
74
		.alignCenter {
75
			text-align: center;
76
		}
77
		
78
		.displayNone {
79
			display: none;
80
		}
81
		
82
		.displayBlock {
83
			display: block;
84
		}
85
		/*圆角*/
86
		/*头像、资源圆角*/
87
		
88
		.headRadius {
89
			border-radius: 4px;
90
		}
91
		/*底板背景圆角*/
92
		
93
		.bgRadius {
94
			border-radius: 6px;
95
		}
96
		
97
		.blockGroup {
98
			background: #fff;
99
		}
100
		
101
		.mainbox {
102
			width: 96%;
103
			margin: 2% auto;
104
		}
105
		
106
		.maincon {
107
			padding: 4% 2%;
108
			overflow: hidden;
109
		}
110
		
111
		.listtit {
112
			font-size: 14px;
113
			color: #333333;
114
		}
115
		/*中标题*/
116
		
117
		.listtit2 {
118
			font-size: 13px;
119
			color: #666666;
120
		}
121
		/*较小标题*/
122
		
123
		.listtit3 {
124
			font-size: 12px;
125
			color: #888888;
126
		}
127
		/*小标题*/
128
		
129
		.mui-ellipsis {
130
			overflow: hidden;
131
			white-space: nowrap;
132
			text-overflow: ellipsis;
133
		}
134
		/*资源图片*/
135
		
136
		.ResImgBox {
137
			display: inline-block;
138
			text-align: center;
139
			max-width: 64px;
140
			width: 64px;
141
			height: 60px;
142
			padding: 1px;
143
			background: #FAFAFA;
144
			border: 1px solid #F8F8F8;
145
			overflow: hidden;
146
			padding: 2px;
147
			margin: 6px 0;
148
			border-radius: 4px;
149
		}
150
		
151
		.ResImgBox2 {
152
			margin: 6px 0 6px 10px;
153
		}
154
		
155
		.ResImgBox .resImg {
156
			max-width: 100%;
157
			max-height: 100%;
158
			vertical-align: middle;
159
			position: relative;
160
		}
161
		
162
		.ResImgBox:before {
163
			content: ' ';
164
			display: inline-block;
165
			vertical-align: middle;
166
			width: 0;
167
			height: 100%;
168
			overflow: hidden;
169
			margin-left: -4px;
170
		}
171
		/*专家相关信息*/
172
		
173
		.personinfo .listtit3 {
174
			font-size: 14px;
175
			line-height: 24px;
176
			color: #AAAAAA;
177
			margin: 0;
178
		}
179
		
180
		.personinfo .listtit {
181
			font-size: 18px;
182
			line-height: 30px;
183
			color: #333333;
184
		}
185
		
186
		.personinfo .listtit3 {
187
			font-size: 14px;
188
			line-height: 24px;
189
			color: #AAAAAA;
190
			margin: 0;
191
		}
192
		
193
		.headbox .headimg {
194
			width: 100px;
195
			overflow: hidden;
196
			margin: auto;
197
		}
198
		/*咨询记录及等级*/
199
		
200
		.peolevelbox {
201
			display: block;
202
			padding: 4% 16px;
203
			border-top: 1px #F0F0F0 solid;
204
		}
205
		
206
		.peocountbox {
207
			width: 150px;
208
		}
209
		
210
		.peocount {
211
			font-size: 13px;
212
			color: #888888;
213
			overflow: hidden;
214
		}
215
		
216
		.peocount span em {
217
			font-size: 14px;
218
			padding: 0 3px;
219
			color: #FF9900;
220
			font-weight: 600;
221
		}
222
		
223
		.peocount .dialogicon {
224
			display: block;
225
			width: 20px;
226
			height: 20px;
227
			background: url(images/dialogue.png) center center no-repeat;
228
			background-size: 100% 100%;
229
			margin-right: 6px;
230
		}
231
		
232
		.peocount:before {
233
			position: absolute;
234
			right: 0;
235
			top: 0;
236
			left: 15px;
237
			height: 1px;
238
			content: '';
239
			-webkit-transform: scaleY(.5);
240
			transform: scaleY(.5);
241
			background-color: #c8c7cc;
242
		}
243
		
244
		.levelbox {
245
			margin: auto;
246
			overflow: hidden;
247
		}
248
		
249
		.levelbox .iconfont {
250
			float: left;
251
			margin: 2px;
252
			width: 14px;
253
			height: 14px;
254
		}
255
		
256
		.levelbox .icon-favor {
257
			background: url(images/favoricon.png) 0 0 no-repeat;
258
			background-size: 100% auto;
259
		}
260
		
261
		.levelbox .icon-favorfill {
262
			background: url(images/favoricon.png) 0 -14px no-repeat;
263
			background-size: 100% auto;
264
		}
265
		
266
		.infocontit {
267
			font-size: 14px;
268
			position: relative;
269
		}
270
		
271
		.infocon {
272
			padding: 6px 10px;
273
			/*text-align: justify;*/
274
			font-size: 13px;
275
			line-height: 27px;
276
			color: #888888;
277
		}
278
		
279
		.infocon ul {
280
			padding: 0;
281
			margin: 0;
282
			overflow: hidden;
283
		}
284
		
285
		.infocon .infoapply li {
286
			padding-left: 6px;
287
			padding-right: 2px;
288
			list-style: disc inside;
289
			width: 46%;
290
			float: left;
291
		}
292
		
293
		.infocon .infosubject li {
294
			list-style: none;
295
			padding: 2px 16px;
296
			margin: 4px;
297
			border: 1px solid #BBBBBB;
298
			border-radius: 6px;
299
			float: left;
300
		}
301
		
302
		.listitembox {
303
			position: static;
304
			width: 100%;
305
		}
306
		
307
		.listitembox .listitem {
308
			padding: 4px;
309
			padding-right: 0;
310
		}
311
		
312
		.listitembox .listitem .media-body {
313
			width: 73%;
314
			margin-left: 2%;
315
		}
316
		
317
		.listitembox .listitem .media-body .resbrief {
318
			width: 100%;
319
		}
320
		
321
		.listitembox .listitem .media-object {
322
			width: 30%;
323
		}
324
		
325
		.listitembox .listitem .media-object .iconposition {
326
			border-radius: 50%;
327
			max-width: 60px;
328
			height: 60px;
329
			margin: 1% 0;
330
		}
331
		
332
		.listitembox .listitem>a .mutlinebox {
333
			white-space: normal;
334
			overflow: auto;
335
			word-break: break-word;
336
		}
337
		
338
		.listbox {
339
			margin: 5px 0;
340
			max-width: 100%;
341
			overflow: hidden;
342
		}
343
		
344
		.listbrowse {
345
			border: 1px solid #FF9900;
346
			border-radius: 0 6px 6px 0;
347
			text-align: center;
348
			font-size: 13px;
349
			line-height: 27px;
350
			float: left;
351
			padding-right: 8px;
352
			max-width: 60%;
353
			overflow: hidden;
354
		}
355
		
356
		.plusbtn {
357
			font-size: 20px;
358
			line-height: 22px;
359
			color: #999999;
360
			margin-left: 4px;
361
			margin-top: 2px;
362
		}
363
		
364
		.plusbtn.icon-appreciatefill {
365
			color: #FF9900;
366
		}
367
		
368
		.like {
369
			display: block;
370
			float: left;
371
			width: 28px;
372
			font-size: 12px;
373
			background: #FF9900;
374
			color: #fff;
375
			line-height: 27px;
376
			margin-right: 5px;
377
		}
378
		
379
		.likenum {
380
			float: right;
381
			max-width: 130px;
382
			overflow: hidden;
383
		}
384
		
385
		.likenum .mui-icon {
386
			font-size: 24px;
387
			color: #CCCCCC;
388
		}
389
		
390
		.likepeople {
391
			width: 26px;
392
			height: 26px;
393
			line-height: 20px;
394
			float: left;
395
			overflow: hidden;
396
			margin-right: 5px;
397
		}
398
		
399
		.likepeople img {
400
			width: 100%;
401
			height: 100%;
402
		}
403
		
404
		.likemore {
405
			display: block;
406
			width: 25px;
407
			height: 25px;
408
			border: 1px solid #CCCCCC;
409
			background: url(images/likemore.png) center center no-repeat;
410
		}
411
	</style>
412
413
	<body>
414
415
		<div class="contentBody2">
416
			<div class="blockGroup mainbox">
417
				<div class="maincon personinfo">
418
					<div class="headbox alignCenter">
419
						<div class="headimg headRadius"><img src="images/default-photo.jpg" width="100%" class="headimg1" /></div>
420
						<div class="listtit"><span class="personalMaterial" style="position: relative;"></span><em class="authicon authicon-cu" style="position:absolute;margin:5px 0 0 2px ;" id="nameli"></em></div>
421
						<p class="listtit3"><span class="personalMaterial"></span><span class="personalMaterial"></span></p>
422
						<p class="listtit3"><span class="personalMaterial"></span><span class="personalMaterial"> </span> <span class="personalMaterial"></span></p>
423
					</div>
424
				</div>
425
				<ul>
426
					<li>
427
						<a class="mui-navigate-right clearfix peolevelbox " id="accessHistory">
428
							<div class="pull-left peocountbox">
429
								<div class="peocount clearfix">
430
									<em class="dialogicon pull-left "></em>
431
									<span class="pull-left">已完成咨询<em class="consultCount"></em>次</span>
432
								</div>
433
							</div>
434
							<div class="rightword levelbox pull-right ">
435
								<span class="iconfont  start"></span>
436
								<!--无色星星icon-favor  黄色星icon-favorfill-->
437
								<span class="iconfont  start"></span>
438
								<span class="iconfont icon-favor start"></span>
439
								<span class="iconfont icon-favor start"></span>
440
								<span class="iconfont icon-favor start"></span>
441
							</div>
442
443
						</a>
444
					</li>
445
				</ul>
446
			</div>
447
			<div class="blockGroup mainbox" id="professorresourceList">
448
				<div class="maincon">
449
					<div class="infocontit">合作资源</div>
450
					<div class="infocon" style="padding:10px 0;">
451
						<ul class="listitembox resinfo" id="resourceList">
452
						</ul>
453
					</div>
454
				</div>
455
			</div>
456
			<div class="blockGroup mainbox" id="professorBreifinfo">
457
				<div class="maincon">
458
					<div class="infocontit">个人简介</div>
459
					<div class="infocon">
460
						<span class="breifinfo">
461
                </span>
462
					</div>
463
				</div>
464
			</div>
465
			<div class="blockGroup mainbox" id="professorInfosubject">
466
				<div class="maincon">
467
					<div class="infocontit">学术领域</div>
468
					<div class="infocon">
469
						<ul class="infosubject">
470
						</ul>
471
					</div>
472
				</div>
473
			</div>
474
			<div class="blockGroup mainbox" id="professorReserachMess">
475
				<div class="maincon">
476
					<div class="infocontit">研究方向</div>
477
					<div class="infocon reserachMess">
478
						
479
					</div>
480
				</div>
481
			</div>
482
			<div class="blockGroup mainbox" id="professorinfoapply">
483
				<div class="maincon">
484
					<div class="infocontit">应用行业</div>
485
					<div class="infocon">
486
						<ul class="infoapply">
487
						</ul>
488
					</div>
489
				</div>
490
			</div>
491
492
			<div class="blockGroup mainbox" style="padding-bottom:40px;">
493
				<div class="maincon alignCenter">
494
					<p style="margin-top: 30px;"><span style="color:#ff9900; font-size: 16px;line-height: 32px;">[ 科袖 ]</span><br />搭建企业与专家的桥梁</p>
495
					<div class="frmbox" style="margin:20px auto;">
496
						<a href="http://www.ekexiu.com/download/com.ekexiu.app_V1.1.1.apk"><button class="frmbtn frmactive">下载安卓客户端</button></a>
497
					</div>
498
					<div>
499
						<img style="width:120px;" src="images/weixin_code.jpg" />
500
						<p style="color:#CCCCCC;font-size:13px;">关注科袖公众号</p>
501
					</div>
502
				</div>
503
			</div>
504
		</div>
505
		<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
506
		<script>
507
			//获取URL ID函数
508
509
			$(document).ready(function() {
510
				var personalMaterial = document.getElementsByClassName('personalMaterial');
511
				var nameli = document.getElementById("nameli");
512
				var personSummary = document.getElementsByClassName("breifinfo")[0];
513
				var professorId = GetQueryString("professorId");
514
				function GetQueryString(name) {
515
					var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
516
					var r = window.location.search.substr(1).match(reg);
517
					var context = "";
518
					if(r != null)
519
						context = r[2];
520
					reg = null;
521
					r = null;
522
					return context == null || context == "" || context == "undefined" ? "" : decodeURI(context);
523
				}
524
					//查询学术领域
525
				var subjectShow = function(data) {
526
						if(data != undefined && data.length != 0) {
527
							var subs = new Array();
528
							if(data.indexOf(',')) {
529
								subs = data.split(',');
530
							} else {
531
								subs[0] = data;
532
							}
533
							if(subs.length > 0) {
534
								var html = [];
535
								for(var i = 0; i < subs.length; i++) {
536
									html.push("<li>" + subs[i] + "</li>");
537
								};
538
								document.getElementsByClassName("infosubject")[0].innerHTML = html.join('');
539
							}
540
						}
541
					}
542
					//查询研究方向	
543
				var getRecords = function($researchAreaLogs, caption) {
544
					var ret = [];
545
					var t = 0;
546
					for(var i = 0; i < $researchAreaLogs.length; i++) {
547
						if(caption == $researchAreaLogs[i].caption) {
548
							ret[t] = {
549
								id: $researchAreaLogs[i].opreteProfessorId,
550
								img: $researchAreaLogs[i].hasHeadImage
551
							}
552
							t++;
553
						}
554
					}
555
					return ret;
556
				}
557
				var researchAreaShow = function($datas, $datarecords) {
558
						if($datas != undefined && $datas.length != 0) {
559
							var html = [];
560
							for(var i = 0; i < $datas.length; ++i) {
561
								var $data = $datas[i];
562
								var $photos = [];
563
								//获取头像					
564
								if($datarecords.length > 0) {
565
									$photos = getRecords($datarecords, $data.caption);
566
								}
567
568
								var showDiv = "<div class='listbox'><div class='listbrowse mui-ellipsis'><span class='like'>" + $data.count + "</span>" + $data.caption + "</div><div class='likenum'>";
569
570
								if($photos.length < 4) {
571
									for(var j = 0; j < $photos.length; ++j) {
572
										if($photos[j].img) {
573
											showDiv += "<span class='likepeople headRadius'><img class='like-h' src='/images/head/" + $photos[j].id + "_s.jpg'></span>";
574
										} else {
575
											showDiv += "<span class='likepeople headRadius'><img class='like-h' src='../images/default-photo.jpg'></span>";
576
										}
577
									}
578
								} else {
579
									for(var j = $photos.length - 2; j < $photos.length; ++j) {
580
										if($photos[j].img) {
581
											showDiv += "<span class='likepeople headRadius'><img class='like-h' src='/images/head/" + $photos[j].id + "_s.jpg'></span>";
582
										} else {
583
											showDiv += "<span class='likepeople headRadius'><img class='like-h' src='/images/default-photo.jpg'></span>";
584
										}
585
									}
586
									showDiv += "<span class='mui-icon iconfont icon-more likepeople likemore headRadius'></span>";
587
								}
588
								showDiv += "</div></div></div>";
589
								html.push(showDiv);
590
							}
591
							document.getElementsByClassName("reserachMess")[0].innerHTML = html.join('')
592
						}
593
					}
594
					//查询应用行业		
595
				var industryShow = function(data) {
596
					if(data != undefined && data.length != 0) {
597
						var subs = new Array();
598
						if(data.indexOf(',')) {
599
							subs = data.split(',');
600
						} else {
601
							subs[0] = data;
602
						}
603
						if(subs.length > 0) {
604
							var html = [];
605
							for(var i = 0; i < subs.length; i++) {
606
								html.push("<li>" + subs[i] + "</li>");
607
							};
608
							document.getElementsByClassName("infoapply")[0].innerHTML = html.join('');
609
						}
610
					}
611
				}
612
				var professorResource = function(odata) {
613
						var $data = odata;
614
						var html = [];
615
						for(var i = 0; i < odata.length; i++) {
616
							var string = '<li class="listitem">'
617
							string += '<div class="proinfor clearfix">'
618
							string += '<div class="media-object pull-left ResImgBox">'
619
							if($data[i].images.length) {
620
								string += '<img class="resImg headRadius" src="/images/resource/' + $data[i].resourceId + '.jpg">'
621
622
							} else {
623
624
								string += '<img class="resImg headRadius" src="../images/default-resource.jpg">'
625
							}
626
							string += '</div>'
627
							string += '<div class="pull-left media-body">'
628
							string += '<span class="listtit">' + $data[i].resourceName + '</span>'
629
							string += '<p class="listtit2">' + $data[i].supportedServices + '</p>'
630
							string += '<p class="listtit3 resbrief">'
631
							if($data[i].descp) {
632
								string += $data[i].descp;
633
							}
634
							string += '</p></div></div></li>'
635
							html.push(string);
636
						}
637
						document.getElementById("resourceList").innerHTML = html.join('');
638
639
					}
640
					/*获取个人信息*/
641
				function personalMessage() {
642
					$.ajax({
643
						url: "/ajax/professor/info/" + professorId,
644
						dataType: 'json', //数据格式类型
645
						type: 'GET', //http请求类型
646
						timeout: 10000, //超时设置
647
						success: function(data) {
648
							var $data = data.data;
649
							personalMaterial[0].innerText = $data.name;
650
							//基本信息
651
							if($data.consultCount) {
652
								document.getElementsByClassName("consultCount")[0].innerText = $data.consultCount;
653
							} else {
654
								document.getElementById("accessHistory").style.display = "none";
655
							}
656
							var startLeval = parseInt($data.starLevel);
657
							var start = document.getElementsByClassName("start");
658
							for(var i = 0; i < startLeval; i++) {
659
								start[i].classList.add("icon-favorfill");
660
								start[i].classList.remove("icon-favor");
661
							}
662
							if($data.hasHeadImage) {
663
								document.getElementsByClassName("headimg1")[0].src = "../images/head/" + $data.id + "_l.jpg";
664
							} else {
665
								document.getElementsByClassName("headimg1")[0].src = "../images/default-photo.jpg";
666
							}
667
							if($data.authType) {
668
								nameli.classList.add('authicon');
669
								nameli.classList.add('authicon-cu');
670
							} else {
671
								if($data.authStatus) {
672
									if($data.authentication == 1) {
673
										nameli.classList.add('authicon2');
674
										nameli.classList.add('authicon-mana');
675
										//nameli.innerHTML="<span>科研</span>";
676
									} else if($data.authentication == 2) {
677
										nameli.classList.add('authicon2');
678
										nameli.classList.add('authicon-staff');
679
										//nameli.innerHTML="<span>企业</span>";
680
									} else {
681
										nameli.classList.add('authicon2');
682
										nameli.classList.add('authicon-stu');
683
										//nameli.innerHTML="<span>学生</span>";
684
									}
685
								}
686
							}
687
							if($data.office) {
688
								if($data.title) {
689
									personalMaterial[1].innerText = $data.office + ",";
690
								} else {
691
									personalMaterial[1].innerText = $data.office;
692
								}
693
							}
694
							if($data.title) {
695
								personalMaterial[2].innerText = $data.title;
696
							}
697
							if($data.orgName) {
698
								if($data.department) {
699
									personalMaterial[3].innerText = $data.orgName + " , ";
700
								} else {
701
									if($data.address) {
702
										personalMaterial[3].innerText = $data.orgName + " | ";
703
									} else {
704
										personalMaterial[3].innerText = $data.orgName;
705
									}
706
								}
707
708
							}
709
							if($data.department) {
710
								if($data.address) {
711
									personalMaterial[4].innerText = $data.department + " | ";
712
								} else {
713
									personalMaterial[4].innerText = $data.department;
714
								}
715
716
							}
717
							if($data.address) {
718
								personalMaterial[5].innerText = $data.address;
719
							}
720
							//个人简介
721
722
							if($data.descp) {
723
								personSummary.innerHTML = $data.descp;
724
							} else {
725
								document.getElementById("professorBreifinfo").style.display = "none";
726
							}
727
							//学术领域
728
							if($data.subject) {
729
								subjectShow($data.subject);
730
							} else {
731
								document.getElementById("professorInfosubject").style.display = "none";
732
							}
733
							//研究方向
734
							if($data.researchAreas.length) {
735
736
								researchAreaShow($data.researchAreas, $data.editResearchAreaLogs);
737
							} else {
738
								document.getElementById("professorReserachMess").style.display = "none";
739
							}
740
							//应用行业
741
							if($data.industry) {
742
								industryShow($data.industry);
743
							} else {
744
								document.getElementById("professorinfoapply").style.display = "none";
745
							}
746
							//专家资源
747
							if($data.resources.length) {
748
								professorResource($data.resources);
749
							} else {
750
								document.getElementById("professorresourceList").style.display = "none";
751
							}
752
							//如无详细内容数据,隐藏详细点击的按钮
753
							if(!$data.edus.length && !$data.jobs.length && !$data.projects.length && !$data.papers.length && !$data.patents.length && !$data.honors.length) {
754
								document.getElementById("detailProfessor").style.display = "none";
755
							}
756
						},
757
						error: function(e) {
758
							return;
759
						}
760
					});
761
				}
762
				personalMessage()
763
			})
764
		</script>
765
766
	</body>
767
768
</html>

+ 648 - 0
shareResinfor.html

@ -0,0 +1,648 @@
1
<!DOCTYPE html>
2
<html>
3
4
	<head>
5
		<meta charset="UTF-8">
6
		<title></title>
7
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
8
		<link rel="stylesheet" href="css/reset.css" />
9
		<link rel="stylesheet" href="css/common.css" />
10
	</head>
11
	<style>
12
		html,
13
		body {
14
			background: #efeff4;
15
		}
16
		/*input输入相关*/
17
		
18
		.frmbox {
19
			width: 100%;
20
			margin: 2% auto;
21
			border-radius: 6px;
22
		}
23
		
24
		.frmtype {
25
			width: 100%;
26
			margin: auto;
27
			line-height: 30px;
28
			padding: 1% 2%;
29
			font-size: 14px;
30
			line-height: 20px;
31
		}
32
		
33
		.frmbtn {
34
			width: 100%;
35
			margin: 4% auto;
36
			font-size: 14px;
37
			line-height: 24px;
38
			padding: 1% 2%;
39
			border: 1px solid #FF9900;
40
			border-radius: 6px;
41
			color: #FF9900;
42
		}
43
		
44
		.frmbox {
45
			border: none;
46
			width: 90%;
47
			height: 100%;
48
		}
49
		
50
		.frmactive {
51
			color: #fff;
52
			background-color: #FF9900;
53
			border: 1px solid #FF9900;
54
		}
55
		.pull-right {
56
			float: right!important
57
		}
58
		
59
		.pull-left {
60
			float: left!important
61
		}
62
		
63
		.alignCenter {
64
			text-align: center;
65
		}
66
		
67
		
68
		/*圆角*/
69
		/*头像、资源圆角*/
70
		.headRadius {
71
			border-radius: 4px;
72
		}
73
		
74
		.blockGroup {
75
			background: #fff;
76
		}
77
		
78
		.mainbox {
79
			width: 96%;
80
			margin: 2% auto;
81
		}
82
		
83
		.maincon {
84
			padding: 4% 2%;
85
			overflow: hidden;
86
		}
87
		
88
		.listtit {
89
			font-size: 14px;
90
			color: #333333;
91
		}
92
		/*中标题*/
93
		
94
		.listtit2 {
95
			font-size: 13px;
96
			color: #666666;
97
		}
98
		/*较小标题*/
99
		
100
		.listtit3 {
101
			font-size: 12px;
102
			color: #888888;
103
		}
104
		/*小标题*/
105
		
106
		.mui-ellipsis {
107
			overflow: hidden;
108
			white-space: nowrap;
109
			text-overflow: ellipsis;
110
		}
111
		/*资源图片*/
112
		
113
		.ResImgBox {
114
			display: inline-block;
115
			text-align: center;
116
			max-width: 64px;
117
			width: 64px;
118
			height: 60px;
119
			padding: 1px;
120
			background: #FAFAFA;
121
			border: 1px solid #F8F8F8;
122
			overflow: hidden;
123
			padding: 2px;
124
			margin: 6px 0;
125
			border-radius: 4px;
126
		}
127
		
128
		.ResImgBox2 {
129
			margin: 6px 0 6px 10px;
130
		}
131
		
132
		.ResImgBox .resImg {
133
			max-width: 100%;
134
			max-height: 100%;
135
			vertical-align: middle;
136
			position: relative;
137
		}
138
		
139
		.ResImgBox:before {
140
			content: ' ';
141
			display: inline-block;
142
			vertical-align: middle;
143
			width: 0;
144
			height: 100%;
145
			overflow: hidden;
146
			margin-left: -5px;
147
		}
148
		/*专家相关信息*/
149
		
150
		.personinfo .listtit3 {
151
			font-size: 14px;
152
			line-height: 24px;
153
			color: #AAAAAA;
154
			margin: 0;
155
		}
156
		
157
		.personinfo .listtit {
158
			font-size: 18px;
159
			line-height: 30px;
160
			color: #333333;
161
		}
162
		
163
		.personinfo .listtit3 {
164
			font-size: 14px;
165
			line-height: 24px;
166
			color: #AAAAAA;
167
			margin: 0;
168
		}
169
		
170
		.headbox .headimg {
171
			width: 100px;
172
			overflow: hidden;
173
			margin: auto;
174
		}
175
		/*咨询记录及等级*/
176
		
177
		.peolevelbox {
178
			display: block;
179
			padding: 4% 16px;
180
			border-top: 1px #F0F0F0 solid;
181
		}
182
		
183
		.peocountbox {
184
			width: 150px;
185
		}
186
		
187
		.peocount {
188
			font-size: 13px;
189
			color: #888888;
190
			overflow: hidden;
191
		}
192
		
193
		.peocount span em {
194
			font-size: 14px;
195
			padding: 0 3px;
196
			color: #FF9900;
197
			font-weight: 600;
198
		}
199
		
200
		.peocount .dialogicon {
201
			display: block;
202
			width: 20px;
203
			height: 20px;
204
			background: url(images/dialogue.png) center center no-repeat;
205
			background-size: 100% 100%;
206
			margin-right: 6px;
207
		}
208
		
209
		.peocount:before {
210
			position: absolute;
211
			right: 0;
212
			top: 0;
213
			left: 15px;
214
			height: 1px;
215
			content: '';
216
			-webkit-transform: scaleY(.5);
217
			transform: scaleY(.5);
218
			background-color: #c8c7cc;
219
		}
220
		
221
		.levelbox {
222
			margin: auto;
223
			overflow: hidden;
224
		}
225
		
226
		.levelbox .iconfont {
227
			float: left;
228
			margin: 2px;
229
			width: 14px;
230
			height: 14px;
231
		}
232
		
233
		.levelbox .icon-favor {
234
			background: url(images/favoricon.png) 0 0 no-repeat;
235
			background-size: 100% auto;
236
		}
237
		
238
		.levelbox .icon-favorfill {
239
			background: url(images/favoricon.png) 0 -14px no-repeat;
240
			background-size: 100% auto;
241
		}
242
		
243
		.infocontit {
244
			font-size: 14px;
245
			position: relative;
246
		}
247
		
248
		.infocon {
249
			padding: 6px 10px;
250
			/*text-align: justify;*/
251
			font-size: 13px;
252
			line-height: 27px;
253
			color: #888888;
254
		}
255
		
256
		.infocon ul {
257
			padding: 0;
258
			margin: 0;
259
			overflow: hidden;
260
		}
261
		
262
		.infocon .infoapply li {
263
			padding-left: 6px;
264
			padding-right: 2px;
265
			list-style: disc inside;
266
			width: 46%;
267
			float: left;
268
		}
269
		
270
		.infocon .infosubject li {
271
			list-style: none;
272
			padding: 2px 16px;
273
			margin: 4px;
274
			border: 1px solid #BBBBBB;
275
			border-radius: 6px;
276
			float: left;
277
		}
278
		
279
		.listitembox {
280
			position: static;
281
			width: 100%;
282
		}
283
		
284
		.listitembox .listitem {
285
			padding: 4px;
286
			padding-right: 0;
287
		}
288
		
289
		.listitembox .listitem .media-body {
290
			width: 73%;
291
			margin-left: 2%;
292
		}
293
		
294
		.listitembox .listitem .media-body .resbrief {
295
			width: 100%;
296
		}
297
		
298
		.listitembox .listitem .media-object {
299
			width: 30%;
300
		}
301
		
302
		.listitembox .listitem .media-object .iconposition {
303
			border-radius: 50%;
304
			max-width: 60px;
305
			height: 60px;
306
			margin: 1% 0;
307
		}
308
		
309
		.listitembox .listitem>a .mutlinebox {
310
			white-space: normal;
311
			overflow: auto;
312
			word-break: break-word;
313
		}
314
		
315
		.listbox {
316
			margin: 5px 0;
317
			max-width: 100%;
318
			overflow: hidden;
319
		}
320
		
321
		.listbrowse {
322
			border: 1px solid #FF9900;
323
			border-radius: 0 6px 6px 0;
324
			text-align: center;
325
			font-size: 13px;
326
			line-height: 27px;
327
			float: left;
328
			padding-right: 8px;
329
			max-width: 60%;
330
			overflow: hidden;
331
		}
332
		
333
		.plusbtn {
334
			font-size: 20px;
335
			line-height: 22px;
336
			color: #999999;
337
			margin-left: 4px;
338
			margin-top: 2px;
339
		}
340
		
341
		.plusbtn.icon-appreciatefill {
342
			color: #FF9900;
343
		}
344
		
345
		.like {
346
			display: block;
347
			float: left;
348
			width: 28px;
349
			font-size: 12px;
350
			background: #FF9900;
351
			color: #fff;
352
			line-height: 27px;
353
			margin-right: 5px;
354
		}
355
		
356
		.likenum {
357
			float: right;
358
			max-width: 130px;
359
			overflow: hidden;
360
		}
361
		
362
		.likenum .mui-icon {
363
			font-size: 24px;
364
			color: #CCCCCC;
365
		}
366
		
367
		.likepeople {
368
			width: 26px;
369
			height: 26px;
370
			line-height: 20px;
371
			float: left;
372
			overflow: hidden;
373
			margin-right: 5px;
374
		}
375
		
376
		.likepeople img {
377
			width: 100%;
378
			height: 100%;
379
		}
380
		
381
		.likemore {
382
			display: block;
383
			width: 25px;
384
			height: 25px;
385
			border: 1px solid #CCCCCC;
386
			background: url(images/likemore.png) center center no-repeat;
387
		}
388
		
389
		.personblock{ margin-left: 2%;}    
390
	</style>
391
392
	<body>
393
		<div class="contentBody2">
394
			<div class="blockGroup mainbox">
395
				<div class="maincon">
396
					<div class="ResImgBox resouimgbox pull-left" style="height:180px;width:180px;max-width:180px;margin:0 6px 0 8px;">
397
						<img class="resImg headRadius" src="images/default-resource.jpg" id="ziyuanimg" data-preview-src data-preview-group="1" />
398
					</div>
399
					<div class="personblock pull-left" id="fess">
400
						<img class="headRadius" style="width: 60px;" src="images/default-photo.jpg" id="proimg">
401
						<p class="listtit" id="proname"><em class="authicon authicon-cu" style="font-size:16px;" id="promodify"></em></p>
402
						<p class="listtit2"><span id="protitle"></span><span id="prooffice"></span></p>
403
						<p class="listtit3"><span id="proorgName"></span></p>
404
						<p class="listtit3"><span id="proadress"></span></p>
405
					</div>
406
				</div>
407
			</div>
408
			<div class="blockGroup mainbox">
409
				<div class="maincon">
410
					<ul class="resouinfobox">
411
						<li>
412
							<div class="infocontit">基本信息</div>
413
						</li>
414
						<li>
415
							<div class="infocon">
416
								<p style="color:#666666;">
417
									<span>资源名称:</span>
418
									<span class="listtit2" id='resourceName'></span>
419
								</p>
420
								<p style="color:#666666;">
421
									<span>应用用途:</span>
422
									<span class="listtit2" id="yongtu"></span>
423
								</p>
424
							</div>
425
						</li>
426
					</ul>
427
				</div>
428
			</div>
429
			<div class="blockGroup mainbox" id="fielddiv">
430
				<div class="maincon">
431
					<div class="infocontit">学术领域</div>
432
					<div class="infocon">
433
						<ul class="infosubject" id="field">
434
						</ul>
435
					</div>
436
				</div>
437
			</div>
438
			<div class="blockGroup mainbox" id="applydiv">
439
				<div class="maincon">
440
					<div class="infocontit">应用行业</div>
441
					<div class="infocon">
442
						<ul id="apply">
443
						</ul>
444
					</div>
445
				</div>
446
			</div>
447
			<div class="blockGroup mainbox" id="hezuodiv">
448
				<div class="maincon">
449
					<ul class="resouinfobox">
450
						<li>
451
							<div class="infocontit">合作备注</div>
452
							<div class="infocon">
453
								<p class="listtit3" id="hezuo"></p>
454
							</div>
455
						</li>
456
					</ul>
457
				</div>
458
			</div>
459
			<div class="blockGroup mainbox" id="detaildiv">
460
				<div class="maincon">
461
					<ul class="resouinfobox">
462
						<li>
463
							<div class="infocontit">详细描述</div>
464
							<div class="infocon">
465
								<p class="listtit3" id="detail">
466
									二维码123456789二维码、语音输入、摇一摇摄像头、文件系统、摇一摇摄像头、文件系统、微信分享……不够?Native.JS
467
								</p>
468
							</div>
469
						</li>
470
					</ul>
471
				</div>
472
			</div>
473
			<div class="blockGroup mainbox" style="padding-bottom:40px;">
474
				<div class="maincon alignCenter">
475
					<p style="margin-top: 30px;"><span style="color:#ff9900; font-size: 16px;line-height: 32px;">[ 科袖 ]</span><br />搭建企业与专家的桥梁</p>
476
					<div class="frmbox" style="margin:20px auto;">
477
						<a href="http://www.ekexiu.com/download/com.ekexiu.app_V1.1.1.apk"><button class="frmbtn frmactive">下载安卓客户端</button></a>
478
					</div>
479
					<div>
480
						<img style="width:120px;" src="images/weixin_code.jpg" />
481
						<p style="color:#CCCCCC;font-size:13px;">关注科袖公众号</p>
482
					</div>
483
				</div>
484
			</div>
485
		</div>
486
		<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
487
		<script>
488
			$(document).ready(function() {				
489
				var resourceId='73FAD17209F7477C8D8537E5F98ADAAA';
490
				
491
				var oproname = document.getElementById("proname"); //专家名称
492
				var oprotitle = document.getElementById("protitle"); //专家职称
493
				var oprooffice = document.getElementById("prooffice"); //专家职务
494
				var oproorgName = document.getElementById("proorgName"); //专家所属机构
495
				var oproadress = document.getElementById("proadress"); //专家所在地
496
				var opromodify = document.getElementById("promodify"); //专家认证
497
				var oproimg = document.getElementById("proimg"); //专家头像
498
				
499
				var oresourceName = document.getElementById("resourceName"); //资源名称
500
				var oyongtu = document.getElementById("yongtu"); //应用用途
501
				var oziyuanimg = document.getElementById("ziyuanimg"); //资源图片
502
				var ofield = document.getElementById("field"); //学术领域
503
				var oapply = document.getElementById("apply"); //应用行业
504
				var odetail = document.getElementById("detail"); //详细描述
505
				var ohezuo = document.getElementById("hezuo"); //合作备注
506
				var oEnter = document.getElementById("fess");
507
				var ofielddiv = document.getElementById("fielddiv"); //学术领域容器
508
				var oapplydiv = document.getElementById("applydiv"); //应用行业容器
509
				var odetaildiv = document.getElementById("detaildiv"); //详细描述容器
510
				var ohezuodiv = document.getElementById("hezuodiv"); //合作备注容器
511
				
512
				function GetQueryString(name) {
513
					var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
514
					var r = window.location.search.substr(1).match(reg);
515
					var context = "";
516
					if(r != null)
517
						context = r[2];
518
					reg = null;
519
					r = null;
520
					return context == null || context == "" || context == "undefined" ? "" : decodeURI(context);
521
				}
522
				function ziyuaninfo(resourceId) {				
523
						$.ajax({
524
						    url:'/ajax/resource/resourceInfo', 
525
							data: {
526
								'resourceId': resourceId
527
							},
528
							dataType: 'json', //服务器返回json格式数据
529
							type: 'get', //HTTP请求类型
530
							timeout: 10000, //超时时间设置为10秒;
531
							success: function(data) {
532
								if(data.success) {
533
									console.log(JSON.stringify(data));
534
				
535
									var mydata = data.data;
536
									//资源名称
537
									professorId = mydata['professor']['id'];
538
									var userid = GetQueryString('userid');
539
									if(professorId==userid){
540
										document.getElementsByClassName("footbox")[0].style.display="none";
541
									}
542
									(mydata['resourceName']) ? oresourceName.innerHTML = mydata['resourceName']: oresourceName.innerHTML = '';
543
				
544
									//专家信息
545
									proId = mydata['professor']['id']; //专家id
546
									//专家名字
547
									(mydata['professor']["name"]) ? oproname.innerText = mydata['professor']["name"]: oproname.innerText = '';
548
									//职称
549
									(mydata['professor']["title"]) ? oprotitle.innerHTML = mydata['professor']["title"]: oprotitle.innerHTML = '';
550
									//职位
551
									if(mydata['professor']["office"] == null || mydata['professor']["office"] == undefined) {
552
										oprooffice.innerHTML = '';
553
									} else {
554
										if(mydata['professor']["title"]) {
555
											oprooffice.innerHTML = ',' + mydata['professor']["office"]; //职位
556
										}
557
										oprooffice.innerHTML = mydata['professor']["office"]; //职位
558
									};
559
									//所在机构
560
									(mydata['professor']["orgName"]) ? oproorgName.innerHTML = mydata['professor']["orgName"]: oproorgName.innerHTML = '';
561
									//所在地
562
									(mydata['professor']["address"]) ? oproadress.innerHTML = mydata['professor']["address"]: oproadress.innerHTML = '';
563
									/*是否认证*/
564
									(mydata['professor']["authentication"] == true) ? opromodify.classList.add('authicon'): opromodify.classList.add('unauthicon');
565
									/*专家头像*/
566
									(mydata['professor']["hasHeadImage"] == 0) ? oproimg.setAttribute('src', '/images/default-photo.jpg'): oproimg.setAttribute('src', '/images/head/' + mydata['professor']['id'] + '_m.jpg');
567
				
568
									//资源基本信息
569
									//(mydata['images']['imageSrc']) ? oziyuanimg.setAttribute('src', mydata['images']['imageSrc']): oziyuanimg.setAttribute('src', '../images/default-resource.jpg'); //资源图片
570
				
571
									var imgRes = "/images/resource/" + mydata.resourceId + ".jpg";
572
									if(mydata['images'].length) {
573
										oziyuanimg.setAttribute('src', imgRes)
574
									} else {
575
										oziyuanimg.setAttribute('src', '../images/default-resource.jpg')
576
									}
577
									(mydata['supportedServices']) ? oyongtu.innerHTML = mydata['supportedServices']: oyongtu.innerHTML = ''; //应用用途
578
				
579
									//学术领域
580
									if(mydata['subject']) {
581
										if(mydata['subject'].indexOf(',') != -1) { //字符串是否包含,
582
											var fieldlist = mydata['subject'].split(",");
583
											console.log(fieldlist.length);
584
											for(var i = 0; i < fieldlist; i++) {
585
												var oli = document.createElement('li');
586
												oli.innerText = fieldlist[i];
587
												ofield.appendChild(oli);
588
											}
589
										} else {
590
											var oli = document.createElement('li');
591
											oli.innerText = mydata['subject'];
592
											ofield.appendChild(oli);
593
										}
594
				
595
									} else {
596
										ofielddiv.style.display = 'none';
597
									}
598
				
599
									//应用行业
600
									if(mydata['industry']) {
601
										if(mydata['industry'].indexOf(',') != -1) { //字符串是否包含,
602
											var applylist = mydata['industry'].split(",");
603
											console.log(applylist.length);
604
											for(var i = 0; i < applylist; i++) {
605
												var oli = document.createElement('li');
606
												oli.innerText = fieldlist[i];
607
												oapply.appendChild(oli);
608
											}
609
										} else {
610
											var oli = document.createElement('li');
611
											oli.innerText = mydata['industry'];
612
											oapply.appendChild(oli);
613
										}
614
									} else {
615
										oapplydiv.style.display = 'none';
616
									}
617
				
618
									//详细描述
619
									if(mydata['descp']) {
620
										odetail.innerHTML = mydata['descp']
621
									} else {
622
										odetaildiv.style.display = 'none';
623
									}
624
				
625
									//合作备注
626
									if(mydata['cooperationNotes']) {
627
										ohezuo.innerHTML = mydata['cooperationNotes'];
628
									} else {
629
										ohezuodiv.style.display = 'none';
630
									}
631
				
632
									
633
								}
634
							},
635
							error: function(e) {
636
								return;
637
							}
638
						});
639
				}
640
				//资源信息
641
				ziyuaninfo(resourceId);
642
			});
643
				
644
		</script>
645
646
	</body>
647
648
</html>