Browse Source

资源分享和专家分享完善以及身份认证标识完善

luyanan 8 years ago
parent
commit
ac3781b7a6
9 changed files with 48 additions and 27 deletions
  1. 7 7
      css/common.css
  2. 1 1
      css/index.css
  3. BIN
      images/authsort.png
  4. BIN
      images/authsort2.png
  5. BIN
      images/dialogue.png
  6. BIN
      images/favoricon.png
  7. 1 1
      js/search.js
  8. 2 2
      shareProinfor.html
  9. 37 16
      shareResinfor.html

+ 7 - 7
css/common.css

123

123

124
/*/////////// 专家认证图标 //////////////*/
124
/*/////////// 专家认证图标 //////////////*/
125
.authobject{ float:left;}
125
.authobject{ float:left;}
126
.authicon{ float:left;width:20px; height:20px; background:url(../images/authsort.png) no-repeat;}
127
.authicon-cu{background-position: -20px 0;}/*认证科研型专家*/
128
.authicon-com{background-position: 0 0;}/*认证企业型专家*/
126
.authicon{ float:left;width:18px; height:18px; background:url(../images/authsort2.png) no-repeat;}
127
.authicon-cu{background-position: 0 0;background-size:auto 100%;}/*认证科研型专家*/
128
.authicon-com{background-position: -20px 0;background-size:auto 100%;}/*认证企业型专家*/
129
/*/////////// 普通用户认证标识 //////////////*/
129
/*/////////// 普通用户认证标识 //////////////*/
130
.authicon2{float:left;position:relative;width:60px; height:20px;margin-left:2px; background:url(../images/authsort.png) no-repeat;}
130
.authicon2{float:left;position:relative;width:60px; height:20px;margin: 0;background:url(../images/authsort.png) no-repeat;}
131
.authicon2 span{font-size:12px; margin-left:20px;position: absolute;top: 50%;margin-top: -9px;}
131
.authicon2 span{font-size:12px; margin-left:20px;position: absolute;top: 50%;margin-top: -9px;}
132
.authicon-mana{background-position: 0 -20px;color:#ff9900;}/*认证在企高管*/
133
.authicon-staff{background-position:0 -40px;color:#19AFFF;}/*认证在企职员*/
134
.authicon-stu{background-position: 0 -60px;color:#03CE30}/*认证在读学生*/
132
.authicon-mana{background-position: 0 -4px;background-size:100% auto;color:#ff9900;}/*认证科研*/
133
.authicon-staff{background-position:0 -24px;background-size:100% auto;color:#19AFFF;}/*认证企业*/
134
.authicon-stu{background-position: 0 -44px;background-size:100% auto;color:#03CE30}/*认证在读学生*/
135
/*//////////专家身份认证状态////////////*/
135
/*//////////专家身份认证状态////////////*/
136
/*已认证*/
136
/*已认证*/
137
.authword{ padding:2px 6px; margin-left:6px;border-radius:4px; color: #FFFFFF; font-size: 12px;}
137
.authword{ padding:2px 6px; margin-left:6px;border-radius:4px; color: #FFFFFF; font-size: 12px;}

+ 1 - 1
css/index.css

83
.class1 a:hover{color:#fff; background:#ff9900;}
83
.class1 a:hover{color:#fff; background:#ff9900;}
84
.class1 .colorbg{ color:#fff; background:#ff9900;}
84
.class1 .colorbg{ color:#fff; background:#ff9900;}
85
.andmore{ display:block; width:100px;font-size:14px;line-height:50px; color:#333; padding:0 28px; position:absolute;right:0; cursor:pointer;}
85
.andmore{ display:block; width:100px;font-size:14px;line-height:50px; color:#333; padding:0 28px; position:absolute;right:0; cursor:pointer;}
86
.updown{ display:block; width:12px; height:12px; background:url(../images/UpDown.png) 0 center no-repeat;  float:right; margin-top:19px;}
86
.updown{ display:block; width:14px; height:12px; background:url(../images/UpDown.png) 0 center no-repeat;  float:right; margin-top:19px;}
87
/*搜索内容*/
87
/*搜索内容*/
88
.about{ width:100%; border-top:1px #e2e2e2 solid; padding:5px 0;}
88
.about{ width:100%; border-top:1px #e2e2e2 solid; padding:5px 0;}
89
.aboutcenter{ width:1050px;height:auto; margin:auto; }
89
.aboutcenter{ width:1050px;height:auto; margin:auto; }

BIN
images/authsort.png


BIN
images/authsort2.png


BIN
images/dialogue.png


BIN
images/favoricon.png


+ 1 - 1
js/search.js

218
							add += '<div class="synopsis" style="width:66%;">'
218
							add += '<div class="synopsis" style="width:66%;">'
219
							add += '<div class="cousultName"><a class="resouname" href="javascript:void();">' + $da[i].resourceName + '</a></div>'
219
							add += '<div class="cousultName"><a class="resouname" href="javascript:void();">' + $da[i].resourceName + '</a></div>'
220
							if($da[i].professor.name) {
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>'
221
								add += '<div class="belongname"><a style="float:left;display:block;">' + $da[i].professor.name + '</a><a class="modicon" style="display:block;top:2px;left:2px;"></a></div>'
222
							}
222
							}
223
							if($da[i].professor.title == undefined) {
223
							if($da[i].professor.title == undefined) {
224
								$da[i].professor.title = "";
224
								$da[i].professor.title = "";

+ 2 - 2
shareProinfor.html

570
								if($photos.length < 4) {
570
								if($photos.length < 4) {
571
									for(var j = 0; j < $photos.length; ++j) {
571
									for(var j = 0; j < $photos.length; ++j) {
572
										if($photos[j].img) {
572
										if($photos[j].img) {
573
											showDiv += "<span class='likepeople headRadius'><img class='like-h' src='/images/head/" + $photos[j].id + "_s.jpg'></span>";
573
											showDiv += "<span class='likepeople headRadius'><img class='like-h' src='/images/head/" + $photos[j].id + "_m.jpg'></span>";
574
										} else {
574
										} else {
575
											showDiv += "<span class='likepeople headRadius'><img class='like-h' src='../images/default-photo.jpg'></span>";
575
											showDiv += "<span class='likepeople headRadius'><img class='like-h' src='../images/default-photo.jpg'></span>";
576
										}
576
										}
578
								} else {
578
								} else {
579
									for(var j = $photos.length - 2; j < $photos.length; ++j) {
579
									for(var j = $photos.length - 2; j < $photos.length; ++j) {
580
										if($photos[j].img) {
580
										if($photos[j].img) {
581
											showDiv += "<span class='likepeople headRadius'><img class='like-h' src='/images/head/" + $photos[j].id + "_s.jpg'></span>";
581
											showDiv += "<span class='likepeople headRadius'><img class='like-h' src='/images/head/" + $photos[j].id + "_m.jpg'></span>";
582
										} else {
582
										} else {
583
											showDiv += "<span class='likepeople headRadius'><img class='like-h' src='/images/default-photo.jpg'></span>";
583
											showDiv += "<span class='likepeople headRadius'><img class='like-h' src='/images/default-photo.jpg'></span>";
584
										}
584
										}

+ 37 - 16
shareResinfor.html

87
		
87
		
88
		.listtit {
88
		.listtit {
89
			font-size: 14px;
89
			font-size: 14px;
90
			line-height: 26px;
90
			color: #333333;
91
			color: #333333;
91
		}
92
		}
92
		/*中标题*/
93
		/*中标题*/
93
		
94
		
94
		.listtit2 {
95
		.listtit2 {
95
			font-size: 13px;
96
			font-size: 13px;
97
			line-height: 20px;
96
			color: #666666;
98
			color: #666666;
97
		}
99
		}
98
		/*较小标题*/
100
		/*较小标题*/
99
		
101
		
100
		.listtit3 {
102
		.listtit3 {
101
			font-size: 12px;
103
			font-size: 12px;
104
			line-height: 18px;
102
			color: #888888;
105
			color: #888888;
103
		}
106
		}
104
		/*小标题*/
107
		/*小标题*/
398
					</div>
401
					</div>
399
					<div class="personblock pull-left" id="fess">
402
					<div class="personblock pull-left" id="fess">
400
						<img class="headRadius" style="width: 60px;" src="images/default-photo.jpg" id="proimg">
403
						<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>
404
						<p class="listtit clearfix"><span class="floatL" id="proname"></span><em class="authicon authicon-cu" style="height: 16px; width:16px;margin:5px 0 0 2px;" id="promodify"></em></p>
402
						<p class="listtit2"><span id="protitle"></span><span id="prooffice"></span></p>
405
						<p class="listtit2"><span id="protitle"></span><span id="prooffice"></span></p>
403
						<p class="listtit3"><span id="proorgName"></span></p>
406
						<p class="listtit3"><span id="proorgName"></span></p>
404
						<p class="listtit3"><span id="proadress"></span></p>
407
						<p class="listtit3"><span id="proadress"></span></p>
485
		</div>
488
		</div>
486
		<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
489
		<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
487
		<script>
490
		<script>
488
			$(document).ready(function() {				
489
				var resourceId='73FAD17209F7477C8D8537E5F98ADAAA';
490
				
491
			$(document).ready(function() {	
492
				var resourceId= GetQueryString("resourceId");
493
				function GetQueryString(name) {
494
					var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
495
					var r = window.location.search.substr(1).match(reg);
496
					var context = "";
497
					if(r != null)
498
						context = r[2];
499
					reg = null;
500
					r = null;
501
					return context == null || context == "" || context == "undefined" ? "" : decodeURI(context);
502
				}
491
				var oproname = document.getElementById("proname"); //专家名称
503
				var oproname = document.getElementById("proname"); //专家名称
492
				var oprotitle = document.getElementById("protitle"); //专家职称
504
				var oprotitle = document.getElementById("protitle"); //专家职称
493
				var oprooffice = document.getElementById("prooffice"); //专家职务
505
				var oprooffice = document.getElementById("prooffice"); //专家职务
509
				var odetaildiv = document.getElementById("detaildiv"); //详细描述容器
521
				var odetaildiv = document.getElementById("detaildiv"); //详细描述容器
510
				var ohezuodiv = document.getElementById("hezuodiv"); //合作备注容器
522
				var ohezuodiv = document.getElementById("hezuodiv"); //合作备注容器
511
				
523
				
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
				}
524
				
522
				function ziyuaninfo(resourceId) {				
525
				function ziyuaninfo(resourceId) {				
523
						$.ajax({
526
						$.ajax({
524
						    url:'/ajax/resource/resourceInfo', 
527
						    url:'/ajax/resource/resourceInfo', 
561
									//所在地
564
									//所在地
562
									(mydata['professor']["address"]) ? oproadress.innerHTML = mydata['professor']["address"]: oproadress.innerHTML = '';
565
									(mydata['professor']["address"]) ? oproadress.innerHTML = mydata['professor']["address"]: oproadress.innerHTML = '';
563
									/*是否认证*/
566
									/*是否认证*/
564
									(mydata['professor']["authentication"] == true) ? opromodify.classList.add('authicon'): opromodify.classList.add('unauthicon');
567
									//(mydata['professor']["authentication"] == true) ? opromodify.classList.add('authicon'): opromodify.classList.add('unauthicon');
568
									if(mydata['professor']["authType"]) {
569
										opromodify.classList.add('authicon')
570
										opromodify.classList.add('authicon-cu');
571
									} else {
572
										if(mydata['professor']["authStatus"]) {
573
											if(mydata['professor']["authentication"] == 1) {
574
												opromodify.classList.add('authicon2');
575
												opromodify.classList.add('authicon-mana');
576
											} else if(mydata['professor']["authentication"] == 2) {
577
												opromodify.classList.add('authicon2');
578
												opromodify.classList.add('authicon-staff');
579
											} else {
580
												opromodify.classList.add('authicon2');
581
												opromodify.classList.add('authicon-stu');
582
											}
583
										}
584
									}
565
									/*专家头像*/
585
									/*专家头像*/
566
									(mydata['professor']["hasHeadImage"] == 0) ? oproimg.setAttribute('src', '/images/default-photo.jpg'): oproimg.setAttribute('src', '/images/head/' + mydata['professor']['id'] + '_m.jpg');
586
									(mydata['professor']["hasHeadImage"] == 0) ? oproimg.setAttribute('src', '/images/default-photo.jpg'): oproimg.setAttribute('src', '/images/head/' + mydata['professor']['id'] + '_m.jpg');
567
				
587
									
568
									//资源基本信息
588
									//资源基本信息
569
									//(mydata['images']['imageSrc']) ? oziyuanimg.setAttribute('src', mydata['images']['imageSrc']): oziyuanimg.setAttribute('src', '../images/default-resource.jpg'); //资源图片
589
									//(mydata['images']['imageSrc']) ? oziyuanimg.setAttribute('src', mydata['images']['imageSrc']): oziyuanimg.setAttribute('src', '../images/default-resource.jpg'); //资源图片
570
				
590
				
639
				}
659
				}
640
				//资源信息
660
				//资源信息
641
				ziyuaninfo(resourceId);
661
				ziyuaninfo(resourceId);
662
				
642
			});
663
			});
643
				
664
				
644
		</script>
665
		</script>