Browse Source

专利及论文导入及邀请

jack 7 years ago
parent
commit
6364815b8a
6 changed files with 532 additions and 132 deletions
  1. 16 2
      app/html/paperShow.html
  2. 13 0
      app/html/patentShow.html
  3. 1 0
      app/js/login.js
  4. 292 113
      app/js/paperShow.js
  5. 176 6
      app/js/patentShow.js
  6. 34 11
      app/js/searchListNew2.js

+ 16 - 2
app/html/paperShow.html

12
		<style>
12
		<style>
13
			html,body{height: 100%;margin:0;padding:0px;overflow: hidden;background: #FFFFFF;}
13
			html,body{height: 100%;margin:0;padding:0px;overflow: hidden;background: #FFFFFF;}
14
			.mui-content{height:100%;overflow: auto;background: #FFFFFF;}
14
			.mui-content{height:100%;overflow: auto;background: #FFFFFF;}
15
			.invite{
16
   					margin-top: -13px;
17
    				border-radius: 4px;
18
				    display: inline-block;
19
				    line-height: normal;
20
				    position: absolute;
21
				    top: 50%;
22
				    right: 15px;
23
				    padding: 6px 8px;
24
				    background-color:#ff9900;
25
				    color: #fff;
26
				    font-size: 12px;
27
				}
15
		</style>
28
		</style>
16
	</head>
29
	</head>
17
30
64
				<div class="madiaBlock">
77
				<div class="madiaBlock">
65
					<div class="madiaTit">作者</div>
78
					<div class="madiaTit">作者</div>
66
					<ul class="mui-table-view" id="aboutAuthors">
79
					<ul class="mui-table-view" id="aboutAuthors">
67
				        <!--<li class="mui-table-view-cell">
80
				       <!-- <li class="mui-table-view-cell">
68
				            <div class="flexCenter mui-clearfix">
81
				            <div class="flexCenter mui-clearfix">
69
				                <div class="madiaHead useHead"></div>
82
				                <div class="madiaHead useHead"></div>
70
								<div class="madiaInfo">
83
								<div class="madiaInfo">
71
									<p><span class="h1Font">张某某</span><em class="authicon authicon-pro" title="科袖认证专家"></em></p>
84
									<p><span class="h1Font">张某某</span><em class="authicon authicon-pro" title="科袖认证专家"></em></p>
72
									<p class="mui-ellipsis h2Font">职称/职位,所在机构</p>
85
									<p class="mui-ellipsis h2Font">职称/职位,所在机构</p>
73
								</div>
86
								</div>
74
				            </div>
87
				            </div>
88
				       
75
				        </li>-->
89
				        </li>-->
76
				        
90
				        
77
				    </ul>
91
				    </ul>

+ 13 - 0
app/html/patentShow.html

12
		<style>
12
		<style>
13
			html,body{height: 100%;margin:0;padding:0px;overflow: hidden;background: #FFFFFF;}
13
			html,body{height: 100%;margin:0;padding:0px;overflow: hidden;background: #FFFFFF;}
14
			.mui-content{height:100%;overflow: auto;background: #FFFFFF;}
14
			.mui-content{height:100%;overflow: auto;background: #FFFFFF;}
15
			.invite{
16
   					margin-top: -13px;
17
    				border-radius: 4px;
18
				    display: inline-block;
19
				    line-height: normal;
20
				    position: absolute;
21
				    top: 50%;
22
				    right: 15px;
23
				    padding: 6px 8px;
24
				    background-color:#ff9900;
25
				    color: #fff;
26
				    font-size: 12px;
27
				}
15
		</style>
28
		</style>
16
	</head>
29
	</head>
17
30

+ 1 - 0
app/js/login.js

111
					if(data.data != "null" && data.data != null) {
111
					if(data.data != "null" && data.data != null) {
112
						var userId = data.data.id;
112
						var userId = data.data.id;
113
						plus.storage.setItem('userid', userId);
113
						plus.storage.setItem('userid', userId);
114
						plus.storage.setItem('name', data.data.name);
114
						plus.nativeUI.toast("登录成功", toastStyle);
115
						plus.nativeUI.toast("登录成功", toastStyle);
115
						var article = plus.webview.currentWebview();
116
						var article = plus.webview.currentWebview();
116
						if(article.flag==1){
117
						if(article.flag==1){

+ 292 - 113
app/js/paperShow.js

1
var ocollectBtn = document.getElementById("collectBtn"); //收藏按钮
1
var ocollectBtn = document.getElementById("collectBtn"); //收藏按钮
2

3
var paperId;
2
var paperId;
4
mui.plusReady(function() {
3
mui.plusReady(function() {
5
	var userid = plus.storage.getItem('userid');
4
	var userid = plus.storage.getItem('userid');
5
	console.log(userid)
6
	var self = plus.webview.currentWebview();
6
	var self = plus.webview.currentWebview();
7
	var userName = plus.storage.getItem('name');
7
	paperId = self.paperId;
8
	paperId = self.paperId;
8
	//paperId="FF6EFFA4D7474CC7B808D9BC08E88E79";
9
	//paperId="FF6EFFA4D7474CC7B808D9BC08E88E79";
9
	getRecourceMe();/*获取资源信息*/
10
	getRecourceMe(); /*获取资源信息*/
10
	//关键词标签点击进去搜索
11
	//关键词标签点击进去搜索
11
	mui(".tagList").on("tap","li",function(){
12
	mui(".tagList").on("tap", "li", function() {
12
		var tagText = this.getElementsByTagName("span")[0].innerText;
13
		var tagText = this.getElementsByTagName("span")[0].innerText;
13
		plus.nativeUI.showWaiting();
14
		plus.nativeUI.showWaiting();
14
		var web = plus.webview.create("../html/searchListNew2.html?content=5", "../html/searchListNew2.html", {}, {
15
		var web = plus.webview.create("../html/searchListNew2.html?content=5", "../html/searchListNew2.html", {}, {
15
			key: tagText,
16
			key: tagText,
16
			qiFlag: 5
17
			qiFlag: 5
17
		}); 
18
		});
18
	})
19
	})
19
	//点击收藏按钮
20
	//点击收藏按钮
20
	ifcollectionAbout(paperId,5);
21
	ifcollectionAbout(paperId, 5);
21
	ocollectBtn.addEventListener('tap', function() {
22
	ocollectBtn.addEventListener('tap', function() {
22
		if(userid && userid != null && userid != "null") {
23
		if(userid && userid != null && userid != "null") {
23
			if(document.getElementById("ifCollect").className=='mui-icon iconfontnew icon-yishoucang'){
24
				cancelCollectionAbout(paperId,5)
24
			if(document.getElementById("ifCollect").className == 'mui-icon iconfontnew icon-yishoucang') {
25
				cancelCollectionAbout(paperId, 5)
25
			} else {
26
			} else {
26
				collectionAbout(paperId,5);
27
				collectionAbout(paperId, 5);
27
			}
28
			}
28
		}else{
29
		} else {
29
			isLogin();
30
			isLogin();
30
		}
31
		}
31
	});
32
	});
32
	
33
	
34
	mui.ajax(baseUrl + '/ajax/ppaper/incPageViews',{
35
			"type": "POST",
36
			"dataType": "json",
37
			"data": {
38
				"id": paperId
39
			},
40
			"success": function(data) {
41
				if(data.success) {}
42
			},
43
			"error": function() {
44
				
45
			}
46
		});
33
34
	mui.ajax(baseUrl + '/ajax/ppaper/incPageViews', {
35
		"type": "POST",
36
		"dataType": "json",
37
		"data": {
38
			"id": paperId
39
		},
40
		"success": function(data) {
41
			if(data.success) {}
42
		},
43
		"error": function() {
44
45
		}
46
	});
47
47
	function getRecourceMe() {
48
	function getRecourceMe() {
48
		mui.plusReady(function() {
49
		mui.plusReady(function() {
49
			mui.ajax(baseUrl + '/ajax/ppaper/qo', {
50
			mui.ajax(baseUrl + '/ajax/ppaper/qo', {
58
						console.log(JSON.stringify(data))
59
						console.log(JSON.stringify(data))
59
						paperHtml(data.data);
60
						paperHtml(data.data);
60
						getPaperAuthors(data.data.id)
61
						getPaperAuthors(data.data.id)
61
						
62
62
						plus.nativeUI.closeWaiting();
63
						plus.nativeUI.closeWaiting();
63
						plus.webview.currentWebview().show("slide-in-right", 150);
64
						plus.webview.currentWebview().show("slide-in-right", 150);
64
					}
65
					}
69
			});
70
			});
70
		})
71
		})
71
	}
72
	}
73
72
	function paperHtml($da) {
74
	function paperHtml($da) {
73
		document.getElementById("paperTit").innerHTML = $da.name;
75
		document.getElementById("paperTit").innerHTML = $da.name;
74
		document.getElementById("paperName").innerHTML = $da.name; //名字
76
		document.getElementById("paperName").innerHTML = $da.name; //名字
75
		document.getElementById("paperAbstract").innerHTML = $da.summary; //摘要内容
77
		document.getElementById("paperAbstract").innerHTML = $da.summary; //摘要内容
76
		if(!$da.cn4periodical){
77
			$da.cn4periodical=""
78
		if(!$da.cn4periodical) {
79
			$da.cn4periodical = ""
78
		}
80
		}
79
		if(!$da.en4periodical){
80
			$da.en4periodical=""
81
		if(!$da.en4periodical) {
82
			$da.en4periodical = ""
81
		}
83
		}
82
		if(!$da.cn4periodical && !$da.en4periodical){
83
			document.getElementById("paperJournal").parentNode.parentNode.style.display="none";
84
		}else{
85
			document.getElementById("paperJournal").innerHTML = $da.cn4periodical  +" " +  $da.en4periodical;
84
		if(!$da.cn4periodical && !$da.en4periodical) {
85
			document.getElementById("paperJournal").parentNode.parentNode.style.display = "none";
86
		} else {
87
			document.getElementById("paperJournal").innerHTML = $da.cn4periodical + " " + $da.en4periodical;
86
		}
88
		}
87
89
88
		if(!$da.pubDay){
89
			document.getElementById("paperVolume").parentNode.parentNode.style.display="none";
90
		}else{
90
		if(!$da.pubDay) {
91
			document.getElementById("paperVolume").parentNode.parentNode.style.display = "none";
92
		} else {
91
			document.getElementById("paperVolume").innerHTML = $da.pubDay;
93
			document.getElementById("paperVolume").innerHTML = $da.pubDay;
92
		}
94
		}
93
		if($da.keywords != undefined && $da.keywords.length != 0 ){
95
		if($da.keywords != undefined && $da.keywords.length != 0) {
94
			var subs = new Array();
96
			var subs = new Array();
95
			if($da.keywords.indexOf(',')){
97
			if($da.keywords.indexOf(',')) {
96
				subs = $da.keywords.split(',');
98
				subs = $da.keywords.split(',');
97
			}else{
99
			} else {
98
				subs[0] = $da.keywords;
100
				subs[0] = $da.keywords;
99
			}
101
			}
100
			var pstr=""
101
			if(subs.length>0){
102
				for (var i = 0; i < subs.length; i++) 
103
				{
104
					pstr+='<li><span class="h2Font">'+ subs[i] +'</span></li>'
102
			var pstr = ""
103
			if(subs.length > 0) {
104
				for(var i = 0; i < subs.length; i++) {
105
					pstr += '<li><span class="h2Font">' + subs[i] + '</span></li>'
105
				};
106
				};
106
				document.getElementsByClassName("tagList")[0].innerHTML= pstr;
107
			}else{
108
				document.getElementsByClassName("tagList")[0].style.display="none";
107
				document.getElementsByClassName("tagList")[0].innerHTML = pstr;
108
			} else {
109
				document.getElementsByClassName("tagList")[0].style.display = "none";
109
			}
110
			}
110
		}		
111
		}
111
	}
112
	}
112
	/*获取论文作者信息*/
113
	/*获取论文作者信息*/
113
	function getPaperAuthors(stritrm) {
114
	function getPaperAuthors(stritrm) {
114
		mui.ajax(baseUrl +"/ajax/ppaper/authors",{
115
116
		mui.ajax(baseUrl + "/ajax/ppaper/authors", {
115
			"type": "GET",
117
			"type": "GET",
116
			"success": function(data) {
118
			"success": function(data) {
119
				console.log(JSON.stringify(data))
117
				if(data.success) {
120
				if(data.success) {
118
					if(data.data.length>0){
119
						for(var i=0;i<data.data.length;i++){
120
							var authTy="",authTit="",baseInfo="",imgbg="../images/default-photo.jpg";
121
							if(data.data[i].professorId.substring(0, 1) != "#"){
122
								mui.ajax(baseUrl +"/ajax/professor/editBaseInfo/" + data.data[i].professorId,{
123
									type:"get",
124
									async:true,
125
									success:function($proData){
121
					if(data.data.length > 0) {
122
						document.getElementById("aboutAuthors").innerHTML = ""
123
						for(var i = 0; i < data.data.length; i++) {
124
							var authTy = "",
125
								authTit = "",
126
								baseInfo = "",
127
								imgbg = "../images/default-photo.jpg";
128
							if(data.data[i].professorId.substring(0, 1) != "#") {
129
								mui.ajax(baseUrl + "/ajax/professor/editBaseInfo/" + data.data[i].professorId, {
130
									type: "get",
131
									async: true,
132
									success: function($proData) {
126
										console.log(JSON.stringify($proData))
133
										console.log(JSON.stringify($proData))
127
										if($proData.success){
134
										if($proData.success) {
128
											var showPro = $proData.data;
135
											var showPro = $proData.data;
129
											if(showPro.hasHeadImage == 1) {
136
											if(showPro.hasHeadImage == 1) {
130
												imgbg = "/images/head/" + showPro.id + "_l.jpg";
137
												imgbg = "/images/head/" + showPro.id + "_l.jpg";
132
												imgbg = "../images/default-photo.jpg";
139
												imgbg = "../images/default-photo.jpg";
133
											}
140
											}
134
											//认证
141
											//认证
135
											var oSty = autho(showPro.authType,showPro.orgAuth,showPro.authStatus);
142
											var oSty = autho(showPro.authType, showPro.orgAuth, showPro.authStatus);
136
											authTy = oSty.sty;
143
											authTy = oSty.sty;
137
											authTit = oSty.title;
144
											authTit = oSty.title;
138
											
145
139
											var title = showPro.title || "";
146
											var title = showPro.title || "";
140
											var orgName = showPro.orgName || "";
147
											var orgName = showPro.orgName || "";
141
											var office = showPro.office || "";
148
											var office = showPro.office || "";
142
											if(orgName!=""){
149
											if(orgName != "") {
143
												if(title != "") {
150
												if(title != "") {
144
													baseInfo = title + "," + orgName;
151
													baseInfo = title + "," + orgName;
145
												}else{
146
													if(office!=""){
147
														baseInfo = office  + "," + orgName;	
148
													}else{
149
														baseInfo = orgName;	
152
												} else {
153
													if(office != "") {
154
														baseInfo = office + "," + orgName;
155
													} else {
156
														baseInfo = orgName;
150
													}
157
													}
151
												}
158
												}
152
											}else{
159
											} else {
153
												if(title != "") {
160
												if(title != "") {
154
													baseInfo = title;
161
													baseInfo = title;
155
												}else{
156
													if(office!=""){
157
														baseInfo = office;	
158
													}else{
159
														baseInfo = "";	
162
												} else {
163
													if(office != "") {
164
														baseInfo = office;
165
													} else {
166
														baseInfo = "";
160
													}
167
													}
161
												}
168
												}
162
											}
169
											}
163
											var liItem = document.createElement("li");
170
											var liItem = document.createElement("li");
164
											liItem.setAttribute("data-id",showPro.id);
171
											liItem.setAttribute("data-id", showPro.id);
172
											var odis = (userid == showPro.id) ? "none" : "block";
165
											liItem.className = "mui-table-view-cell"
173
											liItem.className = "mui-table-view-cell"
166
											var oString = '<div class="flexCenter mui-clearfix">'
167
											oString += '<div class="madiaHead useHead" style="background-image:url('+ imgbg +')"></div>'
168
											oString += '<div class="madiaInfo"><p><span class="h1Font">'+ showPro.name +'</span><em class="authicon '+ authTy +'" title="'+ authTit +'"></em></p>'
169
											oString += '<p class="mui-ellipsis h2Font">'+ baseInfo +'</p>'
170
											oString += '</div></div>'
174
											var oString = '<div class="flexCenter mui-clearfix" style="width:80%;">'
175
											oString += '<div class="madiaHead useHead" style="background-image:url(' + imgbg + ')"></div>'
176
											oString += '<div class="madiaInfo"><p><span class="h1Font">' + showPro.name + '</span><em class="authicon ' + authTy + '" title="' + authTit + '"></em></p>'
177
											oString += '<p class="mui-ellipsis h2Font">' + baseInfo + '</p>'
178
											oString += '</div></div><span class="mui-icon attenSpan"  style="display:' + odis + ';" data-id="'+showPro.id+'">关注</span>'
171
											liItem.innerHTML = oString;
179
											liItem.innerHTML = oString;
172
											document.getElementById("aboutAuthors").appendChild(liItem);
180
											document.getElementById("aboutAuthors").appendChild(liItem);
181
											ifcollectionAbout1.call(liItem.getElementsByClassName("attenSpan")[0],showPro.id,1);
173
										}
182
										}
174
									}
183
									}
175
								})
184
								})
176
							}else{
185
							} else {
177
								var liItem = document.createElement("li");
186
								var liItem = document.createElement("li");
178
								liItem.setAttribute("data-id",data.data[i].professorId);
187
								var otext = (userName == data.data[i].name) ? "是我本人" : "邀请ta加入";
188
								liItem.setAttribute("data-id", data.data[i].professorId);
179
								liItem.className = "mui-table-view-cell"
189
								liItem.className = "mui-table-view-cell"
180
								var oString = '<div class="flexCenter mui-clearfix">'
181
								oString += '<div class="madiaHead useHead" style="background-image:url('+ imgbg +')"></div>'
182
								oString += '<div class="madiaInfo"><p><span class="h1Font">'+ data.data[i].name  +'</span></p>'
183
								oString += '</div></div>'
190
								var oString = '<div class="flexCenter mui-clearfix" style="width:80%;">'
191
								oString += '<div class="madiaHead useHead" style="background-image:url(' + imgbg + ')"></div>'
192
								oString += '<div class="madiaInfo"><p><span class="h1Font">' + data.data[i].name + '</span></p>'
193
								oString += '</div></div><span class="invite">' + otext + '</span>'
184
								liItem.innerHTML = oString;
194
								liItem.innerHTML = oString;
185
								document.getElementById("aboutAuthors").appendChild(liItem);
195
								document.getElementById("aboutAuthors").appendChild(liItem);
186
							}
196
							}
187
							
197
188
						}
198
						}
189
					}
199
					}
190
				}
200
				}
194
			},
204
			},
195
			dataType: "json",
205
			dataType: "json",
196
			'error': function(xhr, type, errorThrown) {
206
			'error': function(xhr, type, errorThrown) {
197
					plus.nativeUI.toast("服务器链接超时", toastStyle);
198
				}
207
				plus.nativeUI.toast("服务器链接超时", toastStyle);
208
			}
199
		});
209
		});
200
	}
210
	}
201
	
211
202
	//判断是否登录,登录才可咨询,关注,收藏
212
	//判断是否登录,登录才可咨询,关注,收藏
203
	function isLogin() {
213
	function isLogin() {
204
		var userid = plus.storage.getItem('userid');
214
		var userid = plus.storage.getItem('userid');
205
         if(userid==null || userid=='null'|userid == undefined |userid == 'undefined'){
215
		if(userid == null || userid == 'null' | userid == undefined | userid == 'undefined') {
206
			mui.openWindow({
216
			mui.openWindow({
207
				url: '../html/login.html',
217
				url: '../html/login.html',
208
				id: 'login.html'
209
			})
218
				id: '../html/login.html',
219
				show: {
220
					aniShow: "slide-in-right"
221
				},
222
				extras: {
223
					ourl: self.id
224
				}
225
			});
226
			return 1;
210
		}
227
		}
211
	};
228
	};
212
	
213
   /*微信及微信朋友圈分享专家*/
229
230
	window.addEventListener("newId", function(event) {
231
		userName = plus.storage.getItem('name');
232
		userid = plus.storage.getItem('userid');
233
		getRecourceMe();
234
		ifcollectionAbout(paperId, 5);
235
	});
236
237
	function leadIn(sel) {
238
		mui.ajax(baseUrl + "/ajax/ppaper/ass", {
239
			"type": "POST",
240
			"data": {
241
				id: paperId,
242
				uid: userid,
243
				author: userName
244
			},
245
			"success": function(data) {
246
				if(data.success) {
247
					if(data.data > 0) {
248
						plus.nativeUI.toast("导入成功", toastStyle);
249
						sel.style.display = "none";
250
					}
251
				}
252
			}
253
		});
254
	}
255
	mui("#aboutAuthors").on("tap", "li>span", function() {
256
		var that = this;
257
		if(this.innerHTML === "是我本人") {
258
			if(isLogin()) {
259
				return;
260
			}
261
			var btn = ["确定", "取消"];
262
			mui.confirm("确认这是您发表的论文?", "提示", btn, function(e) {
263
				if(e.index == 0) {
264
					leadIn(that);
265
				}
266
			})
267
		} else if(this.innerHTML === "邀请ta加入") {
268
			var share = buildShareService("weixin");
269
			if(share) {
270
				shareMessage(share, "WXSceneSession", {
271
					content: document.getElementById("paperAbstract").innerHTML.substring(0, 40),
272
					title: document.getElementById("paperName").innerHTML,
273
					href: baseUrl + "/e/l.html?id=" + paperId,
274
					thumbs: [baseUrl + "/images/logo180.png"]
275
				});
276
			}
277
		} else if(this.innerHTML === "关注") {
278
			if(isLogin()) {
279
				return;
280
			}
281
					collectionAbout1(this.getAttribute("data-id"), '1',this);
282
		} else if(this.innerHTML === "已关注") {
283
			if(isLogin()) {
284
				return;
285
			}
286
			cancelCollectionAbout1(this.getAttribute("data-id"), '1',this);
287
		}
288
	})
289
	
290
	/*判断是否收藏资源文章或者是否关注专家*/
291
	function ifcollectionAbout1(watchObject,num) {
292
		var that=this;
293
		mui.ajax(baseUrl + '/ajax/watch/hasWatch', {
294
			data: {
295
				"professorId": userid,
296
				"watchObject": watchObject
297
			},
298
			dataType: 'json', //数据格式类型
299
			type: 'get', //http请求类型
300
			timeout: 10000,
301
			async: false,
302
			success: function(data) {
303
				if(data.success && data.data != null) {
304
					if(num=="1"){//已关注专家
305
						that.classList.add("attenedSpan");
306
						that.innerText="已关注";
307
					}else{//已收藏资源或文章
308
						document.getElementById("ifCollect").classList.remove("icon-shoucang");
309
						document.getElementById("ifCollect").classList.add("icon-yishoucang");
310
					}
311
				} else {
312
					if(num=="1"){//关注专家
313
						that.classList.remove("attenedSpan");
314
						that.innerText="关注";
315
					}else{//收藏资源或文章
316
						document.getElementById("ifCollect").classList.add("icon-shoucang");
317
						document.getElementById("ifCollect").classList.remove("icon-yishoucang");
318
					}
319
				}
320
			},
321
			error: function() {
322
				plus.nativeUI.toast("服务器链接超时", toastStyle);
323
			}
324
		});
325
	}
326
327
	/*收藏资源、文章或者关注专家*/
328
	function collectionAbout1(watchObject, num,sel) {
329
		mui.ajax(baseUrl + '/ajax/watch', {
330
			data: {
331
				"professorId": userid,
332
				"watchObject": watchObject,
333
				"watchType": num
334
			},
335
			dataType: 'json', //数据格式类型
336
			type: 'POST', //http请求类型
337
			timeout: 10000,
338
			async: false,
339
			success: function(data) {
340
				if(data.success) {
341
					if(num=="1"){//关注专家
342
						sel.classList.add("attenedSpan");
343
						sel.innerText="已关注";
344
						plus.nativeUI.toast("关注成功", toastStyle);
345
					}else{//收藏资源或文章
346
						document.getElementById("ifCollect").classList.remove("icon-shoucang");
347
						document.getElementById("ifCollect").classList.add("icon-yishoucang");
348
						plus.nativeUI.toast("收藏成功", toastStyle);
349
					}
350
				}
351
			},
352
			error: function() {
353
				plus.nativeUI.toast("服务器链接超时", toastStyle);
354
			}
355
		});
356
	}
357
358
	/*取消收藏资源、文章或者取消关注专家*/
359
	function cancelCollectionAbout1(watchObject, num,sel) {
360
		mui.ajax({
361
			url: baseUrl + '/ajax/watch/delete',
362
			data: {
363
				professorId: userid,
364
				watchObject: watchObject
365
			},
366
			dataType: 'json', //数据格式类型
367
			type: 'post', //http请求类型
368
			timeout: 10000,
369
			async: true,
370
			success: function(data) {
371
				console.log(data.success)
372
				if(data.success) {
373
					if(num=="1"){//关注专家
374
						sel.classList.remove("attenedSpan");
375
						sel.innerText="关注";
376
						plus.nativeUI.toast("已取消关注", toastStyle);
377
					}else{//收藏资源或文章
378
						document.getElementById("ifCollect").classList.add("icon-shoucang");
379
						document.getElementById("ifCollect").classList.remove("icon-yishoucang");
380
						plus.nativeUI.toast("已取消收藏", toastStyle);
381
					}
382
					
383
				}
384
			},
385
			error: function(data) {
386
				plus.nativeUI.toast("服务器链接超时", toastStyle);
387
			}
388
		});
389
390
	}
391
	/*微信及微信朋友圈分享专家*/
214
	var auths, shares;
392
	var auths, shares;
215
	plus.oauth.getServices(function(services) {
393
	plus.oauth.getServices(function(services) {
216
		auths = {};
394
		auths = {};
240
		document.getElementById("maskBlack").style.display = "none";
418
		document.getElementById("maskBlack").style.display = "none";
241
		var oFen = this.getElementsByTagName("span")[0].innerHTML;
419
		var oFen = this.getElementsByTagName("span")[0].innerHTML;
242
420
243
		var oUrl=baseUrl + "/images/logo180.png";
244
		
421
		var oUrl = baseUrl + "/images/logo180.png";
422
245
		if(oFen == "微信好友") {
423
		if(oFen == "微信好友") {
246
			var share = buildShareService("weixin");
424
			var share = buildShareService("weixin");
247
			if(share) {
425
			if(share) {
248
				shareMessage(share, "WXSceneSession", {
426
				shareMessage(share, "WXSceneSession", {
249
					content: document.getElementById("paperAbstract").innerHTML.substring(0,40),
427
					content: document.getElementById("paperAbstract").innerHTML.substring(0, 40),
250
					title: document.getElementById("paperName").innerHTML,
428
					title: document.getElementById("paperName").innerHTML,
251
					href: baseUrl + "/e/l.html?id=" + paperId ,
429
					href: baseUrl + "/e/l.html?id=" + paperId,
252
					thumbs: [oUrl]
430
					thumbs: [oUrl]
253
				});
431
				});
254
			}
432
			}
256
			var share = buildShareService("weixin");
434
			var share = buildShareService("weixin");
257
			if(share) {
435
			if(share) {
258
				shareMessage(share, "WXSceneTimeline", {
436
				shareMessage(share, "WXSceneTimeline", {
259
					content: document.getElementById("paperAbstract").innerHTML.substring(0,40),
437
					content: document.getElementById("paperAbstract").innerHTML.substring(0, 40),
260
					title: document.getElementById("paperName").innerHTML,
438
					title: document.getElementById("paperName").innerHTML,
261
					href: baseUrl + "/e/l.html?id=" + paperId ,
439
					href: baseUrl + "/e/l.html?id=" + paperId,
262
					thumbs: [oUrl]
440
					thumbs: [oUrl]
263
				});
441
				});
264
			}
442
			}
266
			var share = buildShareService("sinaweibo");
444
			var share = buildShareService("sinaweibo");
267
			if(share) {
445
			if(share) {
268
				shareMessage(share, "sinaweibo", {
446
				shareMessage(share, "sinaweibo", {
269
					content: document.getElementById("paperName").innerHTML+ baseUrl + "/e/l.html?id=" + paperId ,
447
					content: document.getElementById("paperName").innerHTML + baseUrl + "/e/l.html?id=" + paperId,
270
				});
448
				});
271
			}
449
			}
272
		}
450
		}
317
	/*图像预览*/
495
	/*图像预览*/
318
	mui.previewImage();
496
	mui.previewImage();
319
	moreMes();
497
	moreMes();
320
	function moreMes(){
321
		document.getElementById("BtnMore").addEventListener("tap",function(){
322
			var oUrl=baseUrl + "/images/logo180.png";
498
499
	function moreMes() {
500
		document.getElementById("BtnMore").addEventListener("tap", function() {
501
			var oUrl = baseUrl + "/images/logo180.png";
323
			plus.nativeUI.showWaiting(); //显示原生等待框
502
			plus.nativeUI.showWaiting(); //显示原生等待框
324
		var webviewShow = plus.webview.create("../html/moreItem.html", 'moreItem.html', {}, {
325
			proid: paperId,
326
			name:"paper",
327
			data:{
328
					content: document.getElementById("paperAbstract").innerHTML.substring(0,40),
503
			var webviewShow = plus.webview.create("../html/moreItem.html", 'moreItem.html', {}, {
504
				proid: paperId,
505
				name: "paper",
506
				data: {
507
					content: document.getElementById("paperAbstract").innerHTML.substring(0, 40),
329
					title: document.getElementById("paperName").innerHTML,
508
					title: document.getElementById("paperName").innerHTML,
330
					href: baseUrl + "/e/l.html?id=" + paperId ,
509
					href: baseUrl + "/e/l.html?id=" + paperId,
331
					thumbs: [oUrl]
510
					thumbs: [oUrl]
332
				},
511
				},
333
			weiboData:{
334
					content: document.getElementById("paperName").innerHTML+ baseUrl + "/e/l.html?id=" + paperId ,
512
				weiboData: {
513
					content: document.getElementById("paperName").innerHTML + baseUrl + "/e/l.html?id=" + paperId,
335
				}
514
				}
336
		})
515
			})
337
		})
516
		})
338
	}
517
	}
339
});
518
});

+ 176 - 6
app/js/patentShow.js

3
var patentId;
3
var patentId;
4
mui.plusReady(function() {
4
mui.plusReady(function() {
5
	var userid = plus.storage.getItem('userid');
5
	var userid = plus.storage.getItem('userid');
6
	var self = plus.webview.currentWebview();
6
	var self = plus.webview.currentWebview();
7
	var userName = plus.storage.getItem('name');
7
	patentId = self.patentId;
8
	patentId = self.patentId;
8
	//patentId="FE95F18DDCFA4E64BF62C014D67E95FB";
9
	//patentId="FE95F18DDCFA4E64BF62C014D67E95FB";
9
	getRecourceMe();/*获取资源信息*/
10
	getRecourceMe();/*获取资源信息*/
120
			"type": "GET",
121
			"type": "GET",
121
			"success": function(data) {
122
			"success": function(data) {
122
				if(data.success) {
123
				if(data.success) {
124
					console.log(JSON.stringify(data))
123
					if(data.data.length>0){
125
					if(data.data.length>0){
124
						for(var i=0;i<data.data.length;i++){
126
						for(var i=0;i<data.data.length;i++){
125
							var authTy="",authTit="",baseInfo="",imgbg="../images/default-photo.jpg";
127
							var authTy="",authTit="",baseInfo="",imgbg="../images/default-photo.jpg";
128
							console.log(data.data[i].professorId)
126
							if(data.data[i].professorId.substring(0, 1) != "#"){
129
							if(data.data[i].professorId.substring(0, 1) != "#"){
127
								$.ajax(baseUrl +"/ajax/professor/editBaseInfo/" + data.data[i].professorId,{
130
								mui.ajax(baseUrl +"/ajax/professor/editBaseInfo/" + data.data[i].professorId,{
128
									type:"get",
131
									type:"get",
129
									async:true,
132
									async:true,
130
									success:function($proData){
133
									success:function($proData){
166
												}
169
												}
167
											}
170
											}
168
											var liItem = document.createElement("li");
171
											var liItem = document.createElement("li");
172
											var odis = (userid == showPro.id) ? "none" : "block";
169
											liItem.setAttribute("data-id",showPro.id);
173
											liItem.setAttribute("data-id",showPro.id);
170
											liItem.className = "mui-table-view-cell"
174
											liItem.className = "mui-table-view-cell"
171
											var oString = '<div class="flexCenter mui-clearfix">'
175
											var oString = '<div class="flexCenter mui-clearfix">'
172
											oString += '<div class="madiaHead useHead" style="background-image:url('+ imgbg +')"></div>'
176
											oString += '<div class="madiaHead useHead" style="background-image:url('+ imgbg +')"></div>'
173
											oString += '<div class="madiaInfo"><p><span class="h1Font">'+ showPro.name +'</span><em class="authicon '+ authTy +'" title="'+ authTit +'"></em></p>'
177
											oString += '<div class="madiaInfo"><p><span class="h1Font">'+ showPro.name +'</span><em class="authicon '+ authTy +'" title="'+ authTit +'"></em></p>'
174
											oString += '<p class="mui-ellipsis h2Font">'+ baseInfo +'</p>'
178
											oString += '<p class="mui-ellipsis h2Font">'+ baseInfo +'</p>'
175
											oString += '</div></div>'
179
											oString += '</div></div><span class="mui-icon attenSpan"  style="display:' + odis + ';" data-id="'+showPro.id+'">关注</span>'
176
											liItem.innerHTML = oString;
180
											liItem.innerHTML = oString;
177
											document.getElementById("aboutAuthors").appendChild(liItem);
181
											document.getElementById("aboutAuthors").appendChild(liItem);
182
											ifcollectionAbout1.call(liItem.getElementsByClassName("attenSpan")[0],showPro.id,1);
178
										}
183
										}
179
									}
184
									}
180
								})
185
								})
181
							}else{
186
							}else{
182
								var liItem = document.createElement("li");
187
								var liItem = document.createElement("li");
188
								var otext = (userName == data.data[i].name) ? "是我本人" : "邀请ta加入";
183
								liItem.setAttribute("data-id",data.data[i].professorId);
189
								liItem.setAttribute("data-id",data.data[i].professorId);
184
								liItem.className = "mui-table-view-cell"
190
								liItem.className = "mui-table-view-cell"
185
								var oString = '<div class="flexCenter mui-clearfix">'
191
								var oString = '<div class="flexCenter mui-clearfix">'
186
								oString += '<div class="madiaHead useHead" style="background-image:url('+ imgbg +')"></div>'
192
								oString += '<div class="madiaHead useHead" style="background-image:url('+ imgbg +')"></div>'
187
								oString += '<div class="madiaInfo"><p><span class="h1Font">'+ data.data[i].name  +'</span></p>'
193
								oString += '<div class="madiaInfo"><p><span class="h1Font">'+ data.data[i].name  +'</span></p>'
188
								oString += '</div></div>'
194
								oString += '</div></div><span class="invite">' + otext + '</span>'
189
								liItem.innerHTML = oString;
195
								liItem.innerHTML = oString;
190
								document.getElementById("aboutAuthors").appendChild(liItem);
196
								document.getElementById("aboutAuthors").appendChild(liItem);
191
							}
197
							}
210
         if(userid==null || userid=='null'|userid == undefined |userid == 'undefined'){
216
         if(userid==null || userid=='null'|userid == undefined |userid == 'undefined'){
211
			mui.openWindow({
217
			mui.openWindow({
212
				url: '../html/login.html',
218
				url: '../html/login.html',
213
				id: 'login.html'
219
				id: 'login.html',
220
				extras: {
221
					ourl: self.id
222
				}
214
			})
223
			})
224
			return 1;
215
		}
225
		}
226
         return 0;
216
	};
227
	};
217
	
228
	window.addEventListener("newId", function(event) {
229
		userName = plus.storage.getItem('name');
230
		userid = plus.storage.getItem('userid');
231
		getRecourceMe();
232
		ifcollectionAbout(patentId,4);
233
	});
234
	function leadIn(sel) {
235
		mui.ajax(baseUrl + "/ajax/ppatent/ass", {
236
			"type": "POST",
237
			"data": {
238
				id: patentId,
239
				uid: userid,
240
				author: userName
241
			},
242
			"success": function(data) {
243
				if(data.success) {
244
					if(data.data > 0) {
245
						plus.nativeUI.toast("导入成功", toastStyle);
246
						sel.style.display = "none";
247
					}
248
				}
249
			}
250
		});
251
	}
252
	mui("#aboutAuthors").on("tap", "li>span", function() {
253
		var that = this;
254
		if(this.innerHTML === "是我本人") {
255
			if(isLogin()) {
256
				return;
257
			}
258
			
259
			var btn = ["确定", "取消"];
260
			mui.confirm("确认这是您发表的专利?", "提示", btn, function(e) {
261
				if(e.index == 0) {
262
					leadIn(that);
263
				}
264
			})
265
		} else if(this.innerHTML === "邀请ta加入") {
266
			var share = buildShareService("weixin");
267
			if(share) {
268
				shareMessage(share, "WXSceneSession", {
269
					content: document.getElementById("paperAbstract").innerHTML.substring(0, 40),
270
					title: document.getElementById("paperName").innerHTML,
271
					href: baseUrl + "/e/l.html?id=" + paperId,
272
					thumbs: [baseUrl + "/images/logo180.png"]
273
				});
274
			}
275
		} else if(this.innerHTML === "关注") {
276
			if(isLogin()) {
277
				return;
278
			}
279
					collectionAbout1(this.getAttribute("data-id"), '1',this);
280
		} else if(this.innerHTML === "已关注") {
281
			if(isLogin()) {
282
				return;
283
			}
284
			cancelCollectionAbout1(this.getAttribute("data-id"), '1',this);
285
		}
286
	})
287
	/*判断是否收藏资源文章或者是否关注专家*/
288
	function ifcollectionAbout1(watchObject,num) {
289
		var that=this;
290
		mui.ajax(baseUrl + '/ajax/watch/hasWatch', {
291
			data: {
292
				"professorId": userid,
293
				"watchObject": watchObject
294
			},
295
			dataType: 'json', //数据格式类型
296
			type: 'get', //http请求类型
297
			timeout: 10000,
298
			async: false,
299
			success: function(data) {
300
				if(data.success && data.data != null) {
301
					if(num=="1"){//已关注专家
302
						that.classList.add("attenedSpan");
303
						that.innerText="已关注";
304
					}else{//已收藏资源或文章
305
						document.getElementById("ifCollect").classList.remove("icon-shoucang");
306
						document.getElementById("ifCollect").classList.add("icon-yishoucang");
307
					}
308
				} else {
309
					if(num=="1"){//关注专家
310
						that.classList.remove("attenedSpan");
311
						that.innerText="关注";
312
					}else{//收藏资源或文章
313
						document.getElementById("ifCollect").classList.add("icon-shoucang");
314
						document.getElementById("ifCollect").classList.remove("icon-yishoucang");
315
					}
316
				}
317
			},
318
			error: function() {
319
				plus.nativeUI.toast("服务器链接超时", toastStyle);
320
			}
321
		});
322
	}
323
324
	/*收藏资源、文章或者关注专家*/
325
	function collectionAbout1(watchObject, num,sel) {
326
		mui.ajax(baseUrl + '/ajax/watch', {
327
			data: {
328
				"professorId": userid,
329
				"watchObject": watchObject,
330
				"watchType": num
331
			},
332
			dataType: 'json', //数据格式类型
333
			type: 'POST', //http请求类型
334
			timeout: 10000,
335
			async: false,
336
			success: function(data) {
337
				if(data.success) {
338
					if(num=="1"){//关注专家
339
						sel.classList.add("attenedSpan");
340
						sel.innerText="已关注";
341
						plus.nativeUI.toast("关注成功", toastStyle);
342
					}else{//收藏资源或文章
343
						document.getElementById("ifCollect").classList.remove("icon-shoucang");
344
						document.getElementById("ifCollect").classList.add("icon-yishoucang");
345
						plus.nativeUI.toast("收藏成功", toastStyle);
346
					}
347
				}
348
			},
349
			error: function() {
350
				plus.nativeUI.toast("服务器链接超时", toastStyle);
351
			}
352
		});
353
	}
354
355
	/*取消收藏资源、文章或者取消关注专家*/
356
	function cancelCollectionAbout1(watchObject, num,sel) {
357
		mui.ajax({
358
			url: baseUrl + '/ajax/watch/delete',
359
			data: {
360
				professorId: userid,
361
				watchObject: watchObject
362
			},
363
			dataType: 'json', //数据格式类型
364
			type: 'post', //http请求类型
365
			timeout: 10000,
366
			async: true,
367
			success: function(data) {
368
				console.log(data.success)
369
				if(data.success) {
370
					if(num=="1"){//关注专家
371
						sel.classList.remove("attenedSpan");
372
						sel.innerText="关注";
373
						plus.nativeUI.toast("已取消关注", toastStyle);
374
					}else{//收藏资源或文章
375
						document.getElementById("ifCollect").classList.add("icon-shoucang");
376
						document.getElementById("ifCollect").classList.remove("icon-yishoucang");
377
						plus.nativeUI.toast("已取消收藏", toastStyle);
378
					}
379
					
380
				}
381
			},
382
			error: function(data) {
383
				plus.nativeUI.toast("服务器链接超时", toastStyle);
384
			}
385
		});
386
387
	}
218
   /*微信及微信朋友圈分享专家*/
388
   /*微信及微信朋友圈分享专家*/
219
	var auths, shares;
389
	var auths, shares;
220
	plus.oauth.getServices(function(services) {
390
	plus.oauth.getServices(function(services) {

+ 34 - 11
app/js/searchListNew2.js

35
        height: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
35
        height: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
36
    };
36
    };
37
}
37
}
38
console.log(oWidth)
39
for(var n=0;n<6;n++) {
38
for(var n=0;n<6;n++) {
40
	document.getElementsByClassName("mui-control-item")[n].style.paddingLeft=(oWidth-4.5*45)/9+"px";
39
	document.getElementsByClassName("mui-control-item")[n].style.paddingLeft=(oWidth-4.5*45)/9+"px";
41
	document.getElementsByClassName("mui-control-item")[n].style.paddingRight=(oWidth-4.5*45)/9+"px";
40
	document.getElementsByClassName("mui-control-item")[n].style.paddingRight=(oWidth-4.5*45)/9+"px";
334
						document.getElementById('arNoSearch').classList.remove("displayNone");
333
						document.getElementById('arNoSearch').classList.remove("displayNone");
335
						return;
334
						return;
336
					}
335
					}
337
					if(pageNo < Math.ceil(data.total / data.pageSize)) {
336
					if(data.pageNo < Math.ceil(data.total / data.pageSize)) {
338
						//mui('#pullrefresh').pullRefresh().endPullupToRefresh(false)
337
						//mui('#pullrefresh').pullRefresh().endPullupToRefresh(false)
339
						key1[5].endPullUpToRefresh(false);
338
						key1[5].endPullUpToRefresh(false);
340

339

350
						key1[5].endPullUpToRefresh(true);
349
						key1[5].endPullUpToRefresh(true);
351
						return;
350
						return;
352
					}
351
					}
353
					if(pageNo < Math.ceil(data.total / data.pageSize)) {
352
					if(data.pageNo < Math.ceil(data.total / data.pageSize)) {
354
						//mui('#pullrefresh').pullRefresh().endPullupToRefresh(false)
353
						//mui('#pullrefresh').pullRefresh().endPullupToRefresh(false)
355
						key1[5].endPullUpToRefresh(false);
354
						key1[5].endPullUpToRefresh(false);
356
					} else {
355
					} else {
405
				}
404
				}
406
			},
405
			},
407
			patent: function(data) {
406
			patent: function(data) {
407
				
408
				if(key2[3] == 1) {
408
				if(key2[3] == 1) {
409
					plus.nativeUI.closeWaiting();
409
					plus.nativeUI.closeWaiting();
410
					plus.webview.currentWebview().show("slide-in-right", 150);
410
					plus.webview.currentWebview().show("slide-in-right", 150);
442
						document.getElementById('ptNoSearch').classList.remove("displayNone");
442
						document.getElementById('ptNoSearch').classList.remove("displayNone");
443
						return;
443
						return;
444
					}
444
					}
445
					if(pageNo < Math.ceil(data.total / data.pageSize)) {
445
					if(data.pageNo < Math.ceil(data.total / data.pageSize)) {
446
						//mui('#pullrefresh').pullRefresh().endPullupToRefresh(false)
446
						//mui('#pullrefresh').pullRefresh().endPullupToRefresh(false)
447
						key1[3].endPullUpToRefresh(false);
447
						key1[3].endPullUpToRefresh(false);
448

448

458
						key1[3].endPullUpToRefresh(true);
458
						key1[3].endPullUpToRefresh(true);
459
						return;
459
						return;
460
					}
460
					}
461
					if(pageNo < Math.ceil(data.total / data.pageSize)) {
461
					if(data.pageNo < Math.ceil(data.total / data.pageSize)) {
462
						//mui('#pullrefresh').pullRefresh().endPullupToRefresh(false)
462
						//mui('#pullrefresh').pullRefresh().endPullupToRefresh(false)
463
						key1[3].endPullUpToRefresh(false);
463
						key1[3].endPullUpToRefresh(false);
464
					} else {
464
					} else {
467
					}
467
					}
468
				}
468
				}
469
				for(var i = 0; i < $data.length; i++) {
469
				for(var i = 0; i < $data.length; i++) {
470
					console.log(JSON.stringify($data[i]));
470
					var li = document.createElement("li");
471
					var li = document.createElement("li");
471
					li.setAttribute("data-id", $data[i].id);
472
					li.setAttribute("data-id", $data[i].id);
472
					li.className = "mui-table-view-cell";
473
					li.className = "mui-table-view-cell";
518
						document.getElementById('ppNoSearch').classList.remove("displayNone");
519
						document.getElementById('ppNoSearch').classList.remove("displayNone");
519
						return;
520
						return;
520
					}
521
					}
521
					if(pageNo < Math.ceil(data.total / data.pageSize)) {
522
					if(data.pageNo < Math.ceil(data.total / data.pageSize)) {
522
						//mui('#pullrefresh').pullRefresh().endPullupToRefresh(false)
523
						//mui('#pullrefresh').pullRefresh().endPullupToRefresh(false)
523
						key1[4].endPullUpToRefresh(false);
524
						key1[4].endPullUpToRefresh(false);
524

525

534
						key1[4].endPullUpToRefresh(true);
535
						key1[4].endPullUpToRefresh(true);
535
						return;
536
						return;
536
					}
537
					}
537
					if(pageNo < Math.ceil(data.total / data.pageSize)) {
538
					if(data.pageNo < Math.ceil(data.total / data.pageSize)) {
538
						//mui('#pullrefresh').pullRefresh().endPullupToRefresh(false)
539
						//mui('#pullrefresh').pullRefresh().endPullupToRefresh(false)
539
						key1[4].endPullUpToRefresh(false);
540
						key1[4].endPullUpToRefresh(false);
540
					} else {
541
					} else {
594
						document.getElementById('coNoSearch').classList.remove("displayNone");
595
						document.getElementById('coNoSearch').classList.remove("displayNone");
595
						return;
596
						return;
596
					}
597
					}
597
					if(pageNo < Math.ceil(data.total / data.pageSize)) {
598
					if(data.pageNo < Math.ceil(data.total / data.pageSize)) {
598
						//mui('#pullrefresh').pullRefresh().endPullupToRefresh(false)
599
						//mui('#pullrefresh').pullRefresh().endPullupToRefresh(false)
599
						key1[1].endPullUpToRefresh(false);
600
						key1[1].endPullUpToRefresh(false);
600

601

610
						key1[1].endPullUpToRefresh(true);
611
						key1[1].endPullUpToRefresh(true);
611
						return;
612
						return;
612
					}
613
					}
613
					if(pageNo < Math.ceil(data.total / data.pageSize)) {
614
					if(data.pageNo < Math.ceil(data.total / data.pageSize)) {
614
						//mui('#pullrefresh').pullRefresh().endPullupToRefresh(false)
615
						//mui('#pullrefresh').pullRefresh().endPullupToRefresh(false)
615
						key1[1].endPullUpToRefresh(false);
616
						key1[1].endPullUpToRefresh(false);
616
					} else {
617
					} else {
619
					}
620
					}
620
				}
621
				}
621
				for(var i = 0; i < $data.length; i++) {
622
				for(var i = 0; i < $data.length; i++) {
622
					console.log(JSON.stringify($data[i]))
623
					var li = document.createElement("li");
623
					var li = document.createElement("li");
624
					li.setAttribute("data-id", $data[i].id);
624
					li.setAttribute("data-id", $data[i].id);
625
					var oimg = ($data[i].hasOrgLogo) ? baseUrl + "/images/org/" + $data[i].id + ".jpg" : "../images/default-icon.jpg";
625
					var oimg = ($data[i].hasOrgLogo) ? baseUrl + "/images/org/" + $data[i].id + ".jpg" : "../images/default-icon.jpg";
676
		} else if(webview.qiFlag == 4) {
676
		} else if(webview.qiFlag == 4) {
677
			document.getElementById("searchval").setAttribute("placeholder", "输入专利名称、发明人、专利号或相关关键词");
677
			document.getElementById("searchval").setAttribute("placeholder", "输入专利名称、发明人、专利号或相关关键词");
678
			document.getElementById("sele").classList.add("displayNone");
678
			document.getElementById("sele").classList.add("displayNone");
679
			document.getElementById("searB").classList.remove("searchboxNewT");			
679
			document.getElementById("searB").classList.remove("searchboxNewT");	
680
			
680
			search.oAjaxGet(baseUrl + "/ajax/ppatent/pq", {
681
			search.oAjaxGet(baseUrl + "/ajax/ppatent/pq", {
681
				"qw": obj.pt,
682
				"qw": obj.pt,
682
				"pageSize": pageSize,
683
				"pageSize": pageSize,
846
						}, "get", search.article);
847
						}, "get", search.article);
847
					}
848
					}
848
				} else if(tabFlag == 4) {
849
				} else if(tabFlag == 4) {
850
					
849
					if(obj.pt != searchval) {
851
					if(obj.pt != searchval) {
850
						key1[3].refresh(true);
852
						key1[3].refresh(true);
851
						pageNo.pt = 1;
853
						pageNo.pt = 1;
898
				document.getElementById("sele").classList.remove("displayNone");
900
				document.getElementById("sele").classList.remove("displayNone");
899
				document.getElementById("searB").classList.add("searchboxNewT");
901
				document.getElementById("searB").classList.add("searchboxNewT");
900
				if(key2[0] == 1) {
902
				if(key2[0] == 1) {
903
					if(obj.ex != searchval) {
904
						obj.ex = searchval;
905
					}
906
					flag = 1;
901
					pageNo.ex = 1;
907
					pageNo.ex = 1;
902
					search.oAjaxGet(baseUrl + "/ajax/professor/pqAPP", {
908
					search.oAjaxGet(baseUrl + "/ajax/professor/pqAPP", {
903
						"key": obj.ex,
909
						"key": obj.ex,
934
				document.getElementById("sele").classList.add("displayNone");
940
				document.getElementById("sele").classList.add("displayNone");
935
				document.getElementById("searB").classList.remove("searchboxNewT");
941
				document.getElementById("searB").classList.remove("searchboxNewT");
936
				if(key2[2] == 1) {
942
				if(key2[2] == 1) {
943
					if(obj.rs != searchval) {
944
						obj.rs = searchval;
945
					}
937
					flag = 1;
946
					flag = 1;
938
					pageNo.rs = 1;
947
					pageNo.rs = 1;
939
					search.oAjaxGet(baseUrl + "/ajax/resource/firstpq", {
948
					search.oAjaxGet(baseUrl + "/ajax/resource/firstpq", {
962
				document.getElementById("sele").classList.add("displayNone");
971
				document.getElementById("sele").classList.add("displayNone");
963
				document.getElementById("searB").classList.remove("searchboxNewT");
972
				document.getElementById("searB").classList.remove("searchboxNewT");
964
				if(key2[5] == 1) {
973
				if(key2[5] == 1) {
974
					if(obj.ar != searchval) {
975
						obj.ar = searchval;
976
					}
965
					flag = 1;
977
					flag = 1;
966
					pageNo.ar = 1;
978
					pageNo.ar = 1;
967
					search.oAjaxGet(baseUrl + "/ajax/article/firstpq", {
979
					search.oAjaxGet(baseUrl + "/ajax/article/firstpq", {
990
				document.getElementById("sele").classList.add("displayNone");
1002
				document.getElementById("sele").classList.add("displayNone");
991
				document.getElementById("searB").classList.remove("searchboxNewT");
1003
				document.getElementById("searB").classList.remove("searchboxNewT");
992
				if(key2[3] == 1) {
1004
				if(key2[3] == 1) {
1005
					if(obj.pt != searchval) {
1006
						obj.pt = searchval;
1007
					}
1008
					console.log(obj.pt);
1009
					console.log(searchval);
993
					flag = 1;
1010
					flag = 1;
994
					pageNo.pt = 1;
1011
					pageNo.pt = 1;
995
					search.oAjaxGet(baseUrl + "/ajax/ppatent/pq", {
1012
					search.oAjaxGet(baseUrl + "/ajax/ppatent/pq", {
1018
				document.getElementById("sele").classList.add("displayNone");
1035
				document.getElementById("sele").classList.add("displayNone");
1019
				document.getElementById("searB").classList.remove("searchboxNewT");
1036
				document.getElementById("searB").classList.remove("searchboxNewT");
1020
				if(key2[4] == 1) {
1037
				if(key2[4] == 1) {
1038
					if(obj.pp != searchval) {
1039
						obj.pp = searchval; 
1040
					}
1021
					flag = 1;
1041
					flag = 1;
1022
					pageNo.pp = 1;
1042
					pageNo.pp = 1;
1023
					search.oAjaxGet(baseUrl + "/ajax/ppaper/pq", {
1043
					search.oAjaxGet(baseUrl + "/ajax/ppaper/pq", {
1046
				document.getElementById("sele").classList.add("displayNone");
1066
				document.getElementById("sele").classList.add("displayNone");
1047
				document.getElementById("searB").classList.remove("searchboxNewT");
1067
				document.getElementById("searB").classList.remove("searchboxNewT");
1048
				if(key2[1] == 1) {
1068
				if(key2[1] == 1) {
1069
					if(obj.co != searchval) {
1070
						obj.co = searchval;
1071
					}
1049
					flag = 1;
1072
					flag = 1;
1050
					pageNo.co = 1;
1073
					pageNo.co = 1;
1051
					search.oAjaxGet(baseUrl + "/ajax/org/find/pq", {
1074
					search.oAjaxGet(baseUrl + "/ajax/org/find/pq", {