|
@ -0,0 +1,700 @@
|
|
1
|
$(document).ready(function() {
|
|
2
|
var userid=$.cookie("userid");
|
|
3
|
var patentId =window.staticPageData.patentId
|
|
4
|
function Patent() {
|
|
5
|
this.init();
|
|
6
|
this.flag = GetQueryString("flag");
|
|
7
|
}
|
|
8
|
Patent.prototype.init = function() {
|
|
9
|
loginStatus();
|
|
10
|
ifcollectionAbout(patentId,$("#collectBtn"),4);
|
|
11
|
this.patentMess(window.staticPageData);
|
|
12
|
this.ajax({
|
|
13
|
url: "/ajax/ppatent/authors",
|
|
14
|
data: {
|
|
15
|
id: patentId
|
|
16
|
},
|
|
17
|
type: "get",
|
|
18
|
Fun: this.patentAuth
|
|
19
|
});
|
|
20
|
this.ajax({
|
|
21
|
url: "/ajax/ppatent/incPageViews",
|
|
22
|
data: {
|
|
23
|
id: patentId
|
|
24
|
},
|
|
25
|
type: "post",
|
|
26
|
Fun: this.pageview
|
|
27
|
});
|
|
28
|
}
|
|
29
|
Patent.prototype.ajax = function(obj) {
|
|
30
|
var $this = this;
|
|
31
|
$.ajax({
|
|
32
|
url: obj.url,
|
|
33
|
data: obj.data,
|
|
34
|
dataType: 'json', //服务器返回json格式数据
|
|
35
|
type: obj.type, //HTTP请求类型
|
|
36
|
timeout: 10000, //超时时间设置为10秒;
|
|
37
|
traditional: true,
|
|
38
|
async:false,
|
|
39
|
success: function(data) {
|
|
40
|
if(data.success) {
|
|
41
|
obj.Fun(data.data, $this);
|
|
42
|
}
|
|
43
|
},
|
|
44
|
error: function() {
|
|
45
|
$this.Fail();
|
|
46
|
}
|
|
47
|
});
|
|
48
|
}
|
|
49
|
Patent.prototype.Fail = function() {
|
|
50
|
$.MsgBox.Alert('提示', "服务器链接超时");
|
|
51
|
}
|
|
52
|
Patent.prototype.keyword = function($key) {
|
|
53
|
for(var i in $key.split(",")) {
|
|
54
|
if(GetQueryString("flag")== 1) {
|
|
55
|
if($key.split(",").length>=5) {
|
|
56
|
$(".oinput").parents(".col-w-12").hide();
|
|
57
|
}
|
|
58
|
$("#paperSList").append("<li><p class='h2Font'>" + $key.split(",")[i] + "</p><div class='closeThis'></div></li>");
|
|
59
|
} else {
|
|
60
|
paperRelatedList($key.split(","));
|
|
61
|
$(".tagList").append("<li><p class='h2Font'>" + $key.split(",")[i] + "</p></li>");
|
|
62
|
}
|
|
63
|
|
|
64
|
}
|
|
65
|
}
|
|
66
|
Patent.prototype.patentMess = function($data) {
|
|
67
|
$(".oinput").parents(".form-item").hide();
|
|
68
|
$(".conItem").hide();
|
|
69
|
if($data.keywords) {
|
|
70
|
$obj.keyword($data.keywords);
|
|
71
|
} else {
|
|
72
|
$(".tagList").hide();
|
|
73
|
}
|
|
74
|
|
|
75
|
if($data.name) {
|
|
76
|
$("#paperName").text($data.name);
|
|
77
|
document.title=$data.name;
|
|
78
|
}
|
|
79
|
$("#pageview").text($data.pageViews);
|
|
80
|
if($data.reqCode) {
|
|
81
|
$(".showCon").eq(0).text($data.reqCode);
|
|
82
|
} else {
|
|
83
|
$(".showCon").eq(0).parents("li").hide();
|
|
84
|
}
|
|
85
|
if($data.code) {
|
|
86
|
$(".showCon").eq(1).text($data.code);
|
|
87
|
} else {
|
|
88
|
$(".showCon").eq(1).parents("li").hide();
|
|
89
|
}
|
|
90
|
$(".showCon").eq(2).text(TimeTr($data.reqDay));
|
|
91
|
$(".showCon").eq(3).text(TimeTr($data.pubDay));
|
|
92
|
$(".showCon").eq(4).text($data.reqPerson);
|
|
93
|
if($data.summary) {
|
|
94
|
$(".showCon").eq(5).text($data.summary);
|
|
95
|
}
|
|
96
|
var weibotitle = $data.name;
|
|
97
|
var weibourl = window.location.href;
|
|
98
|
var weibopic = "http://" + window.location.host + "/images/default-patent.jpg";
|
|
99
|
$("#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");
|
|
100
|
this.bindEvent($obj);
|
|
101
|
}
|
|
102
|
Patent.prototype.patentAuth = function($data, $obj) {
|
|
103
|
for(var i in $data) {
|
|
104
|
if($data[i].professorId.substring(0, 1) == "#") {
|
|
105
|
var otr = '<li class="flexCenter"><a data-id="'+ $data[i].professorId +'">' +
|
|
106
|
'<div class="madiaHead useHead" id="userimg"></div>' +
|
|
107
|
'<div class="madiaInfo">' +
|
|
108
|
'<p class="ellipsisSty">' +
|
|
109
|
'<span class="h1Font" id="name">' + $data[i].name + '</span>' +
|
|
110
|
'</p>' +
|
|
111
|
'</div></a>'
|
|
112
|
if($data[i].name==$.cookie("userName")){
|
|
113
|
otr += '<div class="goSpan"><span class="ifMe" nflag="1">是我本人</span></div>'
|
|
114
|
}else{
|
|
115
|
otr += '<div class="goSpan"><span class="yaoqing">邀请'+
|
|
116
|
'<div class="shareCode clearfix"><div class="floatL qrcodeUser"></div>'+
|
|
117
|
'<div class="shareWord floatR"><p>打开微信“扫一扫”,<br/>打开网页后点击屏幕右上角“分享”按钮</p></div>'+
|
|
118
|
'</div></span></div>'
|
|
119
|
}
|
|
120
|
otr += '</li>'
|
|
121
|
$("#faM .lastBtn").before(otr);
|
|
122
|
} else {
|
|
123
|
$obj.ajax({
|
|
124
|
url: "/ajax/professor/editBaseInfo/" + $data[i].professorId,
|
|
125
|
data: {},
|
|
126
|
type: "get",
|
|
127
|
Fun: $obj.profess
|
|
128
|
});
|
|
129
|
}
|
|
130
|
if($data.length<5){
|
|
131
|
$("#faM li").css("display","block");
|
|
132
|
$(".lastBtn").hide();
|
|
133
|
}else{
|
|
134
|
$(".lastBtn").find("span").text($data.length);
|
|
135
|
$("#faM li:lt(3)").css("display","block");
|
|
136
|
}
|
|
137
|
if(GetQueryString("flag") == 1){
|
|
138
|
$("#faM li").css("display","block");
|
|
139
|
$("#faM li .goSpan").hide();
|
|
140
|
$(".lastBtn").hide();
|
|
141
|
}
|
|
142
|
|
|
143
|
}
|
|
144
|
//邀请
|
|
145
|
$(".goSpan").on("mouseenter",".yaoqing",function(){
|
|
146
|
$(this).find('.shareCode').stop(true,false).fadeIn();
|
|
147
|
}).on("mouseleave",".yaoqing",function(){
|
|
148
|
$(this).find('.shareCode').stop(true,false).fadeOut();
|
|
149
|
});
|
|
150
|
//邀请作者
|
|
151
|
var Qcu=document.getElementsByClassName("qrcodeUser");
|
|
152
|
for(var i=0;i<Qcu.length;i++){
|
|
153
|
var qrcode= new QRCode(Qcu[i], {
|
|
154
|
width : 100,
|
|
155
|
height : 100
|
|
156
|
});
|
|
157
|
makeCode();
|
|
158
|
}
|
|
159
|
function makeCode(){
|
|
160
|
var hurl = window.location.host;
|
|
161
|
if(userid) {
|
|
162
|
var elurl = "http://" + hurl + "/e/I.html?i=" + s16to64(patentId)+"&d="+s16to64(userid);
|
|
163
|
} else{
|
|
164
|
var elurl = "http://" + hurl + "/e/I.html?i=" + s16to64(patentId);
|
|
165
|
}
|
|
166
|
qrcode.makeCode(elurl);
|
|
167
|
}
|
|
168
|
//是我本人
|
|
169
|
$(".goSpan").on("click",".ifMe",function(){
|
|
170
|
var oF=$(this).attr("nflag");
|
|
171
|
if(oF==1){
|
|
172
|
$.MsgBox.Confirm("提示", "确认这是您发表的专利?", daoRuPatent);
|
|
173
|
$(this).attr("nflag","0");
|
|
174
|
}else{
|
|
175
|
return;
|
|
176
|
}
|
|
177
|
|
|
178
|
});
|
|
179
|
function daoRuPatent(){
|
|
180
|
$.ajax({
|
|
181
|
"url": "/ajax/ppatent/ass",
|
|
182
|
"type": "POST",
|
|
183
|
"data": {
|
|
184
|
id:patentId,
|
|
185
|
uid:$.cookie("userid"),
|
|
186
|
author:$.cookie("userName")
|
|
187
|
},
|
|
188
|
dataType: "json",
|
|
189
|
"success": function(data) {
|
|
190
|
if(data.success) {
|
|
191
|
if(data.data){
|
|
192
|
$(".ifMe").text("导入成功").css("background","#ccc");
|
|
193
|
}
|
|
194
|
}
|
|
195
|
},
|
|
196
|
'error': function() {
|
|
197
|
$.MsgBox.Alert('提示', '服务器连接超时!');
|
|
198
|
}
|
|
199
|
});
|
|
200
|
}
|
|
201
|
}
|
|
202
|
Patent.prototype.profess = function($data, $obj) {
|
|
203
|
var img;
|
|
204
|
var oClass = autho($data.authType, $data.orgAuth, $data.authStatus);
|
|
205
|
var csAuto, oId;
|
|
206
|
var arr = [];
|
|
207
|
arr[0] = $data.title || $data.office;
|
|
208
|
arr[1] = $data.orgName || "";
|
|
209
|
if(arr[0]) {
|
|
210
|
if(arr[1]) {
|
|
211
|
arr[2] = arr[0] + "," + arr[1]
|
|
212
|
} else {
|
|
213
|
arr[2] = arr[0];
|
|
214
|
}
|
|
215
|
} else {
|
|
216
|
arr[2] = "";
|
|
217
|
}
|
|
218
|
if($data.hasHeadImage) {
|
|
219
|
img = "/images/head/" + $data.id + "_l.jpg";
|
|
220
|
} else {
|
|
221
|
img = "../images/default-photo.jpg"
|
|
222
|
}
|
|
223
|
oId = $data.id;
|
|
224
|
var otr = '<li class="flexCenter"><a href="" data-id="' + oId + '">' +
|
|
225
|
'<div class="madiaHead useHead" id="userimg" style="background-image:url(' + img + ')"></div>' +
|
|
226
|
'<div class="madiaInfo" style="margin-top:-4px">' +
|
|
227
|
'<p class="ellipsisSty">' +
|
|
228
|
'<span class="h1Font" id="name">' + $data.name + '</span><em class="authiconNew ' + oClass.sty + '" title="' + oClass.title + '"></em>' +
|
|
229
|
'</p>' +
|
|
230
|
'<p class="h2Font ellipsisSty">' + arr[2] + '<p>' +
|
|
231
|
'</div></a>'
|
|
232
|
if(oId==userid){
|
|
233
|
otr += ''
|
|
234
|
}else{
|
|
235
|
otr += '<div class="goSpan"><span class="attenSpan">关注</span></div>'
|
|
236
|
}
|
|
237
|
otr += '</li>'
|
|
238
|
var $otr=$(otr);
|
|
239
|
$("#faM .lastBtn").before($otr);
|
|
240
|
ifcollectionAbout(oId,$otr.find(".attenSpan"),1);
|
|
241
|
}
|
|
242
|
Patent.prototype.bindEvent = function($obj) {
|
|
243
|
$("#faM").on("click", "li>a", function() {
|
|
244
|
if(GetQueryString("flag") !=1){
|
|
245
|
var oDataId = $(this).attr("data-id");
|
|
246
|
if(oDataId.substring(0,1)!="#"){
|
|
247
|
$(this).attr("href","/userInforShow.html?professorId="+oDataId);
|
|
248
|
}else{
|
|
249
|
$(this).attr("href","javascript:void(0)");
|
|
250
|
}
|
|
251
|
}else{
|
|
252
|
$(this).attr("href","javascript:void(0)");
|
|
253
|
}
|
|
254
|
})
|
|
255
|
$('#attention em').click(function() {
|
|
256
|
if(userid && userid != "null" && userid != null) {
|
|
257
|
if($(this).is('.icon-collected')) {
|
|
258
|
cancelCollectionAbout(patentId,$(this), 4);
|
|
259
|
} else {
|
|
260
|
collectionAbout(patentId,$(this), 4);
|
|
261
|
}
|
|
262
|
} else {
|
|
263
|
quickLog();
|
|
264
|
operatTab();
|
|
265
|
closeLog();
|
|
266
|
}
|
|
267
|
})
|
|
268
|
$("body").on("click", ".closeThis", function() {
|
|
269
|
if($(this).parent().length < 5) {
|
|
270
|
$(this).parents(".keyResult").siblings("div").show();
|
|
271
|
}
|
|
272
|
$(this).parent().remove();
|
|
273
|
|
|
274
|
});
|
|
275
|
$("#release").on("click", function() {
|
|
276
|
$.MsgBox.Confirm("提示", "确认发布该专利?", $obj.pubPatent);
|
|
277
|
});
|
|
278
|
$("#delete").on("click", function() {
|
|
279
|
$.MsgBox.Confirm("提示", "确认删除该专利?", $obj.delePatent);
|
|
280
|
});
|
|
281
|
$(".lastBtn").on("click", function() {
|
|
282
|
$("#faM li").css("display","block");
|
|
283
|
$(this).hide();
|
|
284
|
});
|
|
285
|
$(".tagList").on("click","li",function() {
|
|
286
|
location.href = "/searchNew.html?searchContent=" + $(this).text() + "&tagflag=5";
|
|
287
|
});
|
|
288
|
//点击关注按钮
|
|
289
|
$("#faM").on('click',"span.attenSpan", function() {
|
|
290
|
var pId=$(this).parent().siblings("a").attr("data-id");
|
|
291
|
if(userid && userid != null && userid != "null") {
|
|
292
|
if($(this).is('.attenedSpan')){
|
|
293
|
cancelCollectionAbout(pId, $(this),1)
|
|
294
|
} else {
|
|
295
|
collectionAbout(pId, $(this),1);
|
|
296
|
}
|
|
297
|
}else{
|
|
298
|
quickLog();
|
|
299
|
operatTab();
|
|
300
|
closeLog();
|
|
301
|
}
|
|
302
|
});
|
|
303
|
|
|
304
|
|
|
305
|
}
|
|
306
|
Patent.prototype.pageview = function() {};
|
|
307
|
Patent.prototype.captiureSubInd = function(subIndu) {
|
|
308
|
var industrys = $("#" + subIndu + "").find("li");
|
|
309
|
var industryAll = "";
|
|
310
|
if(industrys.size() > 0) {
|
|
311
|
for(var i = 0; i < industrys.size(); i++) {
|
|
312
|
industryAll += industrys[i].innerText;
|
|
313
|
|
|
314
|
industryAll += ',';
|
|
315
|
};
|
|
316
|
industryAll = industryAll.substring(0, industryAll.length - 1);
|
|
317
|
}
|
|
318
|
return industryAll;
|
|
319
|
}
|
|
320
|
Patent.prototype.pubPatent = function() {
|
|
321
|
var $key = oPent.captiureSubInd("paperSList");
|
|
322
|
oPent.ajax({
|
|
323
|
url: "/ajax/ppatent/kw",
|
|
324
|
data: {
|
|
325
|
id: patentId,
|
|
326
|
keywords: $key
|
|
327
|
},
|
|
328
|
type: "post",
|
|
329
|
Fun: oPent.pubsucess
|
|
330
|
});
|
|
331
|
}
|
|
332
|
Patent.prototype.pubsucess = function() {
|
|
333
|
$.MsgBox.Alert('提示', '专利发布成功!');
|
|
334
|
$("#mb_msgicon").css("background", 'url("images/sign_icon_chenggong_nor.png") 0% 0% / contain');
|
|
335
|
location.href = "/patentList.html"
|
|
336
|
}
|
|
337
|
Patent.prototype.delePatent = function() {
|
|
338
|
oPent.ajax({
|
|
339
|
url: "/ajax/ppatent/cAss",
|
|
340
|
data: {
|
|
341
|
id: patentId,
|
|
342
|
uid:$.cookie("userid")
|
|
343
|
},
|
|
344
|
type: "post",
|
|
345
|
Fun: oPent.delsucess
|
|
346
|
});
|
|
347
|
}
|
|
348
|
Patent.prototype.delsucess = function() {
|
|
349
|
location.href = "/patentList.html"
|
|
350
|
}
|
|
351
|
var oPent = new Patent();
|
|
352
|
|
|
353
|
//纠错反馈
|
|
354
|
$(".footer_tools").hide();
|
|
355
|
$(".correctSubmit").on("click",function(){
|
|
356
|
var cntCon=$(this).siblings(".correctCon").val();
|
|
357
|
var cntUser="";
|
|
358
|
if(userid && userid != null && userid != "null") {
|
|
359
|
cntUser = userid;
|
|
360
|
}
|
|
361
|
if(cntCon.length>500){
|
|
362
|
$.MsgBox.Alert('提示', '纠错反馈内容不得超过500个字');
|
|
363
|
return;
|
|
364
|
}else{
|
|
365
|
$.ajax({
|
|
366
|
"url": "/ajax/feedback/error/patent",
|
|
367
|
"type": "POST",
|
|
368
|
"dataType": "json",
|
|
369
|
"async": true,
|
|
370
|
"data": {
|
|
371
|
"id":patentId,
|
|
372
|
"cnt":cntCon,
|
|
373
|
"user":cntUser
|
|
374
|
},
|
|
375
|
"success": function(data) {
|
|
376
|
if(data.success) {
|
|
377
|
console.log(data);
|
|
378
|
backSuccessed();
|
|
379
|
}
|
|
380
|
},
|
|
381
|
"error": function() {
|
|
382
|
$.MsgBox.Alert('提示', '链接服务器超时')
|
|
383
|
}
|
|
384
|
});
|
|
385
|
}
|
|
386
|
})
|
|
387
|
|
|
388
|
if( GetQueryString("flag")==1){
|
|
389
|
$(".feedBack").click(function(){
|
|
390
|
$("#feedbackBox").fadeToggle();
|
|
391
|
})
|
|
392
|
$(".closeFeed").click(function(){
|
|
393
|
$("#feedbackBox").fadeOut();
|
|
394
|
})
|
|
395
|
|
|
396
|
|
|
397
|
}else{
|
|
398
|
var patentId=patentId;
|
|
399
|
|
|
400
|
$(".footer_tools").show();
|
|
401
|
$("#messagego").show();
|
|
402
|
$(".thumbBlock").show();
|
|
403
|
isAgreeNum()
|
|
404
|
function isAgreeNum() {
|
|
405
|
var data = {"id": patentId}
|
|
406
|
$.ajax({
|
|
407
|
url:"/ajax/ppatent/agreeCount",
|
|
408
|
data:data,
|
|
409
|
dataType: 'json', //数据格式类型
|
|
410
|
type: 'get', //http请求类型
|
|
411
|
timeout: 10000,
|
|
412
|
async: true,
|
|
413
|
success: function(data) {
|
|
414
|
if(data.success){
|
|
415
|
if(userid && userid != "null" && userid != null) {
|
|
416
|
isAgree(data.data) //文章点赞
|
|
417
|
} else {
|
|
418
|
$(".thumbBtn").html("赞 <span>" + data.data + "</span>");
|
|
419
|
}
|
|
420
|
}
|
|
421
|
},
|
|
422
|
error: function() {
|
|
423
|
$.MsgBox.Alert('提示',"服务器链接超时");
|
|
424
|
}
|
|
425
|
});
|
|
426
|
}
|
|
427
|
/*判断论文是否被赞*/
|
|
428
|
function isAgree(articleAgree) {
|
|
429
|
var data = {"id": patentId,"uid":userid }
|
|
430
|
$.ajax({
|
|
431
|
url:"/ajax/ppatent/agree",
|
|
432
|
data:data,
|
|
433
|
dataType: 'json', //数据格式类型
|
|
434
|
type: 'get', //http请求类型
|
|
435
|
timeout: 10000,
|
|
436
|
async: true,
|
|
437
|
success: function(data) {
|
|
438
|
if(data.success){
|
|
439
|
if(data.data){
|
|
440
|
$(".thumbBtn").html("已赞 <span>"+articleAgree+"</span>");
|
|
441
|
$(".thumbBtn").addClass("thumbedBtn").css("cursor","auto");
|
|
442
|
|
|
443
|
}else{
|
|
444
|
$(".thumbBtn").html("赞 <span>"+articleAgree+"</span>");
|
|
445
|
$(".thumbBtn").addClass("thunbgo");
|
|
446
|
}
|
|
447
|
}
|
|
448
|
},
|
|
449
|
error: function() {
|
|
450
|
$.MsgBox.Alert('提示',"服务器链接超时");
|
|
451
|
}
|
|
452
|
});
|
|
453
|
}
|
|
454
|
//论文点击点赞
|
|
455
|
$('.thumbBlock').on("click",".thunbgo",function(){
|
|
456
|
if (userid && userid != "null" && userid != null) {
|
|
457
|
addAgree();
|
|
458
|
}else{
|
|
459
|
quickLog();
|
|
460
|
operatTab();
|
|
461
|
closeLog();
|
|
462
|
}
|
|
463
|
})
|
|
464
|
/*点赞*/
|
|
465
|
function addAgree() {
|
|
466
|
|
|
467
|
var data = {"uid": userid,"id": patentId}
|
|
468
|
$.ajax({
|
|
469
|
url:"/ajax/ppatent/agree",
|
|
470
|
data:data,
|
|
471
|
dataType: 'json', //数据格式类型
|
|
472
|
type: 'POST', //http请求类型
|
|
473
|
timeout: 10000,
|
|
474
|
async: true,
|
|
475
|
success: function(data) {
|
|
476
|
if(data.success){
|
|
477
|
var articleAgreeval = $(".thumbBtn span").text();
|
|
478
|
$(".thumbBtn").html("已赞 <span>"+(parseInt(articleAgreeval)+1)+"</span>");
|
|
479
|
$(".thumbBtn").addClass("thumbedBtn").css("cursor","auto");
|
|
480
|
$(".thumbBtn").removeClass("thunbgo");
|
|
481
|
}
|
|
482
|
},
|
|
483
|
error: function() {
|
|
484
|
$.MsgBox.Alert('提示',"服务器链接超时");
|
|
485
|
}
|
|
486
|
});
|
|
487
|
}
|
|
488
|
if(userid && userid != "null" && userid != null){
|
|
489
|
$(".ifLoginOn").removeClass("displayNone");
|
|
490
|
}else{
|
|
491
|
$(".ifLoginUn").removeClass("displayNone");
|
|
492
|
$(".ifLoginUn").on('click',".loginGo", function() {
|
|
493
|
quickLog();
|
|
494
|
operatTab();
|
|
495
|
closeLog();
|
|
496
|
})
|
|
497
|
}
|
|
498
|
/*留言模块*/
|
|
499
|
limitObj(".msgCont",200)
|
|
500
|
$("#meSendtt").on("click", function() {
|
|
501
|
article();
|
|
502
|
})
|
|
503
|
//查看更多留言
|
|
504
|
$("#moreArtical").on("click",function(){
|
|
505
|
vcreateTime = $(".commentList li").last().attr("data-time");
|
|
506
|
orderKey = $(".commentList li").last().attr("data-key");
|
|
507
|
message(5,1);
|
|
508
|
})
|
|
509
|
//删除留言
|
|
510
|
$(".commentList").on("click",".messageDel",function(){
|
|
511
|
var commenid = $(this).attr("data-id");
|
|
512
|
articledel(commenid)
|
|
513
|
})
|
|
514
|
|
|
515
|
//发布留言
|
|
516
|
function article() {
|
|
517
|
$.ajax({
|
|
518
|
url:"/ajax/leaveWord/patent",
|
|
519
|
dataType: 'json', //数据格式类型
|
|
520
|
type: 'POST', //http请求类型
|
|
521
|
data: {
|
|
522
|
"patentId": patentId,
|
|
523
|
"sender": userid,
|
|
524
|
"content": $(".msgCont").val(),
|
|
525
|
},
|
|
526
|
timeout: 10000, //超时设置
|
|
527
|
success: function(data) {
|
|
528
|
var $info = data.data || {};
|
|
529
|
if(data.success && data.data) {
|
|
530
|
message(5,2);
|
|
531
|
}
|
|
532
|
$(".msgCont").val("");
|
|
533
|
$(".msgconNum").find("span").text(0);
|
|
534
|
},
|
|
535
|
error: function() {
|
|
536
|
$.MsgBox.Alert('提示', '服务器请求失败')
|
|
537
|
}
|
|
538
|
});
|
|
539
|
}
|
|
540
|
|
|
541
|
message(5,2);
|
|
542
|
function message(rows,num) {
|
|
543
|
if(num==1){
|
|
544
|
var data = {"patentId": patentId,"createTime": vcreateTime,"orderKey": orderKey,"rows": rows}
|
|
545
|
}else{
|
|
546
|
var data = {"patentId": patentId,"rows": rows}
|
|
547
|
}
|
|
548
|
$.ajax({
|
|
549
|
url: "/ajax/leaveWord/ql/patent",
|
|
550
|
dataType: 'json', //数据格式类型
|
|
551
|
type: 'GET', //http请求类型
|
|
552
|
data: data,
|
|
553
|
timeout: 10000, //超时设置
|
|
554
|
success: function(data) {
|
|
555
|
if(data.success) {
|
|
556
|
if(data.data != ""){
|
|
557
|
if(num==2){
|
|
558
|
$(".commentList").html("");
|
|
559
|
}
|
|
560
|
if(data.data.length > 4){
|
|
561
|
$("#moreArtical").removeClass("displayNone");
|
|
562
|
}else{
|
|
563
|
$("#moreArtical").addClass("displayNone");
|
|
564
|
}
|
|
565
|
for(var i = 0; i < data.data.length; i++) {
|
|
566
|
var itemlist = '<li class="flexCenter" data-time="" data-key="">';
|
|
567
|
itemlist += '<a href class="userhref"> <div class="madiaHead useHead useHeadMsg"></div></a>';
|
|
568
|
itemlist += '<div class="madiaInfo">';
|
|
569
|
itemlist += '<p><a href class="userhref"><span class="h1Font messageName">张某某</span></a><em class="authiconNew" title="科袖认证专家"></em><span class="commenttime">9月30号 12:00</span></p>';
|
|
570
|
itemlist += '<p class="h2Font messageContent">sdfsdfs</p>';
|
|
571
|
itemlist += '<div class="operateSpan"><span class="callBack">回复</span><span class="messageDel">删除</span></div>';
|
|
572
|
itemlist += '</div></li>';
|
|
573
|
$itemlist = $(itemlist);
|
|
574
|
$(".commentList").append($itemlist);
|
|
575
|
var datalist = data.data[i];
|
|
576
|
$itemlist.find(".messageName").text(datalist.professor.name);
|
|
577
|
$itemlist.find(".messageContent").text(datalist.content);
|
|
578
|
var userType = autho(datalist.professor.authType, datalist.professor.orgAuth, datalist.professor.authStatus);
|
|
579
|
$itemlist.find(".authiconNew").attr("title", userType.title);
|
|
580
|
$itemlist.find(".authiconNew").addClass(userType.sty);
|
|
581
|
if(datalist.professor.hasHeadImage==1) {
|
|
582
|
$itemlist.find(".useHeadMsg").attr("style", "background-image: url(/images/head/" + datalist.professor.id + "_l.jpg);");
|
|
583
|
}
|
|
584
|
if(datalist.professor.id==userid){
|
|
585
|
$itemlist.find(".messageDel").show();
|
|
586
|
}
|
|
587
|
$itemlist.attr("data-time", datalist.createTime);
|
|
588
|
$itemlist.attr("data-key", datalist.orderKey);
|
|
589
|
$itemlist.find(".messageDel").attr("data-id", datalist.id);
|
|
590
|
$itemlist.find(".userhref").attr("href", "/userInforShow.html?professorId="+datalist.professor.id);
|
|
591
|
var createtime = datalist.createTime;
|
|
592
|
$itemlist.find(".commenttime").text(commenTime(createtime));
|
|
593
|
}
|
|
594
|
}else{
|
|
595
|
if(num==2){
|
|
596
|
$(".commentList").html("");
|
|
597
|
}else{
|
|
598
|
$("#moreArtical").addClass("displayNone");
|
|
599
|
}
|
|
600
|
|
|
601
|
}
|
|
602
|
}
|
|
603
|
},
|
|
604
|
error: function() {
|
|
605
|
$.MsgBox.Alert('提示', '服务器请求失败')
|
|
606
|
}
|
|
607
|
});
|
|
608
|
}
|
|
609
|
|
|
610
|
//删除自己的留言
|
|
611
|
function articledel(commenid) {
|
|
612
|
$.ajax({
|
|
613
|
url:"/ajax/leaveWord/delete",
|
|
614
|
dataType: 'json', //数据格式类型
|
|
615
|
type: 'POST', //http请求类型
|
|
616
|
data: {
|
|
617
|
"id": commenid,
|
|
618
|
},
|
|
619
|
timeout: 10000, //超时设置
|
|
620
|
success: function(data) {
|
|
621
|
if(data.success) {
|
|
622
|
message(5,2);
|
|
623
|
}
|
|
624
|
},
|
|
625
|
error: function() {
|
|
626
|
$.MsgBox.Alert('提示', '服务器请求失败')
|
|
627
|
}
|
|
628
|
});
|
|
629
|
}
|
|
630
|
|
|
631
|
//您可能感兴趣的论文
|
|
632
|
paperInterestingList()
|
|
633
|
function paperInterestingList(){
|
|
634
|
$.ajax({
|
|
635
|
"url" : "/ajax/ppatent/ralatePatents",
|
|
636
|
"type" : "GET" ,
|
|
637
|
"dataType" : "json",
|
|
638
|
"data" :{
|
|
639
|
"patentId":patentId
|
|
640
|
},
|
|
641
|
//"async":false,
|
|
642
|
"traditional": true, //传数组必须加这个
|
|
643
|
"success" : function(data) {
|
|
644
|
if(data.success) {
|
|
645
|
console.log(data);
|
|
646
|
var dataStr=data.data
|
|
647
|
if(dataStr.length > 0){
|
|
648
|
$("#interPatent").show();
|
|
649
|
var itemlist = '';
|
|
650
|
$("#patentList").html("");
|
|
651
|
for(var i = 0; i < dataStr.length; i++) {
|
|
652
|
var itemlist = '<li>';
|
|
653
|
itemlist += '<a class="flexCenter" target="_blank" href="/' + pageUrl("pt",dataStr[i]) +'"><div class="madiaHead patentHead"></div>';
|
|
654
|
itemlist += '<div class="madiaInfo">';
|
|
655
|
itemlist += '<p class="h1Font ellipsisSty">'+ dataStr[i].name +'</p>';
|
|
656
|
itemlist += '<p class="h2Font ellipsisSty">发明人:'+ dataStr[i].authors.substring(0, dataStr[i].authors.length - 1) +'</p>';
|
|
657
|
itemlist += '<p class="h2Font ellipsisSty">申请人:'+ dataStr[i].reqPerson +'</p>';
|
|
658
|
itemlist += '</div></a></li>';
|
|
659
|
$itemlist = $(itemlist);
|
|
660
|
$("#patentList").append($itemlist);
|
|
661
|
}
|
|
662
|
}
|
|
663
|
}
|
|
664
|
},
|
|
665
|
"error":function(){
|
|
666
|
$.MsgBox.Alert('提示','链接服务器超时')
|
|
667
|
}
|
|
668
|
});
|
|
669
|
}
|
|
670
|
}
|
|
671
|
//根据关键词查询查找相关论文
|
|
672
|
function paperRelatedList(array){
|
|
673
|
$.ajax({
|
|
674
|
"url" : "/ajax/ppaper/assPapers",
|
|
675
|
"type" : "GET" ,
|
|
676
|
"dataType" : "json",
|
|
677
|
"data" :{
|
|
678
|
"kws":array
|
|
679
|
},
|
|
680
|
//"async":false,
|
|
681
|
"traditional": true, //传数组必须加这个
|
|
682
|
"success" : function(data) {
|
|
683
|
if(data.success) {
|
|
684
|
console.log(data);
|
|
685
|
var dataStr=data.data
|
|
686
|
if(dataStr.length > 0){
|
|
687
|
$("#paperList").show();
|
|
688
|
for(var i = 0; i < dataStr.length; i++) {
|
|
689
|
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
|
$(".recentlyList").append(itemlist);
|
|
691
|
}
|
|
692
|
}
|
|
693
|
}
|
|
694
|
},
|
|
695
|
"error":function(){
|
|
696
|
$.MsgBox.Alert('提示', '链接服务器超时')
|
|
697
|
}
|
|
698
|
});
|
|
699
|
}
|
|
700
|
})
|