jack 7 years ago
parent
commit
b4001a4e50
8 changed files with 836 additions and 8 deletions
  1. 185 0
      fw_template_r3254/paper.html
  2. 1 1
      js/paperShow.js
  3. 643 0
      js/paperShow1.js
  4. 1 1
      js/patentShow.js
  5. 2 2
      js/patentShow1.js
  6. 1 1
      js/searchNew.js
  7. 2 2
      js/userInforShow.js
  8. 1 1
      paperShow.html

+ 185 - 0
fw_template_r3254/paper.html

@ -0,0 +1,185 @@
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 type="text/css" href="/css/common.css" rel="stylesheet">
11
<link type="text/css" href="/css/genindex.css" rel="stylesheet">
12
<script type="text/javascript" src="/js/jquery-1.11.1.js"></script>
13
<script type="text/javascript">
14
	window.staticPageData =${jsonData};	
15
</script>
16
</head>
17

18
<body>
19
<header id="header">
20
	<script src="js/head-staticize.js"></script>
21
</header>
22
<div id="container">
23
	<div class="containerCon">
24
		<div class="contentCon clearfix conBlock">
25
			<div class="leftconBox floatL">
26
				<div class="showDetail">
27
					<div class="h1Font" id="paperName"></div>
28
					<div class="operateBlock bottomShow" style="margin-top:10px;">
29
                		<ul class="clearfix">
30
                			<li><span>阅读量</span> <span id="pageView"></span></li>
31
                			<li><span>收藏</span> <em class="operateicon operateicon2 icon-collect" id="collectBtn"></em></li>
32
							<li>
33
								<span>分享到</span>
34
								<a href="" id="weibo" target="_blank"><em class="operateicon operateicon2 icon-sina"></em></a>
35
								<em class="operateicon operateicon2 icon-wechat shareWeixin">
36
									<div class="shareCode clearfix">
37
										<div class="floatL" id="qrcode"></div>
38
										<div class="shareWord floatR">
39
											<p>打开微信“扫一扫”,<br/>打开网页后点击屏幕右上角“分享”按钮</p>
40
										</div>
41
									</div>
42
								</em>
43
							</li>
44
                		</ul>
45
                	</div>
46
                	
47
					<!--资源详情区-->
48
					<div class="showMain showMainP">
49
						<ul>
50
							<li>
51
								<div class="showTit">期刊:<span class="showCon" id="paperJournal"></span></div>
52
							</li>
53
							<li>
54
								<div class="showTit">期卷:<span class="showCon" id="paperVolume"></span></div>
55
							</li>
56
							<li>
57
								<div class="showTit">摘要:</div>
58
								<div class="showCon" id="paperAbstract">
59
								</div>
60
							</li>
61
						</ul>
62
					</div>
63
					<!--标签模块-->
64
					<ul class="tagList">
65
					</ul>
66
					<!--作者-->
67
					<div class="form-item aboutPa">
68
						<div class="aboutTit">作者</div>
69
						<div class="form-result">
70
							<ul class="authorBox clearfix" id="aboutAuthors">
71
								<!--<li class="flexCenter">
72
									<div class="madiaHead useHead" id="userimg"></div>
73
									<div class="madiaInfo">
74
										<p class="ellipsisSty">
75
											<span class="h1Font" id="name">vbszfd</span><em class="authiconNew authicon-staff-ok" title="企业认证员工"></em>
76
										</p>
77
										<p class="h2Font ellipsisSty">vzds</p>
78
									</div>
79
									<div class="goSpan">
80
										<span class="yaoqing">邀请
81
											<div class="shareCode clearfix">
82
												<div class="floatL" id="qrcodeUser"></div>
83
												<div class="shareWord floatR">
84
													<p>打开微信“扫一扫”,<br/>打开网页后点击屏幕右上角“分享”按钮</p>
85
												</div>
86
											</div>
87
										</span>
88
									</div>
89
								</li>-->
90
								<li class="lastBtn">
91
									<div>查看全部作者(<span></span>)</div>
92
								</li>
93
							</ul>
94
						</div>
95
					</div>
96
					<div class="ifLogin" id="messagego">
97
					    <!--未登录-->
98
					    <div class="thumbBlock">
99
							<span class="thumbBtn thunbgo">赞 <span>0</span></span>
100
						</div>
101
					    <div class="ifLoginUn displayNone">
102
					    	<span class="floaL">大牛,别默默的看了,快登录给我留言吧!</span>
103
					    	<ul class="floatR">
104
					    		<li><a href="register.html">注册</a></li>
105
					    		<li><a>|</a></li>
106
					    		<li class="loginGo"><a>登录</a></li>
107
					    	</ul>
108
					    </div>
109
					    <!--登录可留言-->
110
					    <form class="ifLoginOn clearfix displayNone">
111
					    	<div class="msgContbox">
112
					    		<textarea class="msgCont" placeholder="请输入您的留言内容..."></textarea>
113
					    		<span class="msgconNum"><em>0</em>/200</span>
114
					    	</div>
115
					    	<input type="button" class="frmconbtn btnModel floatR" disabled id="meSendtt" value="留言" />
116
					    </form>
117
					</div>
118
					<div class="form-item commentsArea">
119
						<ul class="commentList">
120
						</ul>
121
						<button class="frmconbtn btnCancel displayNone" id="moreArtical">查看更多留言</button>
122
					</div>
123
					<div class="form-item otherShow displayNone" id="interPaper">
124
						<div class="aboutTit">您可能感兴趣的论文</div>
125
						<div class="form-result aboutRes pointOk">
126
							<ul id="paperList">
127
								
128
							</ul>
129
						</div>
130
					</div>
131
				
132
				</div>
133
			</div>
134
			<div class="rightconBox floatR">
135
				<div class="conItem advertBox advertItem">
136
					<script src="js/adverts/ad_pap.js"></script>
137
				</div>
138
				<div class="conItem displayNone" id="patentrelate">
139
					<div class="form-item otherBlock currentBlock">
140
						<div class="aboutTit">相关专利</div>
141
						<div class="form-result currentArt" style="margin-top:0px;margin-bottom:0px;">
142
							<ul class="recentlyList">
143
								
144
							</ul>
145
						</div>
146
					</div>
147
				</div>
148
			</div>
149
		</div>
150
	</div>
151
</div>
152
<!--反馈建议-->
153
<script type="text/javascript" src="js/correctBack.js"></script>
154
<footer>
155
	<script type="text/javascript" src="js/footer.js"></script>
156
</footer>
157
<script type="text/javascript" src="/js/jquery.cookie.js"></script>
158
<script type="text/javascript" src="/js/jquery.similar.msgbox.js"></script>
159
<script type="text/javascript" src="/js/weixinshare/qrcode.min.js"></script>
160
<script type="text/javascript" src="/js/jquery.page.js"></script>
161
<script type="text/javascript" src="/js/common.js"></script>
162
<script type="text/javascript" src="/js/paperShow1.js"></script>
163
<script type="text/javascript" src="/js/quickLogin.js"></script>
164
<script type="text/javascript">
165

166
	//分享关注按钮
167
	$('.shareWeixin').hover(function(){$(this).find('.shareCode').stop(true,false).fadeToggle();});
168

169
	//微信分享
170
	var qrcode = new QRCode(document.getElementById("qrcode"), {
171
		width : 100,
172
		height : 100
173
	});
174
	function makeCode(){
175
		var hurl = window.location.host;
176
		var paperId =  GetQueryString("paperId");
177
		var elurl = "http://" + hurl + "/e/l.html?id=" + paperId ; 
178
		qrcode.makeCode(elurl);
179
	}
180
	makeCode();
181

182
	
183
</script>
184
</body>
185
</html>

+ 1 - 1
js/paperShow.js

@ -562,7 +562,7 @@ function articledel(commenid) {
562 562
							}
563 563
							moreInf = dataStr[i].cn4periodical+ " " +dataStr[i].en4periodical+ " " +dataStr[i].pubDay;
564 564
							var itemlist = '<li>';
565
							itemlist += '<a class="flexCenter" target="_blank" href="paperShow.html?paperId=' + dataStr[i].id +'" class="linkhref"><div class="madiaHead paperHead"></div>';
565
							itemlist += '<a class="flexCenter" target="_blank" href="/' + pageUrl("pp",dataStr[i]) +'" class="linkhref"><div class="madiaHead paperHead"></div>';
566 566
							itemlist += '<div class="madiaInfo">';
567 567
							itemlist += '<p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
568 568
							itemlist += '<p class="h2Font ellipsisSty">作者:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';

+ 643 - 0
js/paperShow1.js

@ -0,0 +1,643 @@
1
$(document).ready(function() {
2
	loginYesOrNo()
3
	var userid = $.cookie("userid");
4
	var userName = $.cookie("userName");
5
	var paperId = window.staticPageData.id;
6

7
	ifcollectionAbout(paperId,$("#collectBtn"), 5)
8
	getPaperMe();
9
	pageViewsVal();
10
	if(userid && userid != "null" && userid != null){
11
		$(".ifLoginOn").removeClass("displayNone");
12
	}else{
13
		$(".ifLoginUn").removeClass("displayNone");
14
		$(".ifLoginUn").on('click',".loginGo", function() {
15
			quickLog();
16
			operatTab();
17
			closeLog();
18
		})
19
	}
20
	//点击收藏按钮
21
	$("#collectBtn").on('click', function() {
22
		if(userid && userid != null && userid != "null") {
23
			if($(this).is('.icon-collected')){
24
				cancelCollectionAbout(paperId,$(this), 5)
25
			} else {
26
				collectionAbout(paperId,$(this), 5);
27
			}
28
		}else{
29
			quickLog();
30
			operatTab();
31
			closeLog();
32
		}
33
	});
34
	
35
	//关键词标签点击进去搜索
36
	$(".tagList").on("click","li",function(){
37
		var tagText = $(this).find("p").text();
38
		location.href = "searchNew.html?searchContent=" + tagText + "&tagflag=6";
39
	})
40
	
41
	//点击进入个人详情页面
42
	$("#aboutAuthors").on("click","li>a",function(){
43
		var oDataId = $(this).attr("data-id");
44
		if(oDataId.substring(0,1)!="#"){
45
			$(this).attr("href","userInforShow.html?professorId="+oDataId);
46
		}else{
47
			$(this).attr("href","javascript:void(0)");
48
		}
49
	})
50
	$("#aboutAuthors").on("click","li.lastBtn",function(){
51
		$("#aboutAuthors li").css("display","block");
52
		$(this).hide();
53
	})
54
	//点击关注按钮
55
	$("#aboutAuthors").on('click',"span.attenSpan", function() {
56
		var pId=$(this).parent().siblings("a").attr("data-id");
57
		if(userid && userid != null && userid != "null") {
58
			if($(this).is('.attenedSpan')){
59
				cancelCollectionAbout(pId,$(this),1)
60
			} else {
61
				collectionAbout(pId,$(this),1);
62
			}
63
		}else{
64
			quickLog();
65
			operatTab();
66
			closeLog();
67
		}
68
	});
69

70
	
71
	/*获取论文信息*/
72
	function getPaperMe() {
73
					paperHtml(window.staticPageData);
74
					getPaperAuthors(paperId)
75
					var paperName = window.staticPageData.name + "-科袖网";
76
					document.title = paperName;
77
	}
78
	/*获取论文作者信息*/
79
	function getPaperAuthors(stritrm) {
80
		$.ajax({
81
			"url": "/ajax/ppaper/authors",
82
			"type": "GET",
83
			"success": function(data) {
84
				console.log(data);
85
				if(data.success) {
86
					if(data.data.length>0){
87
						$("#aboutAuthors .lastBtn span").text(data.data.length);
88
						for(var i=0;i<data.data.length;i++){
89
							var authTy="",authTit="",baseInfo="",ifPoint="",imgbg="../images/default-photo.jpg";
90
							if(data.data[i].professorId.substring(0, 1) != "#"){
91
								$.ajax({
92
									type:"get",
93
									url:"/ajax/professor/editBaseInfo/" + data.data[i].professorId,
94
									async:false,
95
									success:function($proData){
96
										console.log($proData)
97
										if($proData.success){
98
											var showPro = $proData.data;
99
											if(showPro.hasHeadImage == 1) {
100
												imgbg = "/images/head/" + showPro.id + "_l.jpg";
101
											} else {
102
												imgbg = "../images/default-photo.jpg";
103
											}
104
											ifPoint = "pointThis";
105
											//认证
106
											var oSty = autho(showPro.authType,showPro.orgAuth,showPro.authStatus);
107
											authTy = oSty.sty;
108
											authTit = oSty.title;
109
											
110
											var title = showPro.title || "";
111
											var orgName = showPro.orgName || "";
112
											var office = showPro.office || "";
113
											if(orgName!=""){
114
												if(title != "") {
115
													baseInfo = title + "," + orgName;
116
												}else{
117
													if(office!=""){
118
														baseInfo = office  + "," + orgName;	
119
													}else{
120
														baseInfo = orgName;	
121
													}
122
												}
123
											}else{
124
												if(title != "") {
125
													baseInfo = title;
126
												}else{
127
													if(office!=""){
128
														baseInfo = office;	
129
													}else{
130
														baseInfo = "";	
131
													}
132
												}
133
											}
134
											var str="";
135
											str +='<li class="flexCenter"><a href="" class="'+ ifPoint +'" data-id="'+ showPro.id +'">'
136
											str +='<div class="madiaHead useHead" style="background-image:url('+ imgbg +')"></div>'
137
											str +='<div class="madiaInfo" style="margin-top:-4px" >'
138
											str +='<p class="ellipsisSty"><span class="h1Font">'+ showPro.name +'</span><em class="authiconNew '+ authTy +'" title="'+ authTit +'"></em></p>'
139
											str +='<p class="h2Font ellipsisSty">'+ baseInfo +'</p>'
140
											str +='</div></a>';
141
											if(showPro.id==userid){
142
												str +=''
143
											}else{
144
												str +='<div class="goSpan"><span class="attenSpan">关注</span></div>';
145
											}
146
											str +='</li>';
147
											var $str=$(str);
148
											$("#aboutAuthors .lastBtn").before($str);
149
											if(showPro.id!=userid){
150
												ifcollectionAbout(showPro.id,$str.find(".attenSpan"),1);
151
											}
152
										}
153
									}
154
								})
155
							}else{
156
								var str="";
157
								str +='<li class="flexCenter"><a data-id="'+ data.data[i].professorId +'">'
158
								str +='<div class="madiaHead useHead" style="background-image:url('+ imgbg +')"></div>'
159
								str +='<div class="madiaInfo">'
160
								str +='<p class="ellipsisSty"><span class="h1Font">'+ data.data[i].name +'</span></p>'
161
								str +='</div></a>';
162
								if(data.data[i].name==userName){
163
									str +='<div class="goSpan"><span class="ifMe" flag="1">是我本人</span></div>'
164
								}else{
165
									str +='<div class="goSpan"><span class="yaoqing">邀请'
166
									str +='<div class="shareCode clearfix"><div class="floatL qrcodeUser"></div>'
167
									str +='<div class="shareWord floatR"><p>打开微信“扫一扫”,<br/>打开网页后点击屏幕右上角“分享”按钮</p></div>'
168
									str +='</div></span></div>';
169
								}
170
								
171
								str +='</li>';
172
								var $str=$(str);
173
								$("#aboutAuthors .lastBtn").before($str);
174
							}
175
							
176
							if(data.data.length<5){
177
								$("#aboutAuthors li").css("display","block");
178
								$(".lastBtn").hide();
179
							}else{
180
								$("#aboutAuthors li:lt(3)").css("display","block");
181
							}
182
						}
183
						
184
						//邀请
185
						$('.goSpan').on("mouseenter",".yaoqing",function(){
186
							$(this).find('.shareCode').stop(true,false).fadeIn();
187
						}).on("mouseleave",".yaoqing",function(){
188
							$(this).find('.shareCode').stop(true,false).fadeOut();
189
						});
190
						//邀请作者
191
						var Qcu=document.getElementsByClassName("qrcodeUser");
192
						for(var i=0;i<Qcu.length;i++){
193
							var qrcode= new QRCode(Qcu[i], {
194
								width : 100,
195
								height : 100
196
							});
197
							makeCode();
198
						}
199
						function makeCode(){
200
							var hurl = window.location.host;
201
							if(userid) {
202
								var elurl = "http://" + hurl + "/e/I.html?i=" + s16to64(paperId)+"&d="+s16to64(userid)+"&f=1";
203
							} else{
204
								var elurl = "http://" + hurl + "/e/I.html?i=" + s16to64(paperId)+"&f=1";
205
							}
206
							qrcode.makeCode(elurl);
207
						}
208
						
209
						//是我本人
210
						$('.goSpan').on("click",".ifMe",function(){
211
							var oF=$(this).attr("flag");
212
							if(oF==1){
213
								$.MsgBox.Confirm("提示", "确认这是您发表的论文?", daoRuPaper);
214
								$(this).attr("flag","0");
215
							}else{
216
								return;
217
							} 
218
						});
219
						
220

221
					}
222
				}
223
			},
224
			"data": {
225
				"id": stritrm
226
			},
227
			dataType: "json",
228
			'error': function() {
229
				$.MsgBox.Alert('提示', '服务器连接超时!');
230
			}
231
		});
232
	}
233
	function daoRuPaper(){
234
		$.ajax({
235
			"url": "/ajax/ppaper/ass",
236
			"type": "POST",
237
			"data": {
238
				id:paperId,
239
				uid:userid,
240
				author: userName
241
			},
242
			dataType: "json",
243
			"success": function(data) {
244
				if(data.success) {
245
					if(data.data){
246
						$(".ifMe").text("导入成功").css("background","#ccc");
247
					}
248
				}
249
			},
250
			'error': function() {
251
				$.MsgBox.Alert('提示', '服务器连接超时!');
252
			}
253
		});
254
	}
255
	/*处理论文html代码*/
256
	function paperHtml($da) {
257
		$("#paperName").text($da.name); //名字
258
		$("#pageView").text($da.pageViews); //浏览量
259
		$("#paperAbstract").text($da.summary); //摘要内容
260
		if(!$da.cn4periodical){
261
			$da.cn4periodical=""
262
		}
263
		if(!$da.en4periodical){
264
			$da.en4periodical=""
265
		}
266
		if(!$da.cn4periodical && !$da.en4periodical){
267
			$("#paperJournal").parents("li").hide();
268
		}else{
269
			$("#paperJournal").text($da.cn4periodical +" " + $da.en4periodical);
270
		}
271

272
		if(!$da.pubDay){
273
			$("#paperVolume").parents("li").hide();
274
		}else{
275
			$("#paperVolume").text($da.pubDay);
276
		}
277
		if($da.keywords != undefined && $da.keywords.length != 0 ){
278
			var subs = new Array();
279
			if($da.keywords.indexOf(',')){
280
				subs = $da.keywords.split(',');
281
			}else{
282
				subs[0] = $da.keywords;
283
			}
284
			if(subs.length>0){
285
				patentRelatedList(subs)
286
				for (var i = 0; i < subs.length; i++) 
287
				{
288
					$(".tagList").append('<li><p class="h2Font">'+ subs[i] +'</p></li>');
289
				};
290
			}else{
291
				$(".tagList").hide();
292
			}
293
		}		
294
		var weibopic = "http://" + window.location.host + "/images/default-paper.jpg"
295
		var weibotitle = $da.name;
296
		var weibourl = window.location.href;
297
		$("#weibo").attr("href","http://service.weibo.com/share/share.php?appkey=3677230589&title="+encodeURIComponent(weibotitle)+"&url="+encodeURIComponent(weibourl)+"&pic="+encodeURIComponent(weibopic)+"&content=utf-8"+"&ralateUid=6242830109&searchPic=false&style=simple");
298
	}
299
	isAgreeNum()
300
	function isAgreeNum() {
301
		var data = {"id": paperId}
302
		$.ajax({		
303
			url:"/ajax/ppaper/agreeCount",
304
			data:data,
305
			dataType: 'json', //数据格式类型
306
			type: 'get', //http请求类型
307
			timeout: 10000,
308
			async: true,
309
			success: function(data) {
310
				if(data.success){
311
					$("#advertisement img").attr("src","/"+$("#advertisement img").attr("src"));
312
					if(userid && userid != "null" && userid != null) {
313
						isAgree(data.data) //文章点赞
314
					} else {
315
						$(".thumbBtn").html("赞 <span>" + data.data + "</span>");
316
					}
317
				}
318
			},
319
			error: function() {
320
				$.MsgBox.Alert('提示',"服务器链接超时");
321
			}
322
		});
323
	}
324
	/*判断论文是否被赞*/
325
function isAgree(articleAgree) {
326
	var data = {"id": paperId,"uid":userid }
327
	$.ajax({		
328
		url:"/ajax/ppaper/agree",
329
		data:data,
330
		dataType: 'json', //数据格式类型
331
		type: 'get', //http请求类型
332
		timeout: 10000,
333
		async: true,
334
		success: function(data) {
335
			if(data.success){
336
				if(data.data){
337
					$(".thumbBtn").html("已赞 <span>"+articleAgree+"</span>");
338
					$(".thumbBtn").addClass("thumbedBtn").css("cursor","auto");
339
					
340
				}else{
341
					$(".thumbBtn").html("赞 <span>"+articleAgree+"</span>");
342
					$(".thumbBtn").addClass("thunbgo");
343
				}
344
			}
345
		},
346
		error: function() {
347
			$.MsgBox.Alert('提示',"服务器链接超时");
348
		}
349
	});
350
}
351
//论文点击点赞
352
$('.thumbBlock').on("click",".thunbgo",function(){
353
	if (userid && userid != "null" && userid != null) {
354
		addAgree();
355
	}else{
356
		quickLog();
357
		operatTab();
358
		closeLog();
359
	}
360
})
361
/*点赞*/
362
function addAgree() {
363
	console.log(paperId)
364
	var data = {"uid": userid,"id": paperId}
365
	$.ajax({		
366
		url:"/ajax/ppaper/agree",
367
		data:data,
368
		dataType: 'json', //数据格式类型
369
		type: 'POST', //http请求类型
370
		timeout: 10000,
371
		async: true,
372
		success: function(data) {
373
			if(data.success){
374
				var articleAgreeval = $(".thumbBtn span").text();
375
				$(".thumbBtn").html("已赞 <span>"+(parseInt(articleAgreeval)+1)+"</span>");
376
				$(".thumbBtn").addClass("thumbedBtn").css("cursor","auto");
377
				$(".thumbBtn").removeClass("thunbgo");
378
			}
379
		},
380
		error: function() {
381
			$.MsgBox.Alert('提示',"服务器链接超时");
382
		}
383
	});
384
}
385
/*留言模块*/
386
limitObj(".msgCont",200)
387
$("#meSendtt").on("click", function() {
388
	article();
389
})
390
//查看更多留言
391
$("#moreArtical").on("click",function(){
392
	vcreateTime = $(".commentList li").last().attr("data-time");
393
	orderKey = $(".commentList li").last().attr("data-key");
394
	message(5,1);
395
})
396
//删除留言
397
$(".commentList").on("click",".messageDel",function(){
398
	var commenid = $(this).attr("data-id");
399
	articledel(commenid)
400
})
401

402
//发布留言
403
function article() {
404
	$.ajax({
405
		url:"/ajax/leaveWord/paper",
406
		dataType: 'json', //数据格式类型
407
		type: 'POST', //http请求类型
408
		data: {
409
			"paperId": paperId,
410
			"sender": userid,
411
			"content": $(".msgCont").val(),
412
		},
413
		timeout: 10000, //超时设置
414
		success: function(data) {
415
			var $info = data.data || {};
416
			if(data.success && data.data) {
417
				message(5,2);
418
			}
419
			$(".msgCont").val("");
420
			$(".msgconNum").find("span").text(0);
421
		},
422
		error: function() {
423
			$.MsgBox.Alert('提示', '服务器请求失败')
424
		}
425
	});
426
}
427

428
message(5,2);
429
function message(rows,num) {
430
	if(num==1){
431
		var data = {"paperId": paperId,"createTime": vcreateTime,"orderKey": orderKey,"rows": rows}	
432
	}else{
433
		var data = {"paperId": paperId,"rows": rows}	
434
	}
435
	$.ajax({
436
		url: "/ajax/leaveWord/ql/paper",
437
		dataType: 'json', //数据格式类型
438
		type: 'GET', //http请求类型
439
		data: data,
440
		timeout: 10000, //超时设置
441
		success: function(data) {
442
			if(data.success) {
443
				 if(data.data != ""){
444
				 	if(num==2){
445
						$(".commentList").html("");	
446
					}
447
					if(data.data.length > 4){
448
						$("#moreArtical").removeClass("displayNone");
449
					}else{
450
						$("#moreArtical").addClass("displayNone");
451
					}
452
					for(var i = 0; i < data.data.length; i++) {
453
						var itemlist = '<li class="flexCenter" data-time="" data-key="">';
454
							itemlist += '<a href class="userhref"> <div class="madiaHead useHead useHeadMsg"></div></a>';
455
							itemlist += '<div class="madiaInfo">';
456
							itemlist += '<p><a href class="userhref"><span class="h1Font messageName"></span></a><em class="authiconNew" title="科袖认证专家"></em><span class="commenttime"></span></p>';
457
							itemlist += '<p class="h2Font messageContent"></p>';
458
							itemlist += '<div class="operateSpan"><span class="callBack">回复</span><span class="messageDel">删除</span></div>';
459
							itemlist += '</div></li>';
460
							$itemlist = $(itemlist);
461
							$(".commentList").append($itemlist);
462
							var datalist = data.data[i];
463
							$itemlist.find(".messageName").text(datalist.professor.name);
464
							$itemlist.find(".messageContent").text(datalist.content);
465
							var userType = autho(datalist.professor.authType, datalist.professor.orgAuth, datalist.professor.authStatus);
466
								$itemlist.find(".authiconNew").attr("title", userType.title);
467
								$itemlist.find(".authiconNew").addClass(userType.sty);
468
							if(datalist.professor.hasHeadImage==1) {
469
								$itemlist.find(".useHeadMsg").attr("style", "background-image: url(/images/head/" + datalist.professor.id + "_l.jpg);");
470
							}	
471
							if(datalist.professor.id==userid){
472
								$itemlist.find(".messageDel").show();
473
							}
474
							$itemlist.attr("data-time", datalist.createTime);
475
							$itemlist.attr("data-key", datalist.orderKey);
476
							$itemlist.find(".messageDel").attr("data-id", datalist.id);
477
							$itemlist.find(".userhref").attr("href", "userInforShow.html?professorId="+datalist.professor.id);
478
							var createtime = datalist.createTime;
479
							$itemlist.find(".commenttime").text(commenTime(createtime));
480
					}
481
				 }else{
482
				 	if(num==2){
483
						$(".commentList").html("");	
484
					}else{
485
						$("#moreArtical").addClass("displayNone");
486
					}
487
					
488
				 }
489
			}
490
		},
491
		error: function() {
492
			$.MsgBox.Alert('提示', '服务器请求失败')
493
		}
494
	});
495
}
496
	
497
//删除自己的留言
498
function articledel(commenid) {
499
	$.ajax({
500
		url:"/ajax/leaveWord/delete",
501
		dataType: 'json', //数据格式类型
502
		type: 'POST', //http请求类型
503
		data: {
504
			"id": commenid,
505
		},
506
		timeout: 10000, //超时设置
507
		success: function(data) {
508
			if(data.success) {
509
				message(5,2);
510
			}
511
		},
512
		error: function() {
513
			$.MsgBox.Alert('提示', '服务器请求失败')
514
		}
515
	});
516
}	
517

518
	//您可能感兴趣的论文
519
	paperInterestingList()
520
	function paperInterestingList(){
521
		$.ajax({
522
			"url" : "/ajax/ppaper/ralatePapers",
523
			"type" :  "GET" ,
524
			"dataType" : "json",
525
			"data" :{
526
				"paperId":paperId
527
			},
528
			//"async":false,
529
			"traditional": true, //传数组必须加这个
530
			"success" : function(data) {
531
				if(data.success) {
532
					var dataStr=data.data
533
					if(dataStr.length > 0){
534
						$("#interPaper").show();
535
						var itemlist = '';
536
						$("#paperList").html("");
537
						for(var i = 0; i < dataStr.length; i++) {
538
							var moreInf=""
539
							if(!dataStr[i].cn4periodical){
540
								dataStr[i].cn4periodical="";
541
							}
542
							if(!dataStr[i].en4periodical){
543
								dataStr[i].en4periodical="";
544
							}
545
							if(!dataStr[i].pubDay){
546
								dataStr[i].pubDay="";
547
							}
548
							moreInf = dataStr[i].cn4periodical+ " " +dataStr[i].en4periodical+ " " +dataStr[i].pubDay;
549
							var itemlist = '<li>';
550
							itemlist += '<a class="flexCenter" target="_blank" href="/' + pageUrl("pp",dataStr[i]) +'" class="linkhref"><div class="madiaHead paperHead"></div>';
551
							itemlist += '<div class="madiaInfo">';
552
							itemlist += '<p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
553
							itemlist += '<p class="h2Font ellipsisSty">作者:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
554
							itemlist += '<p class="h2Font ellipsisSty">期刊:'+ moreInf +'</p>';
555
							itemlist += '</div></a></li>';
556
							$itemlist = $(itemlist);
557
							$("#paperList").append($itemlist);
558
					}	}
559
				}
560
			},
561
			"error":function(){
562
				$.MsgBox.Alert('提示','链接服务器超时')
563
			}
564
		});
565
	}
566
	//浏览量
567
	function pageViewsVal() {
568
		$.ajax({
569
			"url": "/ajax/ppaper/incPageViews",
570
			"type": "POST",
571
			"dataType": "json",
572
			"data": {
573
				"id": paperId
574
			},
575
			"success": function(data) {
576
				console.log(data);
577
				if(data.success) {}
578
			},
579
			"error": function() {
580
				$.MsgBox.Alert('提示', '链接服务器超时')
581
			}
582
		});
583
	}
584
	
585
	//纠错反馈
586
	$(".correctSubmit").on("click",function(){
587
		var cntCon=$(this).siblings(".correctCon").val();
588
		var cntUser="";
589
		if(userid && userid != null && userid != "null") {
590
			cntUser = userid;
591
		}
592
		if(cntCon.length>500){
593
			$.MsgBox.Alert('提示', '纠错反馈内容不得超过500个字');
594
			return;
595
		}else{
596
			$.ajax({
597
				"url": "/ajax/feedback/error/paper",
598
				"type": "POST",
599
				"dataType": "json",
600
				"async": true,
601
				"data": {
602
					"id": paperId,
603
					"cnt":cntCon,
604
					"user":cntUser
605
				},
606
				"success": function(data) {
607
					if(data.success) {
608
						backSuccessed();
609
					}
610
				},
611
				"error": function() {
612
					$.MsgBox.Alert('提示', '链接服务器超时')
613
				}
614
			});
615
		}
616
	})
617
	function patentRelatedList(array){
618
		$.ajax({
619
			"url":"/ajax/ppatent/assPatents",
620
			"type" :  "GET" ,
621
			"dataType" : "json",
622
			"data" :{
623
				"kws":array
624
			},
625
			"traditional": true, //传数组必须加这个
626
			"success" : function(data) {
627
				if(data.success) {
628
					var dataStr=data.data
629
					if(dataStr.length > 0){
630
						$("#patentrelate").removeClass("displayNone");
631
						for(var i = 0; i < dataStr.length; i++) {
632
							var itemlist ='<li style="min-height:56px;"><a href="/'+pageUrl("pt",dataStr[i])+'"><p class="h2Font ellipsisSty-2" style="line-height:20px;"><em class="circlePre"></em>'+ dataStr[i].name +'</p></a></li>'
633
							$(".recentlyList").append(itemlist);
634
						}
635
					}
636
				}
637
			},
638
			"error":function(){
639
				$.MsgBox.Alert('提示', '链接服务器超时')
640
			}
641
		});
642
	}
643
})

+ 1 - 1
js/patentShow.js

@ -699,7 +699,7 @@ function articledel(commenid) {
699 699
					if(dataStr.length > 0){
700 700
						$("#paperList").show();
701 701
						for(var i = 0; i < dataStr.length; i++) {
702
							var itemlist ='<li style="min-height:56px;"><a href="paperShow.html?paperId='+dataStr[i].id+'"><p class="h2Font ellipsisSty-2" style="line-height:20px;"><em class="circlePre"></em>'+ dataStr[i].name +'</p></a></li>'
702
							var itemlist ='<li style="min-height:56px;"><a href="/'+pageUrl("pp",dataStr[i])+'"><p class="h2Font ellipsisSty-2" style="line-height:20px;"><em class="circlePre"></em>'+ dataStr[i].name +'</p></a></li>'
703 703
							$(".recentlyList").append(itemlist);
704 704
						}
705 705
					}

+ 2 - 2
js/patentShow1.js

@ -6,7 +6,7 @@ $(document).ready(function() {
6 6
		this.flag = GetQueryString("flag");
7 7
	}
8 8
	Patent.prototype.init = function() {
9
		loginStatus();
9
		loginYesOrNo()
10 10
		ifcollectionAbout(patentId,$("#collectBtn"),4);
11 11
		this.patentMess(window.staticPageData);
12 12
		this.ajax({
@ -687,7 +687,7 @@ function articledel(commenid) {
687 687
					if(dataStr.length > 0){
688 688
						$("#paperList").show();
689 689
						for(var i = 0; i < dataStr.length; i++) {
690
							var itemlist ='<li style="min-height:56px;"><a href="/paperShow.html?paperId='+dataStr[i].id+'"><p class="h2Font ellipsisSty-2" style="line-height:20px;"><em class="circlePre"></em>'+ dataStr[i].name +'</p></a></li>'
690
							var itemlist ='<li style="min-height:56px;"><a href="/'+pageUrl("pp",dataStr[i])+'"><p class="h2Font ellipsisSty-2" style="line-height:20px;"><em class="circlePre"></em>'+ dataStr[i].name +'</p></a></li>'
691 691
							$(".recentlyList").append(itemlist);
692 692
						}
693 693
					}

+ 1 - 1
js/searchNew.js

@ -800,7 +800,7 @@ $(function() {
800 800
							moreInf = dataStr[i].cn4periodical+ " " +dataStr[i].en4periodical+ " " +dataStr[i].pubDay;
801 801
							
802 802
							var itemlist = '<li class="flexCenter">';
803
							itemlist += '<a target="_blank" href="paperShow.html?paperId=' + dataStr[i].id +'" class="linkhref"><div class="lefthead paperhead"></div>';
803
							itemlist += '<a target="_blank" href="/' + pageUrl("pp",dataStr[i]) +'" class="linkhref"><div class="lefthead paperhead"></div>';
804 804
							itemlist += '<div class="centercon centercon2">';
805 805
							itemlist += '<p class="h1font ellipsisSty">'+ dataStr[i].name +'</p>';
806 806
							itemlist += '<p class="h2font ellipsisSty">作者:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';

+ 2 - 2
js/userInforShow.js

@ -947,7 +947,7 @@ $(function() {
947 947
							moreInf = dataStr[i].cn4periodical+ " " +dataStr[i].en4periodical+ " " +dataStr[i].pubDay
948 948
							
949 949
							var strAdd = '';
950
							strAdd += '<li><a  target="_blank" href="paperShow.html?paperId='+ dataStr[i].id +'" class="flexCenter urlgo">';
950
							strAdd += '<li><a  target="_blank" href="/'+ pageUrl("pp",dataStr[i]) +'" class="flexCenter urlgo">';
951 951
							strAdd += '<div class="madiaHead paperHead"></div>';
952 952
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
953 953
							strAdd += '<p class="h2Font ellipsisSty">作者:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
@ -1548,7 +1548,7 @@ $(function() {
1548 1548
						var li = document.createElement("li");
1549 1549
						li.className = "mui-table-view-cell";
1550 1550
						var strAdd = '';
1551
							strAdd += '<a  target="_blank" href="paperShow.html?paperId='+ dataStr[i].id +'" class="flexCenter urlgo">';
1551
							strAdd += '<a  target="_blank" href="/'+ pageUrl("pp",dataStr[i]) +'" class="flexCenter urlgo">';
1552 1552
							strAdd += '<div class="madiaHead paperHead"></div>';
1553 1553
							strAdd += '<div class="madiaInfo"><p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
1554 1554
							strAdd += '<p class="h2Font ellipsisSty">作者:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';

+ 1 - 1
paperShow.html

@ -130,7 +130,7 @@
130 130
				</div>
131 131
			</div>
132 132
			<div class="rightconBox floatR">
133
				<div class="conItem advertBox advertItem">
133
				<div class="conItem advertBox advertItem" id="advertisement">
134 134
					<script src="js/adverts/ad_pap.js"></script>
135 135
				</div>
136 136
				<div class="conItem displayNone" id="patentrelate">