Browse Source

个人中心及修改

luyanan 7 years ago
parent
commit
9b11be7493
6 changed files with 308 additions and 285 deletions
  1. 2 2
      css/genindex.css
  2. 6 83
      information.html
  3. 30 28
      js/common.js
  4. 65 89
      js/information.js
  5. 157 54
      js/userInforShow.js
  6. 48 29
      userInforShow.html

+ 2 - 2
css/genindex.css

@ -643,7 +643,7 @@ div.zoomMask{position:absolute;background:url("../images/g-resource-mask.png") r
643 643
.resAreaCover .researchArea{padding:16px 30px;background: #ff9900;color:#FFFFFF;font-size:16px; border-bottom:1px #EAEAEA solid;border-radius: 8px 8px 0 0;}
644 644
645 645
/*修改信息相关*/
646
.replace-photo{ display:block; width:100%; height:95px; position:absolute; bottom:0; background-color:rgba(0,0,0,0.6);font-size:16px;line-height:90px; color:#fff; text-align:center;}
646
.replace-photo{ display:block; width:100%; height:95px; position:absolute; bottom:0; background-color:rgba(0,0,0,0.4);font-size:16px;line-height:90px; color:#fff; text-align:center;}
647 647
.btnClick{position:absolute;font-style:normal; right:0;top:-10px;font-size: 14px;line-height: 48px;color: #ff9900;cursor: pointer;}
648 648
649 649
.modifybox{ display:none;padding:30px; margin:20px 0;background: #fafafa;border:2px solid #F4F4F4}
@ -692,7 +692,7 @@ div.zoomMask{position:absolute;background:url("../images/g-resource-mask.png") r
692 692
.mr_calendar_ym .full_year li{list-style:none;margin:0;cursor: pointer;line-height: 32px;background-color: #fff;color: #333;text-align: left;padding-left:16px;}
693 693
.mr_calendar_ym .active { background-color: #ff9900!important;color: #fff!important;}
694 694
695
695
.modifybox .form-result.keyResult{margin: 0;}
696 696
.listnone1 .modifybox{margin-left:-25px;}
697 697
.showBx + .modifybox{margin-left: -25px;}
698 698
.coninfocon.listSector>ul>li.listnone1:before{content:none;}

+ 6 - 83
information.html

@ -131,7 +131,7 @@
131 131
						</div>
132 132
					</div>
133 133
					<div class="modifybox cmpFrmList">
134
						<div class="msgContbox"><textarea class="frmcontype" id="descp"></textarea></div>
134
						<div class="msgContbox"><textarea class="frmcontype" id="descp" placeholder="请填写一个简单的介绍,让大家更好地了解您"></textarea></div>
135 135
						<div class="saveBtn clearfix">
136 136
							<div class="col-w-12">
137 137
								<button type="button" class="frmcontype btnModel" id="saveDescp">保存</button>
@ -150,8 +150,8 @@
150 150
					</div>
151 151
					<div class="modifybox form-item">
152 152
						<div class="col-w-12" style="position: relative;">
153
							<input type="text" class="frmcontype oinput" placeholder="请填写企业所属的行业,如:制造业、互联网、服务业"  id="subject"/>
154
							<button type="button" class="frmcontype btnModel frmaddG" id="subjectAdd">添加</button>
153
							<input type="text" class="frmcontype oinput" placeholder="请填写您研究的学科,如:腐蚀防护、石墨烯、纳米材料" data-pro="学术领域不得超过10个字"  data-num="20" data-fontSizeN="10" id="subject"/>
154
							<button type="button" class="frmcontype btnModel frmaddG addButton" id="subjectAdd">添加</button>
155 155
							<div class="form-drop keydrop">
156 156
								<ul>
157 157
									
@ -181,7 +181,7 @@
181 181
					</div>
182 182
					<div class="modifybox form-item">
183 183
						<div class="col-w-12" style="position: relative;">
184
							<input type="text" class="frmcontype oinput" placeholder="请填写企业所属的行业,如:制造业、互联网、服务业"  id="researchArea"/>
184
							<input type="text" class="frmcontype oinputM" placeholder="请用一句话描述您的研究方向,如:微生物腐蚀的机理研究、防治与检测" id="researchArea"/>
185 185
							<button type="button" class="frmcontype btnModel frmaddG" id="researchAreaAdd">添加</button>
186 186
						</div>
187 187
						<div class="form-result keyResult">
@ -207,8 +207,8 @@
207 207
					</div>
208 208
					<div class="modifybox form-item">
209 209
						<div class="col-w-12" style="position: relative;">
210
							<input type="text" class="frmcontype oinput" placeholder="请填写企业所属的行业,如:制造业、互联网、服务业"  id="industry"/>
211
							<button type="button" class="frmcontype btnModel frmaddG" id="industryAdd">添加</button>
210
							<input type="text" class="frmcontype oinput" placeholder="请填写企业所属的行业,如:制造业、互联网、服务业" data-pro="行业领域不得超过10个字" data-num="20" data-fontSizeN="10" id="industry"/>
211
							<button type="button" class="frmcontype btnModel frmaddG addButton" id="industryAdd">添加</button>
212 212
							<div class="form-drop keydrop">
213 213
								<ul>
214 214
									
@ -236,83 +236,6 @@
236 236

237 237
						</ul>
238 238
					</div>
239
					<!--<div class="modifybox" style="display: block;">
240
						<ul class="cmpFrmList">
241
							<li>
242
								<span class="col-w-2 lableSpan">项目名称:</span>
243
								<div class="col-w-10">
244
									<input type="text" class="frmcontype projectName" placeholder="请填写项目名称" />
245
								</div>
246
							</li>
247
							<li>
248
								<span class="col-w-2 lableSpan">项目时间:</span>
249
								<div class="col-w-9">
250
									<form action="" class="col-w-12" name="formT">
251
										<div class="col-w-5">
252
											<input type="text" class="frmcontype project StartMonth">
253
											<div class="mr_calendar_ym clearfix">
254
												<ul class="mr_year">
255
													<li class="ymli active">2017</li>
256
													<li class="ymli">2016</li>
257
												</ul>
258
												<ul class="mr_month">
259
													<li class="mli" style="text-align:center">1</li>
260
													<li class="mli" style="text-align:center">2</li>
261
													<li class="mli" style="text-align:center">3</li>
262
													<li class="mli active" style="text-align:center">4</li>
263
													<li class="mli" style="text-align:center">5</li>
264
													<li class="mli" style="text-align:center">6</li>
265
													<li class="mli" style="text-align:center">7</li>
266
													<li class="mli" style="text-align:center">8</li>
267
													<li class="mli" style="text-align:center">9</li>
268
													<li class="mli" style="text-align:center">10</li>
269
													<li class="mli" style="text-align:center">11</li>
270
													<li class="mli" style="text-align:center">12</li>
271
												</ul>
272
											</div>
273
										</div>
274
										<div class="col-w-1 alignCenter">至</div>
275
										<div class="col-w-5">
276
											<input type="text" class="frmcontype project StopMonth">
277
											<div class="mr_calendar_ym clearfix">
278
												<ul class="mr_year">
279
													<li class="ymli active">2017</li>
280
													<li class="ymli">2016</li>
281
												</ul>
282
												<ul class="mr_month">
283
													<li class="mli" style="text-align:center">1</li>
284
													<li class="mli" style="text-align:center">2</li>
285
													<li class="mli" style="text-align:center">3</li>
286
													<li class="mli active" style="text-align:center">4</li>
287
													<li class="mli" style="text-align:center">5</li>
288
													<li class="mli" style="text-align:center">6</li>
289
													<li class="mli" style="text-align:center">7</li>
290
													<li class="mli" style="text-align:center">8</li>
291
													<li class="mli" style="text-align:center">9</li>
292
													<li class="mli" style="text-align:center">10</li>
293
													<li class="mli" style="text-align:center">11</li>
294
													<li class="mli" style="text-align:center">12</li>
295
												</ul>
296
											</div>
297
										</div>
298
									</form> 
299
								</div>
300
							</li>
301
							<li>
302
								<span class="col-w-2 lableSpan">项目描述:</span>
303
								<div class="col-w-10">
304
									<div class="msgContbox"><textarea class="frmcontype projectDescp" placeholder="请填写项目描述"></textarea></div>
305
								</div>
306
							</li>
307
							<li class="saveBtn">
308
								<span class="col-w-2">&nbsp;</span>
309
								<div class="col-w-10">
310
									<button type="button" class="frmcontype btnModel" id="saveProfessor">保存</button>
311
									<button type="button" class="frmcontype btnModel btnCancel">取消</button>
312
								</div>
313
							</li>
314
						</ul>
315
					</div>-->
316 239
				</div>
317 240
				<!--荣誉及奖项-->
318 241
				<div class="coninfobox">

+ 30 - 28
js/common.js

@ -797,34 +797,36 @@ function hotKey(sel, num) {
797 797
	})
798 798
	if(num == 1) {
799 799
		return;
800
	}
801
	/*添加*/
802
	$("button:contains('添加')").click(function() {
803
		var oValue = $(this).siblings("input").val().trim();
804
		var oJudge = $(this).parent().siblings().find("ul.ulspace li");
805
		var addContent = $(this).siblings("input").attr("data-pro");
806
		var addNum = $(this).siblings("input").attr("data-num");
807
		var addfontSizeNum = $(this).siblings("input").attr("data-fontSizeN");
808
		if(!oValue) {
809
			$.MsgBox.Alert('提示', '请先填写内容');
810
			return;
811
		}
812
		if(oValue.length > addfontSizeNum) {
813
			$.MsgBox.Alert('提示', addContent);
814
			return;
815
		}
816
		for(var i = 0; i < oJudge.length; i++) {
817
			if(oValue == oJudge[i].innerText) {
818
				$.MsgBox.Alert('提示', '添加内容不能重复');
800
	}else{
801
		/*添加*/
802
		$(".addButton").click(function() {
803
			var oValue = $(this).siblings("input").val().trim();
804
			var oJudge = $(this).parent().siblings().find("ul.ulspace li");
805
			var addContent = $(this).siblings("input").attr("data-pro");
806
			var addNum = $(this).siblings("input").attr("data-num");
807
			var addfontSizeNum = $(this).siblings("input").attr("data-fontSizeN");
808
			if(!oValue) {
809
				$.MsgBox.Alert('提示', '请先填写内容');
819 810
				return;
820 811
			}
821
		}
822
		$(this).parent().siblings().find("ul.ulspace").append('<li>' + oValue + '<div class="closeThis"></div></li>');
823
		$(this).hide();
824
		$(this).siblings("input").val("");
825
		if(oJudge.length == addNum - 1) {
826
			$(this).val("").parents(".col-w-12").hide();
827
		}
828
		$(this).siblings(".keydrop").find("ul").html("");
829
	})
812
			if(oValue.length > addfontSizeNum) {
813
				$.MsgBox.Alert('提示', addContent);
814
				return;
815
			}
816
			for(var i = 0; i < oJudge.length; i++) {
817
				if(oValue == oJudge[i].innerText) {
818
					$.MsgBox.Alert('提示', '添加内容不能重复');
819
					return;
820
				}
821
			}
822
			$(this).parent().siblings().find("ul.ulspace").append('<li>' + oValue + '<div class="closeThis"></div></li>');
823
			$(this).hide();
824
			$(this).siblings("input").val("");
825
			if(oJudge.length == addNum - 1) {
826
				$(this).val("").parents(".col-w-12").hide();
827
			}
828
			$(this).siblings(".keydrop").find("ul").html("");
829
		})
830
	}
831
	
830 832
}

+ 65 - 89
js/information.js

@ -112,7 +112,7 @@ $(function() {
112 112
		location.href = "login.html";
113 113
		return;
114 114
	}
115

115
	hotKey(".oinput");//
116 116
	//////////////////基本信息增删改查相关开始//////////////
117 117
	//头像旁保存
118 118
	$("#saveProfessor").on("click", function() {
@ -150,24 +150,6 @@ $(function() {
150 150
		}
151 151
		personUpdata();
152 152
	});
153
	//更新认证状态函数
154
//	var upStatus = function() {
155
//		$.ajax({
156
//			url: "/ajax/professor/authStatus",
157
//			dataType: 'json', //数据格式类型
158
//			type: 'post', //http请求类型
159
//			data: {
160
//				authStatus: 0,
161
//				id: userid
162
//			},
163
//			timeout: 10000, //超时设置				
164
//			success: function(data) {
165
//				if(data.success) {} else {
166
//
167
//				}
168
//			}
169
//		})
170
//	}
171 153

172 154
	function personUpdata() {
173 155
		var $data = {};
@ -329,29 +311,19 @@ $(function() {
329 311
					$("#subjectShow").append('<li>'+ subs[i] + '</li>');
330 312
				};
331 313
			}
332
		}
333
	}
334
	//学术领域添加
335
	$("#subjectAdd").click(function() {
336
		var val = $("#subject").val();
337
		if(!val) {
338
			$.MsgBox.Alert("提示", "内容不能为空");
339
			return;
340
		}
341
		if(val.length>10){$.MsgBox.Alert("提示", "学术领域不得超过10个字");return;}
342
		var inV = $("#subjectList .wmlist");
343
		for(var i = 0; i < inV.length; i++) {
344
			if(inV[i].innerText == val) {
345
				$.MsgBox.Alert("提示", "不能添加重复内容");
346
				return;
314
			if( $("#subjectShow").find("li").length == 20) {
315
				$("#subjectList").parents(".keyResult").siblings("div.col-w-12").hide();
347 316
			}
348 317
		}
349
		$("#subjectList").append('<li>'+ val + '<div class="closeThis"></div></li>')
350
		$("#subject").val("")
351
	})
318
	}
319

352 320
	//学术领域删除
353 321
	$("#subjectList").on("click", ".closeThis", function() {
354 322
		$(this).parent().remove();
323
		var liNum = $("#subjectList").find("li").length;
324
		if(liNum < 20) {
325
			$("#subjectList").parents(".keyResult").siblings("div.col-w-12").show();
326
		}
355 327
	})
356 328
	//学术领域保存
357 329
	$("#subjectSave").on("click", function() {
@ -381,7 +353,7 @@ $(function() {
381 353
					$(".coninfocon").css("display", "block");
382 354
					subjectShow(subjectAll);
383 355
				} else {
384
					$.MsgBox.Alert("message", $data.msg);
356
					$.MsgBox.Alert("提示", $data.msg);
385 357
				}
386 358
			}
387 359
		});
@ -405,63 +377,54 @@ $(function() {
405 377

406 378
				};
407 379
			}
408
		}
409
	}
410
	//应用行业添加
411
	$("#industryAdd").click(function() {
412
		var val = $("#industry").val();
413
		if(!val) {
414
			$.MsgBox.Alert("提示", "内容不能为空");
415
			return;
416
		}
417
		if(val.length>10){$.MsgBox.Alert("提示", "行业领域不得超过10个字");return;}
418
		var inV = $("#industryList li");
419
		for(var i = 0; i < inV.length; i++) {
420
			if(inV[i].innerText == val) {
421
				$.MsgBox.Alert("提示", "不能添加重复内容");
422
				return;
380
			if( $("#industryShow").find("li").length == 20) {
381
				$("#industryList").parents(".keyResult").siblings("div.col-w-12").hide();
423 382
			}
424 383
		}
425
		$("#industryList").append("<li>" + val + "<span class='closeThis'></span></li>")
426
		$("#industry").val("")
427
	})
384
	}
385

428 386
	//应用行业删除
429 387
	$("#industryList").on("click", ".closeThis", function() {
430 388
		$(this).parent().remove();
389
		var liNum = $("#industryList").find("li").length;
390
		if(liNum < 20) {
391
			$("#industryList").parents(".keyResult").siblings("div.col-w-12").show();
392
		}
431 393
	})
432 394
	//应用行业保存
433 395
	$("#industrySave").on("click", function() {
434
			var industrys = $("#industryList li");
435
			var industryAll = "";
436
			if(industrys.size() > 0) {
437
				for(var i = 0; i < industrys.size(); i++) {
438
					industryAll += industrys[i].innerText;
439
					industryAll += ',';
440
				};
441
				industryAll = industryAll.substring(0, industryAll.length - 1);
442
			}
443
			$.ajax({
444
				"url": "/ajax/professor/industry",
445
				"type": "POST",
446
				"data": {
447
					"id": userid,
448
					"industry": industryAll
449
				},
450
				"contentType": "application/x-www-form-urlencoded",
451
				"success": function($data) {
452
					if($data.success) {
453
						$("#industry").val("");
454
						$("#industryShow").empty();
455
						$("#industryList").empty();
456
						$(".indu").css("display", "none");
457
						$(".coninfocon").css("display", "block");
458
						industryShow(industryAll);
459
					} else {
460
						$.MsgBox.Alert("message", $data.msg);
461
					}
396
		$(this).parents(".modifybox").hide();
397
		var industrys = $("#industryList li");
398
		var industryAll = "";
399
		if(industrys.size() > 0) {
400
			for(var i = 0; i < industrys.size(); i++) {
401
				industryAll += industrys[i].innerText;
402
				industryAll += ',';
403
			};
404
			industryAll = industryAll.substring(0, industryAll.length - 1);
405
		}
406
		$.ajax({
407
			"url": "/ajax/professor/industry",
408
			"type": "POST",
409
			"data": {
410
				"id": userid,
411
				"industry": industryAll
412
			},
413
			"contentType": "application/x-www-form-urlencoded",
414
			"success": function($data) {
415
				if($data.success) {
416
					$("#industry").val("");
417
					$("#industryShow").empty();
418
					$("#industryList").empty();
419
					$(".indu").css("display", "none");
420
					$(".coninfocon").css("display", "block");
421
					industryShow(industryAll);
422
				} else {
423
					$.MsgBox.Alert("提示", $data.msg);
462 424
				}
463
			});
464
		})
425
			}
426
		});
427
	})
465 428
	//////////////////应用行业增删改查相关结束//////////////
466 429
	
467 430
	//////////////////研究方向增删改查相关开始//////////////
@ -501,6 +464,9 @@ $(function() {
501 464
				$("#researchAreaList").append("<li class='yjlist'><span class='like'>" + $data.count + "</span><span class='ra'>" + $data.caption + "</span><span class='closeThis'></span></li>");
502 465

503 466
			}
467
			if( $("#researchAreaShow").find("li").length == 10) {
468
				$("#researchAreaList").parents(".keyResult").siblings("div.col-w-12").hide();
469
			}
504 470
		}
505 471
	}
506 472
	//判断点赞的用户是否有头像
@ -518,6 +484,7 @@ $(function() {
518 484
		}
519 485
		return ret;
520 486
	}
487
	hotKey(".oinputM",1);
521 488
	//研究方向添加
522 489
	$("#researchAreaAdd").click(function() {
523 490
		var researchArea = $("#researchArea").val();
@ -533,15 +500,24 @@ $(function() {
533 500
				return;
534 501
			}
535 502
		}
536
		$("#researchAreaList").append("<li class='yjlist'><span class='like'>0</span><span class='ra'>" + researchArea + "</span><span class='closeThis'></span></li>")
503
		if(inV.length == 9){
504
			$("#researchAreaList").parents(".keyResult").siblings("div.col-w-12").hide();
505
		}
506
		
507
		$("#researchAreaList").append("<li class='yjlist'><span class='like'>0</span><span class='ra'>" + researchArea + "</span><span class='closeThis'></span></li>");
537 508
		$("#researchArea").val("");
538 509
	});
539 510
	//研究方向删除
540 511
	$("#researchAreaList").on("click", ".closeThis", function() {
541 512
		$(this).parent().remove();
513
		var liNum = $("#researchAreaList").find("li").length;
514
		if(liNum < 10) {
515
			$("#researchAreaList").parents(".keyResult").siblings("div.col-w-12").show();
516
		}
542 517
	})
543 518
	//研究方向保存
544 519
	$("#researchAreaSave").on("click", function() {
520
		$(this).parents(".modifybox").hide();
545 521
		var $data = [];
546 522
		var researchAreas = $("#researchAreaList .yjlist .ra");
547 523
		if(researchAreas.length > 0) {
@ -570,7 +546,7 @@ $(function() {
570 546
					});
571 547

572 548
				} else {
573
					$.MsgBox.Alert("message", $data.msg);
549
					$.MsgBox.Alert("提示", $data.msg);
574 550
				}
575 551
			}
576 552
		});
@ -728,7 +704,7 @@ $(function() {
728 704
							}
729 705
						});
730 706
					} else {
731
						$.MsgBox.Alert("message", $data.msg);
707
						$.MsgBox.Alert("提示", $data.msg);
732 708
					}
733 709
				}
734 710
			});

+ 157 - 54
js/userInforShow.js

@ -10,8 +10,11 @@ $(function() {
10 10
	if(professorId) {
11 11
		getUserInfo(professorId);//获取个人详细信息
12 12
		historyEvaluate();//获取历史合作及评价
13
		getResource();//获取个人发布的资源
14
		getArticle();//获取个人发布的文章
13
		getResource(10,1,true);//获取个人发布的资源
14
		getArticle(10,1,true);//获取个人发布的文章
15
		getPaper(10,1,true);//获取个人发布的论文
16
		getPatent(10,1,true);//获取个人发布的专利
17
		
15 18
		$.ajax({//我关注的
16 19
			type:"get",
17 20
			url:"/ajax/watch/countObject",
@ -254,8 +257,6 @@ $(function() {
254 257
		})
255 258
	}
256 259
	
257
	
258
	
259 260
	var subjectShow = function(data) {
260 261
		if(data != undefined && data.length != 0) {
261 262
			var subs = new Array();
@ -455,7 +456,6 @@ $(function() {
455 456
			async:true,
456 457
			success: function(data) {
457 458
				var $info = data.data;
458
				console.log($info )
459 459
				if(data.success) {
460 460
					if($info.hasHeadImage){
461 461
						$("#proHead").css("background-image","url(/images/head/"+ $info.id +"_l.jpg)");
@ -603,29 +603,32 @@ $(function() {
603 603
		})
604 604
	}
605 605
	//获取资源
606
	function getResource(){
606
	function getResource(pageSize, pageNo,isbind){
607 607
		$.ajax({
608
			"url": "/ajax/resource/qaProPublish",
608
			"url": "/ajax/resource/pqProPublish",
609 609
			"type": "get",
610 610
			"async": false,
611 611
			"data": {
612
				"professorId": professorId
612
				"professorId": professorId,
613
				"pageSize": pageSize,
614
				"pageNo": pageNo
613 615
			},
614 616
			"success": function(data) {
615 617
				console.log(data);
616 618
				if(data.success) {
617 619
					var madiaHead ='';
618
					if(data.data.length > 0){
619
						for(var i = 0; i < data.data.length; i++) {
620
							if(data.data[i].images.length) {
621
								madiaHead ='/data/resource/' + data.data[i].images[0].imageSrc ;
620
					var dataStr=data.data.data;
621
					if(dataStr.length > 0){
622
						for(var i = 0; i < dataStr.length; i++) {
623
							if(dataStr[i].images.length) {
624
								madiaHead ='/data/resource/' + dataStr[i].images[0].imageSrc ;
622 625
							}else{
623 626
								madiaHead ='/images/default-resource.jpg';
624 627
							}
625 628
							var strAdd = '';
626
							strAdd += '<li><a href="resourceShow.html?resourceId='+ data.data[i].resourceId +'" class="flexCenter urlgo">';
629
							strAdd += '<li><a traget="_blank" href="resourceShow.html?resourceId='+ dataStr[i].resourceId +'" class="flexCenter urlgo">';
627 630
							strAdd += '<div class="madiaHead resouseHead" style="background-image:url('+ madiaHead +')"></div>';
628
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ data.data[i].resourceName +'</p><p class="h2Font ellipsisSty">应用用途:'+ data.data[i].supportedServices+'</p></div>';				
631
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataStr[i].resourceName +'</p><p class="h2Font ellipsisSty">应用用途:'+ dataStr[i].supportedServices+'</p></div>';				
629 632
							strAdd += '</a></li>';
630 633
							
631 634
							if(i==0){
@ -633,6 +636,18 @@ $(function() {
633 636
							}
634 637
							$("#proResource").append(strAdd);
635 638
						}
639
						//分页
640
						if(isbind==true){
641
							$("#proResource").siblings(".tcdPageCode").createPage({
642
								pageCount: Math.ceil(data.data.total / 10),
643
								current: data.data.pageNo,
644
								backFn: function(p) {
645
									$("#proResource").html("");
646
									getResource(10, p,false);
647
									document.body.scrollTop = document.documentElement.scrollTop = 0;
648
								}
649
							});
650
						}
636 651
					}else{
637 652
						$("#proResource + .nodatabox").show();
638 653
						$("#proResource + .nodatabox").find(".noContip").text("主人尚未发布任何资源");
@ -646,44 +661,59 @@ $(function() {
646 661
		});
647 662
	}
648 663
	//获取文章
649
	function getArticle(){
664
	function getArticle(pageSize, pageNo,isbind){
650 665
		$.ajax({
651
			url: "/ajax/article/qaProPublish",
666
			url: "/ajax/article/pqProPublish",
652 667
			dataType: 'json', //数据格式类型
653 668
			type: 'GET', //http请求类型
654 669
			data: {
655
				"professorId": professorId
670
				"professorId": professorId,
671
				"pageSize": pageSize,
672
				"pageNo": pageNo
656 673
			},
657 674
			timeout: 10000, //超时设置
658 675
			success: function(data) {
659 676
				if(data.success) {
660 677
					var madiaHead ='/images/default-artical.jpg';
661
					if(data.data.length > 0){
662
						for(var i = 0; i < data.data.length; i++) {
663
							if(data.data[i].articleImg) {
664
								madiaHead ='/data/article/' + data.data[i].articleImg ;
678
					var dataStr=data.data.data;
679
					if(dataStr.length > 0){
680
						for(var i = 0; i < dataStr.length; i++) {
681
							if(dataStr[i].articleImg) {
682
								madiaHead ='/data/article/' + dataStr[i].articleImg ;
665 683
							}
666 684
							var strAdd = '';
667
							strAdd += '<li><a href="articalShow.html?articleId='+ data.data[i].articleId +'" class="flexCenter urlgo">';
685
							strAdd += '<li><a traget="_blank" href="articalShow.html?articleId='+ dataStr[i].articleId +'" class="flexCenter urlgo">';
668 686
							strAdd += '<div class="madiaHead artHead" style="background-image:url('+ madiaHead +')"></div>';
669
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ data.data[i].articleTitle +'</p>';
687
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataStr[i].articleTitle +'</p>';
670 688
							strAdd += '<ul class="h2Font clearfix">';
671
							strAdd += '<li><span class="time">'+ commenTime(data.data[i].publishTime) +'</span></li>';
672
							strAdd += '<li><span id="pageViews">阅读量 '+ data.data[i].pageViews +'</span></li>';
673
							strAdd += '<li><span id="articleAgree">点赞  '+ data.data[i].articleAgree +'</span></li>';
689
							strAdd += '<li><span class="time">'+ commenTime(dataStr[i].publishTime) +'</span></li>';
690
							strAdd += '<li><span id="pageViews">阅读量 '+ dataStr[i].pageViews +'</span></li>';
691
							strAdd += '<li><span id="articleAgree">点赞  '+ dataStr[i].articleAgree +'</span></li>';
674 692
							strAdd += '<li><span id="comment"></span></li>';
675 693
							strAdd += '</ul></div>';
676 694
							strAdd += '</a></li>';
677 695
							
678 696
							var $strAdd = $(strAdd);
679 697
							$("#proArticel").append( $strAdd);
680
							commentnum(data.data[i].articleId, $strAdd) //文章评论数
698
							commentnum(dataStr[i].articleId, $strAdd) //文章评论数
681 699
							if(i==0){
682 700
								$("#showArticle").append(strAdd);
683
								commentnum(data.data[0].articleId, $strAdd)
701
								commentnum(dataStr[0].articleId, $strAdd)
684 702
							}
685 703
						
686 704
						}
705
						//分页
706
						if(isbind==true){
707
							$("#proArticel").siblings(".tcdPageCode").createPage({
708
								pageCount: Math.ceil(data.data.total / 10),
709
								current: data.data.pageNo,
710
								backFn: function(p) {
711
									$("#proArticel").html("");
712
									getArticle(10, p,false);
713
									document.body.scrollTop = document.documentElement.scrollTop = 0;
714
								}
715
							});
716
						}
687 717
					}else{
688 718
						$("#proArticel + .nodatabox").show();
689 719
						$("#proArticel + .nodatabox").find(".noContip").text("主人尚未发布任何文章");
@ -700,59 +730,132 @@ $(function() {
700 730
		
701 731
	}
702 732
	//获取专利
703
	function getPatent(){
733
	function getPatent(pageSize, pageNo,isbind){
704 734
		$.ajax({
705
			url: "/ajax/ppatent/qm",
735
			url: "/ajax/ppatent/byProfessor",
706 736
			dataType: 'json', //数据格式类型
707 737
			type: 'GET', //http请求类型
708 738
			data: {
709
				"professorId": professorId
739
				"id": professorId,
740
				"pageSize": pageSize,
741
				"pageNo": pageNo
742
			},
743
			timeout: 10000, //超时设置
744
			success: function(data) {
745
				if(data.success) {
746
					var madiaHead ='/images/default-artical.jpg';
747
					var dataStr=data.data.data;
748
					if(dataStr.length > 0){
749
						for(var i = 0; i < dataStr.length; i++) {
750
							var strAdd = '';
751
							strAdd += '<li><a traget="_blank" href="patentShow.html?patentId='+ dataStr[i].id +'" class="flexCenter urlgo">';
752
							strAdd += '<div class="madiaHead artHead" style="background-image:url('+ madiaHead +')"></div>';
753
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataStr[i].name +'</p>';
754
							strAdd += '<p class="h1Font ellipsisSty-2">发明人:'+ dataStr[i].authors +'</p>';
755
							strAdd += '<p class="h1Font ellipsisSty-2">申请人:'+ reqPerson +'</p>';
756
							strAdd += '</div>';
757
							strAdd += '</a></li>';
758
							
759
							var $strAdd = $(strAdd);
760
							$("#proPatent").append( $strAdd);
761
							if(i==0){
762
								$("#showPatent").append(strAdd);
763
							}
764
						}
765
						//分页
766
						if(isbind==true){
767
							$("#proPatent").siblings(".tcdPageCode").createPage({
768
								pageCount: Math.ceil(data.data.total / 10),
769
								current: data.data.pageNo,
770
								backFn: function(p) {
771
									$("#proPatent").html("");
772
									getArticle(10, p,false);
773
									document.body.scrollTop = document.documentElement.scrollTop = 0;
774
								}
775
							});
776
						}
777
					}else{
778
						$("#proPatent + .nodatabox").show();
779
						$("#proPatent + .nodatabox").find(".noContip").text("主人尚未导入任何专利");
780
						$("#showPatent").parents(".coninfobox").hide();
781
					}
782
				}
783
			},
784
			error: function() {
785
				return;
786
			}
787
		});
788
	}
789
	//获取论文
790
	function getPaper(pageSize, pageNo,isbind){
791
		$.ajax({
792
			url: "/ajax/ppaper/byProfessor",
793
			dataType: 'json', //数据格式类型
794
			type: 'GET', //http请求类型
795
			data: {
796
				"id": professorId,
797
				"pageSize": pageSize,
798
				"pageNo": pageNo
710 799
			},
711 800
			timeout: 10000, //超时设置
712 801
			success: function(data) {
713 802
				if(data.success) {
714 803
					var madiaHead ='/images/default-artical.jpg';
715
					if(data.data.length > 0){
716
						for(var i = 0; i < data.data.length; i++) {
717
							if(data.data[i].articleImg) {
718
								madiaHead ='/data/article/' + data.data[i].articleImg ;
804
					var dataStr=data.data.data;
805
					if(dataStr.length > 0){
806
						for(var i = 0; i < dataStr.length; i++) {
807
							var moreInf=""
808
							if(!dataStr[i].cn4periodical){
809
								dataStr[i].cn4periodical="";
810
							}
811
							if(!dataStr[i].en4periodical){
812
								dataStr[i].en4periodical="";
719 813
							}
814
							if(!dataStr[i].pubDay){
815
								dataStr[i].pubDay="";
816
							}
817
							moreInf = dataStr[i].cn4periodical+ " " +dataStr[i].en4periodical+ " " +dataStr[i].pubDay
818
							
720 819
							var strAdd = '';
721
							strAdd += '<li><a href="articalShow.html?articleId='+ data.data[i].articleId +'" class="flexCenter urlgo">';
820
							strAdd += '<li><a traget="_blank" href="paperShow.html?paperId='+ dataStr[i].id +'" class="flexCenter urlgo">';
722 821
							strAdd += '<div class="madiaHead artHead" style="background-image:url('+ madiaHead +')"></div>';
723
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ data.data[i].articleTitle +'</p>';
724
							strAdd += '<ul class="h2Font clearfix">';
725
							strAdd += '<li><span class="time">'+ commenTime(data.data[i].publishTime) +'</span></li>';
726
							strAdd += '<li><span id="pageViews">阅读量 '+ data.data[i].pageViews +'</span></li>';
727
							strAdd += '<li><span id="articleAgree">点赞  '+ data.data[i].articleAgree +'</span></li>';
728
							strAdd += '<li><span id="comment"></span></li>';
729
							strAdd += '</ul></div>';
822
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty-2">'+ dataStr[i].name +'</p>';
823
							strAdd += '<p class="h1Font ellipsisSty-2">作者:'+ dataStr[i].authors +'</p>';
824
							strAdd += '<p class="h1Font ellipsisSty-2">期刊:'+ moreInf +'</p>';
825
							strAdd += '</div>';
730 826
							strAdd += '</a></li>';
731 827
							
732 828
							var $strAdd = $(strAdd);
733
							$("#proArticel").append( $strAdd);
734
							commentnum(data.data[i].articleId, $strAdd) //文章评论数
829
							$("#proPaper").append( $strAdd);
735 830
							if(i==0){
736
								$("#showArticle").append(strAdd);
737
								commentnum(data.data[0].articleId, $strAdd)
831
								$("#showPaper").append(strAdd);
738 832
							}
739
						
833
						}
834
						//分页
835
						if(isbind==true){
836
							$("#proPaper").siblings(".tcdPageCode").createPage({
837
								pageCount: Math.ceil(data.data.total / 10),
838
								current: data.data.pageNo,
839
								backFn: function(p) {
840
									$("#proPaper").html("");
841
									getArticle(10, p,false);
842
									document.body.scrollTop = document.documentElement.scrollTop = 0;
843
								}
844
							});
740 845
						}
741 846
					}else{
742
						$("#proArticel + .nodatabox").show();
743
						$("#proArticel + .nodatabox").find(".noContip").text("主人尚未发布任何文章");
744
						$("#showArticle").parents(".coninfobox").hide();
847
						$("#proPaper + .nodatabox").show();
848
						$("#proPaper + .nodatabox").find(".noContip").text("主人尚未导入任何论文");
849
						$("#showPaper").parents(".coninfobox").hide();
745 850
					}
746
					
747
748 851
				}
749 852
			},
750 853
			error: function() {
751 854
				return;
752 855
			}
753 856
		});
754
		
755 857
	}
858
	
756 859
	//查文章评论数
757 860
	function commentnum(articleId, $itemlist) {
758 861
		$.ajax({

+ 48 - 29
userInforShow.html

@ -165,7 +165,7 @@
165 165
						<div class="coninfotit">专利 <span class="seeMore" id="seeMoreP">查看全部<em></em></span></div>
166 166
						<div class="coninfocon form-result aboutRes">
167 167
							<ul id="showPatent">
168
								<li><a href="resourceShow.html" class="flexCenter urlgo">
168
								<!--<li><a href="" class="flexCenter urlgo">
169 169
									<div class="madiaHead resouseHead" id="userimg"></div>
170 170
									<div class="madiaInfo">
171 171
										<p class="h1Font ellipsisSty">习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动</p>
@ -173,7 +173,7 @@
173 173
										<p class="h2Font ellipsisSty">申请人:北京科袖科技有限公司</p>
174 174
									</div>
175 175
								</a>
176
								</li>
176
								</li>-->
177 177
							</ul>
178 178
						</div>
179 179
					</div>
@ -181,7 +181,7 @@
181 181
						<div class="coninfotit">论文 <span class="seeMore" id="seeMoreL">查看全部<em></em></span></div>
182 182
						<div class="coninfocon form-result aboutRes">
183 183
							<ul id="showPaper">
184
								<li><a href="resourceShow.html" class="flexCenter urlgo">
184
								<!--<li><a href="" class="flexCenter urlgo">
185 185
									<div class="madiaHead resouseHead" id="userimg"></div>
186 186
									<div class="madiaInfo">
187 187
										<p class="h1Font ellipsisSty">习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动</p>
@ -189,7 +189,7 @@
189 189
										<p class="h2Font ellipsisSty">期刊:科学院20160308期报刊</p>
190 190
									</div>
191 191
								</a>
192
								</li>
192
								</li>-->
193 193
							</ul>
194 194
						</div>
195 195
					</div>
@ -245,7 +245,7 @@
245 245
						            </div>
246 246
						        </div>
247 247
						    </div>
248
							<!--<div class="tcdPageCode"></div>-->
248
							<div class="tcdPageCode"></div>
249 249
						</div>
250 250
					</div>
251 251
				</div>
@ -276,41 +276,61 @@
276 276
						            </div>
277 277
						        </div>
278 278
						    </div>
279
							<!--<div class="tcdPageCode"></div>-->
279
							<div class="tcdPageCode"></div>
280 280
						</div>
281 281
					</div>
282 282
				</div>
283 283
				<div id="item4user" class="leftconItem">
284 284
					<div class="coninfobox form-item otherShow">
285 285
						<div class="coninfocon form-result aboutRes">
286
							<ul>
287
								<li><a href="resourceShow.html" class="flexCenter urlgo">
288
									<div class="madiaHead resouseHead" id="userimg"></div>
289
									<div class="madiaInfo">
290
										<p class="h1Font ellipsisSty">习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动</p>
291
										<p class="h2Font ellipsisSty">发明人:习近平,习近平,习近平,习近平,习近平</p>
292
										<p class="h2Font ellipsisSty">申请人:北京科袖科技有限公司</p>
293
									</div>
294
								</a>
295
								</li>
286
							<ul id="proPatent">
287
								<!--<li><a href="resourceShow.html" class="flexCenter urlgo">
288
									<div class="madiaHead resouseHead" id="userimg"></div>
289
									<div class="madiaInfo">
290
										<p class="h1Font ellipsisSty">习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动</p>
291
										<p class="h2Font ellipsisSty">发明人:习近平,习近平,习近平,习近平,习近平</p>
292
										<p class="h2Font ellipsisSty">申请人:北京科袖科技有限公司</p>
293
									</div>
294
								</a>
295
								</li>-->
296 296
							</ul>
297
							<!--无搜索结果-->
298
							<div class="nodatabox displayNone">
299
						        <div class="nodata">
300
						            <div class="picbox picNull"></div>
301
						            <div class="txtbox">
302
						            	<p class="noContip"></p>
303
						            </div>
304
						        </div>
305
						    </div>
306
							<div class="tcdPageCode"></div>
297 307
						</div>
298 308
					</div>
299 309
				</div>
300 310
				<div id="item5user" class="leftconItem">
301 311
					<div class="coninfobox form-item otherShow">
302 312
						<div class="coninfocon form-result aboutRes">
303
							<ul>
304
								<li><a href="resourceShow.html" class="flexCenter urlgo">
305
									<div class="madiaHead resouseHead" id="userimg"></div>
306
									<div class="madiaInfo">
307
										<p class="h1Font ellipsisSty">习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动</p>
308
										<p class="h2Font ellipsisSty">作者:习近平,习近平,习近平,习近平,习近平</p>
309
										<p class="h2Font ellipsisSty">期刊:科学院20160308期报刊</p>
310
									</div>
311
								</a>
312
								</li>
313
							<ul id="proPaper">
314
								<!--<li><a href="resourceShow.html" class="flexCenter urlgo">
315
									<div class="madiaHead resouseHead" id="userimg"></div>
316
									<div class="madiaInfo">
317
										<p class="h1Font ellipsisSty">习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动习近平将对哈萨克斯坦进行国事访问并出席活动</p>
318
										<p class="h2Font ellipsisSty">作者:习近平,习近平,习近平,习近平,习近平</p>
319
										<p class="h2Font ellipsisSty">期刊:科学院20160308期报刊</p>
320
									</div>
321
								</a>
322
								</li>-->
313 323
							</ul>
324
							<!--无搜索结果-->
325
							<div class="nodatabox displayNone">
326
						        <div class="nodata">
327
						            <div class="picbox picNull"></div>
328
						            <div class="txtbox">
329
						            	<p class="noContip"></p>
330
						            </div>
331
						        </div>
332
						    </div>
333
							<div class="tcdPageCode"></div>
314 334
						</div>
315 335
					</div>
316 336
				</div>
@ -388,10 +408,9 @@
388 408
<script type="text/javascript" src="js/jquery.similar.msgbox.js"></script>
389 409
<script type="text/javascript" src="js/weixinshare/qrcode.min.js"></script>
390 410
<script type="text/javascript" src="js/common.js"></script>
411
<script type="text/javascript" src="js/jquery.page.js"></script>
391 412
<script type="text/javascript" src="js/userInforShow.js"></script>
392
<script type="text/javascript" src="js/popup.js"></script>
393
<!--<script type="text/javascript" src="js/information.brow.js"></script>
394
<script type="text/javascript" src="js/my-attention.js"></script>-->
413
<script type="text/javascript" src="js/popup.js"></script>
395 414
<script>
396 415

397 416
	//微信分享