瀏覽代碼

按照要求修改六大浏览页面

luyanan 7 年之前
父節點
當前提交
6290adc75e
共有 10 個文件被更改,包括 180 次插入380 次删除
  1. 4 4
      app/css/app.css
  2. 1 1
      app/html/resourceShow.html
  3. 6 4
      app/js/articleShow.js
  4. 10 15
      app/js/cmpInforShow.js
  5. 45 108
      app/js/paperShow.js
  6. 13 75
      app/js/patentShow.js
  7. 46 22
      app/js/public/base.js
  8. 36 124
      app/js/resourceShow.js
  9. 1 1
      app/js/searchListNew2.js
  10. 18 26
      app/js/userInforShow.js

+ 4 - 4
app/css/app.css

@ -1085,15 +1085,15 @@ ul.tagList{padding:0;margin:18px 0 8px;overflow: hidden;}
1085 1085
ul.tagList>li{list-style:none;float: left;margin-right:10px;margin-bottom:10px;padding:4px 12px;color: #666;background:#EFEFEF;}
1086 1086
ul.tagList>li .h2Font{color: #666; -webkit-user-select:text;}
1087 1087
.madiaBlock{clear:both;}.madiaBlock:before,.madiaBlock:after{display:table;content:""}.madiaBlock:after{clear: both;}
1088
.madiaBlock ul{margin:6px -15px;}
1088
.madiaBlock ul{margin:0 -15px;}
1089 1089
.madiaBlock ul.infoBlock{margin:0 -15px;}
1090 1090
.madiaBlock ul.infoBlock .mui-table-view-cell:after{background: transparent;}
1091
.madiaBlock ul.infoBlock .madiaInfo .authicon{bottom:auto;}
1091
.madiaBlock ul.infoBlock .madiaInfo .authicon{bottom:4px;}
1092 1092
.madiaBlock ul.mui-table-view .mui-table-view-cell:after{left:15px;}
1093 1093
.madiaBlock .madiaTit{position:relative;font-size:16px;color:#666;padding-left:10px;margin-top:15px;padding-bottom: 10px;}
1094 1094
.madiaBlock .madiaTit:before{display:inline-block;content:"";width:4px;height: 16px;position:absolute;top:1px;left:0;background: #ff9900;}
1095 1095
.madiaBlock .madiaTit:after{position: absolute;bottom: 0;content:"";height: 1px;background: #E5E5E5;right: -15px;left:-15px;}
1096
.madiaBlock .madiaHead{width:90px;height:60px;margin-top:-30px;position:absolute;border:1px solid #E5E5E5;top:50%;background-position: center;background-size: cover;}
1096
.madiaBlock .madiaHead{width:90px;height:60px;margin-top:-30px;position:absolute;/*border:1px solid #E5E5E5;*/top:50%;background-position: center;background-size: cover;}
1097 1097
.madiaBlock .madiaHead.useHead{width: 50px;height:50px;margin-top:-25px;background-image: url(../images/default-photo.jpg);border-radius: 50%;}
1098 1098
.madiaBlock .madiaHead.resouseHead{background-image: url(../images/default-resource.jpg);}
1099 1099
.madiaBlock .madiaHead.artHead{background-image: url(../images/default-artical.jpg);}
@ -1104,7 +1104,7 @@ ul.tagList>li .h2Font{color: #666; -webkit-user-select:text;}
1104 1104
.madiaBlock .madiaHead.paperHead{background-image: url(../images/default-paper.jpg);}
1105 1105
.madiaBlock .madiaHead.patentHead{background-image: url(../images/default-patent.jpg);}
1106 1106
.madiaBlock .madiaInfo{padding-left:62px; width: 100%;padding-right:6px;}
1107
.madiaBlock .madiaInfo span.h1Font{display: inline-block;max-width:86%;}
1107
/*.madiaBlock .madiaInfo span.h1Font{display: inline-block;max-width:86%;}*/
1108 1108
.madiaBlock .madiaInfo.OmadiaInfo{padding-left: 102px;}
1109 1109
.madiaBlock .flexCenter{min-height:54px;}
1110 1110
.madiaBlock .flexCenter.OflexCenter{min-height:70px;}

+ 1 - 1
app/html/resourceShow.html

@ -62,7 +62,7 @@
62 62
									<p class="h3Font mui-ellipsis" id="thisOther"></p>
63 63
								</div>
64 64
				            </div>
65
				            <span class="mui-icon attenSpan" id="attenSpan"></span>
65
				            <span class="mui-icon attenSpan" id="attenSpan" style="display:inline-block">关注</span>
66 66
				        </li>
67 67
				    </ul>
68 68
	    		</div>

+ 6 - 4
app/js/articleShow.js

@ -311,15 +311,17 @@ mui.plusReady(function() {
311 311
					userType.sty = "e"
312 312
				}
313 313
			}
314
			var rImg = baseUrl + "/data/resource/" + $data.images[0].imageSrc;
314
			var rImg = "../images/default-resource.jpg";
315
			if($data.images.length>0){
316
				rImg = baseUrl + "/data/resource/" + $data.images[0].imageSrc;
317
			}
315 318
			var li = document.createElement("li");
316 319
			li.setAttribute("data-id", $data.resourceId);
317 320
			li.className = "mui-table-view-cell";
318 321
			li.innerHTML = '<div class="flexCenter OflexCenter mui-clearfix">' +
319 322
				' <div class="madiaHead resouseHead" style="background-image:url(' + rImg + ')"></div>' +
320 323
				'<div class="madiaInfo OmadiaInfo">' +
321
				'<p class="mui-ellipsis h1Font">' + $data.resourceName + '</p>' +
322
				'<p class="mui-ellipsis h2Font">用途:' + $data.supportedServices + '</p>' +
324
				'<p class="mui-ellipsis-2 h1Font">' + $data.resourceName + '</p>' +
323 325
				'<p><span class="h2Font">' + namepo + '</span><em class="authicon ' + userType.sty + '" title="科袖认证专家"></em></p>' +
324 326
				'</div>' +
325 327
				'</div>'
@ -379,7 +381,7 @@ mui.plusReady(function() {
379 381
								'<div class="madiaHead artHead" style="background-image:url(' + arImg + ')"></div>' +
380 382
								'<div class="madiaInfo OmadiaInfo">' +
381 383
								'<p class="mui-ellipsis-2 h1Font">' + title + '</p>' +
382
								'<p><span class="h2Font">' + namepo + '</span><em class="authicon ' + userType.sty + '" title="科袖认证专家"></em></p>' +
384
								'<p><span class="h2Font" style="margin-right:10px">'+namepo+'</span><span class="time">'+commenTime($data[i].publishTime)+'</span></p>'+
383 385
								'</div>' +
384 386
								'</div>'
385 387
							document.getElementById("articleList").appendChild(li);

+ 10 - 15
app/js/cmpInforShow.js

@ -25,13 +25,14 @@ mui.ready(function() {
25 25
			}
26 26
		});
27 27
		//点击收藏按钮
28
		ifcollectionAbout(orgId,6);
28
		var oifAttend=document.getElementById("ifAttend")
29
		ifcollectionAbout(orgId,oifAttend,6);
29 30
		document.getElementById("collectBtn").addEventListener('tap', function() {
30 31
			if(userid && userid != null && userid != "null") {
31
				if(document.getElementById("ifAttend").className=='mui-icon iconfontnew icon-yishoucang'){
32
					cancelCollectionAbout(orgId,6)
32
				if(oifAttend.className=='mui-icon iconfontnew icon-yishoucang'){
33
					cancelCollectionAbout(orgId,oifAttend,6)
33 34
				} else {
34
					collectionAbout(orgId,6);
35
					collectionAbout(orgId,oifAttend,6);
35 36
				}
36 37
			}else{
37 38
				isLogin();
@ -214,7 +215,7 @@ mui.ready(function() {
214 215
								} else {
215 216
									oString += '<div class="madiaHead resouseHead"></div>'
216 217
								}
217
								oString += '<div class="madiaInfo OmadiaInfo"><p class="mui-ellipsis h1Font">' + obj[i].resourceName + '</p><p class="h2Font mui-ellipsis">用途:' + obj[i].supportedServices + '</p>'
218
								oString += '<div class="madiaInfo OmadiaInfo"><p class="mui-ellipsis h1Font">' + obj[i].resourceName + '</p><p class="h2Font mui-ellipsis-2">用途:' + obj[i].supportedServices + '</p>'
218 219
								oString += '</div></div>'
219 220
								liItem.innerHTML = oString;
220 221
								document.getElementById("resourceShow").appendChild(liItem);
@ -263,6 +264,7 @@ mui.ready(function() {
263 264
									oString += '<div class="madiaHead artHead"></div>'
264 265
								}
265 266
								oString += '<div class="madiaInfo OmadiaInfo"><p class="mui-ellipsis-2 h1Font">' + obj[i].articleTitle + '</p>'
267
								oString += '<p class="h2Font mui-ellipsis"><span class="time">'+commenTime(obj[i].publishTime)+'</span></p>'
266 268
								oString += '</div></div>'
267 269
								liItem.innerHTML = oString;
268 270
								document.getElementById("articelShow").appendChild(liItem);
@ -326,24 +328,17 @@ mui.ready(function() {
326 328
												thisName=data.data.name;
327 329
											}
328 330
											if(StrData[n].articleType==1) {
329
												userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
330
												thisTitle = userType.title;
331
												thisAuth = userType.sty;
332 331
												add.setAttribute("owner-id", data.data.id);
333 332
												add.setAttribute("data-type", 1);
334 333
											}else {
335 334
												add.setAttribute("owner-id", data.data.id);
336 335
												add.setAttribute("data-type", 2);
337
												if(data.data.authStatus==3) {
338
													thisTitle = "科袖认证企业";
339
													thisAuth = "authicon-com-ok";
340
												}
341 336
											}
342 337
											
343 338
											var itemlist = '<div class="flexCenter OflexCenter mui-clearfix"><div class="madiaHead artHead" style="background-image:url('+imgL+')"></div>';
344 339
												itemlist += '<div class="madiaInfo OmadiaInfo">';
345
												itemlist += '<p class="mui-ellipsis h2Font" id="usertitle">'+StrData[n].articleTitle+'</p>';
346
												itemlist += '<p><span class="h1Font">'+thisName+'</span><em class="authicon '+thisAuth+'" title="'+thisTitle+'"></em></p>';
340
												itemlist += '<p class="mui-ellipsis-2 h1Font" id="usertitle">'+StrData[n].articleTitle+'</p>';
341
												itemlist += '<p><span class="h2Font" style="margin-right:10px">'+thisName+'</span><span class="time">'+commenTime(StrData[n].publishTime)+'</span></p>';
347 342
												itemlist += '</div></div>';
348 343
												
349 344
											add.innerHTML=itemlist;
@ -425,7 +420,7 @@ mui.ready(function() {
425 420
						}
426 421
						var itemlist = '<div class="flexCenter OflexCenter mui-clearfix"><div class="madiaHead cmpHead"><div class="boxBlock"><img class="boxBlockimg" src="'+imgL+'" /></div></div>';
427 422
							itemlist += '<div class="madiaInfo OmadiaInfo">';
428
							itemlist += '<p><span class="h1Font">'+thisName+'</span><em class="authicon '+thisAuth+'" title="'+thisTitle+'"></em></p>';
423
							itemlist += '<p class="mui-ellipsis"><span class="h1Font">'+thisName+'</span><em class="authicon '+thisAuth+'" title="'+thisTitle+'"></em></p>';
429 424
							itemlist += '<p class="mui-ellipsis h2Font">'+otherI+'</p>';
430 425
							itemlist += '</div></div>';
431 426
						add.innerHTML=itemlist;

+ 45 - 108
app/js/paperShow.js

@ -18,13 +18,14 @@ mui.plusReady(function() {
18 18
		});
19 19
	})
20 20
	//点击收藏按钮
21
	ifcollectionAbout(paperId, 5);
21
	var oifCollect=document.getElementById("ifCollect")
22
	ifcollectionAbout(paperId,oifCollect, 5);
22 23
	ocollectBtn.addEventListener('tap', function() {
23 24
		if(userid && userid != null && userid != "null") {
24
			if(document.getElementById("ifCollect").className == 'mui-icon iconfontnew icon-yishoucang') {
25
				cancelCollectionAbout(paperId, 5)
25
			if(oifCollect.className == 'mui-icon iconfontnew icon-yishoucang') {
26
				cancelCollectionAbout(paperId,oifCollect, 5)
26 27
			} else {
27
				collectionAbout(paperId, 5);
28
				collectionAbout(paperId,oifCollect, 5);
28 29
			}
29 30
		} else {
30 31
			isLogin();
@ -200,7 +201,7 @@ mui.plusReady(function() {
200 201
											liItem.innerHTML = oString;
201 202
											document.getElementById("aboutAuthors").appendChild(liItem);
202 203
											if(userid){
203
											ifcollectionAbout1.call(liItem.getElementsByClassName("attenSpan")[0],showPro.id,1);}
204
											ifcollectionAbout1.call(liItem.getElementsByClassName("attenSpan")[0],showPro.id,1,1);}
204 205
										}
205 206
									}
206 207
								})
@ -253,7 +254,7 @@ mui.plusReady(function() {
253 254
		userName = plus.storage.getItem('name');
254 255
		userid = plus.storage.getItem('userid');
255 256
		getRecourceMe();
256
		ifcollectionAbout(paperId, 5);
257
		ifcollectionAbout(paperId,oifCollect, 5);
257 258
	});
258 259
259 260
	function leadIn(sel) {
@ -307,118 +308,54 @@ mui.plusReady(function() {
307 308
			if(isLogin()) {
308 309
				return;
309 310
			}
310
					collectionAbout1(this.getAttribute("data-id"), '1',this);
311
					collectionAbout(this.getAttribute("data-id"),this, 1,1);
311 312
					
312 313
		} else if(this.innerHTML === "已关注") {
313 314
			if(isLogin()) {
314 315
				return;
315 316
			}
316
			cancelCollectionAbout1(this.getAttribute("data-id"), '1',this);
317
			cancelCollectionAbout(this.getAttribute("data-id"),this,1,1);
317 318
		}
318 319
		
319 320
	})
320 321
	
321 322
	/*判断是否收藏资源文章或者是否关注专家*/
322
	function ifcollectionAbout1(watchObject,num) {
323
		var that=this;
324
		mui.ajax(baseUrl + '/ajax/watch/hasWatch', {
325
			data: {
326
				"professorId": userid,
327
				"watchObject": watchObject
328
			},
329
			dataType: 'json', //数据格式类型
330
			type: 'get', //http请求类型
331
			timeout: 10000,
332
			async: false,
333
			success: function(data) {
334
				if(data.success && data.data != null) {
335
					if(num=="1"){//已关注专家
336
						that.classList.add("attenedSpan");
337
						that.innerText="已关注";
338
					}else{//已收藏资源或文章
339
						document.getElementById("ifCollect").classList.remove("icon-shoucang");
340
						document.getElementById("ifCollect").classList.add("icon-yishoucang");
341
					}
342
				} else {
343
					if(num=="1"){//关注专家
344
						that.classList.remove("attenedSpan");
345
						that.innerText="关注";
346
					}else{//收藏资源或文章
347
						document.getElementById("ifCollect").classList.add("icon-shoucang");
348
						document.getElementById("ifCollect").classList.remove("icon-yishoucang");
349
					}
350
				}
351
			},
352
			error: function() {
353
				plus.nativeUI.toast("服务器链接超时", toastStyle);
354
			}
355
		});
356
	}
357
358
	/*收藏资源、文章或者关注专家*/
359
	function collectionAbout1(watchObject, num,sel) {
360
		mui.ajax(baseUrl + '/ajax/watch', {
361
			data: {
362
				"professorId": userid,
363
				"watchObject": watchObject,
364
				"watchType": num
365
			},
366
			dataType: 'json', //数据格式类型
367
			type: 'POST', //http请求类型
368
			timeout: 10000,
369
			async: false,
370
			success: function(data) {
371
				if(data.success) {
372
					if(num=="1"){//关注专家
373
						sel.classList.add("attenedSpan");
374
						sel.innerText="已关注";
375
						plus.nativeUI.toast("关注成功", toastStyle);
376
					}else{//收藏资源或文章
377
						document.getElementById("ifCollect").classList.remove("icon-shoucang");
378
						document.getElementById("ifCollect").classList.add("icon-yishoucang");
379
						plus.nativeUI.toast("收藏成功", toastStyle);
380
					}
381
				}
382
			},
383
			error: function() {
384
				plus.nativeUI.toast("服务器链接超时", toastStyle);
385
			}
386
		});
323
	function ifcollectionAbout1(watchObject,num) {
324
		var that=this;
325
		mui.ajax(baseUrl + '/ajax/watch/hasWatch', {
326
			data: {
327
				"professorId": userid,
328
				"watchObject": watchObject
329
			},
330
			dataType: 'json', //数据格式类型
331
			type: 'get', //http请求类型
332
			timeout: 10000,
333
			async: false,
334
			success: function(data) {
335
				if(data.success && data.data != null) {
336
					if(num=="1"){//已关注专家
337
						that.classList.add("attenedSpan");
338
						that.innerText="已关注";
339
					}else{//已收藏资源或文章
340
						document.getElementById("ifCollect").classList.remove("icon-shoucang");
341
						document.getElementById("ifCollect").classList.add("icon-yishoucang");
342
					}
343
				} else {
344
					if(num=="1"){//关注专家
345
						that.classList.remove("attenedSpan");
346
						that.innerText="关注";
347
					}else{//收藏资源或文章
348
						document.getElementById("ifCollect").classList.add("icon-shoucang");
349
						document.getElementById("ifCollect").classList.remove("icon-yishoucang");
350
					}
351
				}
352
			},
353
			error: function() {
354
				plus.nativeUI.toast("服务器链接超时", toastStyle);
355
			}
356
		});
387 357
	}
388 358
389
	/*取消收藏资源、文章或者取消关注专家*/
390
	function cancelCollectionAbout1(watchObject, num,sel) {
391
		mui.ajax({
392
			url: baseUrl + '/ajax/watch/delete',
393
			data: {
394
				professorId: userid,
395
				watchObject: watchObject
396
			},
397
			dataType: 'json', //数据格式类型
398
			type: 'post', //http请求类型
399
			timeout: 10000,
400
			async: true,
401
			success: function(data) {
402
				console.log(data.success)
403
				if(data.success) {
404
					if(num=="1"){//关注专家
405
						sel.classList.remove("attenedSpan");
406
						sel.innerText="关注";
407
						plus.nativeUI.toast("已取消关注", toastStyle);
408
					}else{//收藏资源或文章
409
						document.getElementById("ifCollect").classList.add("icon-shoucang");
410
						document.getElementById("ifCollect").classList.remove("icon-yishoucang");
411
						plus.nativeUI.toast("已取消收藏", toastStyle);
412
					}
413
					
414
				}
415
			},
416
			error: function(data) {
417
				plus.nativeUI.toast("服务器链接超时", toastStyle);
418
			}
419
		});
420
421
	}
422 359
	var r64 = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "-", "_"];
423 360
		var d64 = {
424 361
			"0": 0,
@ -916,7 +853,7 @@ mui('.commentBlock').on('tap', '.useHead,.h1Font', function() {
916 853
							li.innerHTML = '<div class="flexCenter OflexCenter mui-clearfix">' +
917 854
								'<div class="madiaHead paperHead"></div>' +
918 855
								'<div class="madiaInfo OmadiaInfo">' +
919
								'<p class="mui-ellipsis h1Font">' + $data[i].name + '</p>' +
856
								'<p class="mui-ellipsis-2 h1Font">' + $data[i].name + '</p>' +
920 857
								'<p class="mui-ellipsis h2Font">' + $data[i].authors.substring(0, $data[i].authors.length - 1) + '</p>' +
921 858
								'</div>' +
922 859
								'</div>'
@ -952,7 +889,7 @@ mui('.commentBlock').on('tap', '.useHead,.h1Font', function() {
952 889
							li.innerHTML = '<div class="flexCenter OflexCenter mui-clearfix">' +
953 890
								'<div class="madiaHead patentHead"></div>' +
954 891
								'<div class="madiaInfo OmadiaInfo">' +
955
								'<p class="mui-ellipsis h1Font">' + $data[i].name + '</p>' +
892
								'<p class="mui-ellipsis-2 h1Font">' + $data[i].name + '</p>' +
956 893
								'<p class="mui-ellipsis h2Font">作者:' + $data[i].authors.substring(0, $data[i].authors.length - 1) + '</p>' +
957 894
								'</div>' +
958 895
								'</div>'

+ 13 - 75
app/js/patentShow.js

@ -16,14 +16,15 @@ mui.plusReady(function() {
16 16
			qiFlag: 4
17 17
		}); 
18 18
	})
19
	var oifCollect=document.getElementById("ifCollect")
19 20
	//点击收藏按钮
20
	ifcollectionAbout(patentId,4);
21
	ifcollectionAbout(patentId,oifCollect,4);
21 22
	ocollectBtn.addEventListener('tap', function() {
22 23
		if(userid && userid != null && userid != "null") {
23
			if(document.getElementById("ifCollect").className=='mui-icon iconfontnew icon-yishoucang'){
24
				cancelCollectionAbout(patentId,4)
24
			if(oifCollect.className=='mui-icon iconfontnew icon-yishoucang'){
25
				cancelCollectionAbout(patentId,oifCollect,4)
25 26
			} else {
26
				collectionAbout(patentId,4);
27
				collectionAbout(patentId,oifCollect,4);
27 28
			}
28 29
		}else{
29 30
			isLogin();
@ -198,8 +199,9 @@ mui.plusReady(function() {
198 199
											oString += '</div></div><span class="mui-icon attenSpan"  style="display:' + odis + ';" data-id="'+showPro.id+'">关注</span>'
199 200
											liItem.innerHTML = oString;
200 201
											document.getElementById("aboutAuthors").appendChild(liItem);
201
											if(userid){
202
											ifcollectionAbout1.call(liItem.getElementsByClassName("attenSpan")[0],showPro.id,1);}
202
											if(userid){
203
												ifcollectionAbout1.call(liItem.getElementsByClassName("attenSpan")[0],showPro.id,1,1);
204
											}
203 205
										}
204 206
									}
205 207
								})
@ -249,7 +251,7 @@ mui.plusReady(function() {
249 251
		userName = plus.storage.getItem('name');
250 252
		userid = plus.storage.getItem('userid');
251 253
		getRecourceMe();
252
		ifcollectionAbout(patentId,4);
254
		ifcollectionAbout(patentId,oifCollect,4);
253 255
		isAgree();
254 256
	});
255 257
	function leadIn(sel) {
@ -304,12 +306,12 @@ mui.plusReady(function() {
304 306
			if(isLogin()) {
305 307
				return;
306 308
			}
307
					collectionAbout1(this.getAttribute("data-id"), '1',this);
309
					collectionAbout(this.getAttribute("data-id"),this, 1,1);
308 310
		} else if(this.innerHTML === "已关注") {
309 311
			if(isLogin()) {
310 312
				return;
311 313
			}
312
			cancelCollectionAbout1(this.getAttribute("data-id"), '1',this);
314
			cancelCollectionAbout(this.getAttribute("data-id"),this, 1,1);
313 315
		}
314 316
	})
315 317
	/*判断是否收藏资源文章或者是否关注专家*/
@ -349,70 +351,6 @@ mui.plusReady(function() {
349 351
		});
350 352
	}
351 353
352
	/*收藏资源、文章或者关注专家*/
353
	function collectionAbout1(watchObject, num,sel) {
354
		mui.ajax(baseUrl + '/ajax/watch', {
355
			data: {
356
				"professorId": userid,
357
				"watchObject": watchObject,
358
				"watchType": num
359
			},
360
			dataType: 'json', //数据格式类型
361
			type: 'POST', //http请求类型
362
			timeout: 10000,
363
			async: false,
364
			success: function(data) {
365
				if(data.success) {
366
					if(num=="1"){//关注专家
367
						sel.classList.add("attenedSpan");
368
						sel.innerText="已关注";
369
						plus.nativeUI.toast("关注成功", toastStyle);
370
					}else{//收藏资源或文章
371
						document.getElementById("ifCollect").classList.remove("icon-shoucang");
372
						document.getElementById("ifCollect").classList.add("icon-yishoucang");
373
						plus.nativeUI.toast("收藏成功", toastStyle);
374
					}
375
				}
376
			},
377
			error: function() {
378
				plus.nativeUI.toast("服务器链接超时", toastStyle);
379
			}
380
		});
381
	}
382
383
	/*取消收藏资源、文章或者取消关注专家*/
384
	function cancelCollectionAbout1(watchObject, num,sel) {
385
		mui.ajax({
386
			url: baseUrl + '/ajax/watch/delete',
387
			data: {
388
				professorId: userid,
389
				watchObject: watchObject
390
			},
391
			dataType: 'json', //数据格式类型
392
			type: 'post', //http请求类型
393
			timeout: 10000,
394
			async: true,
395
			success: function(data) {
396
				console.log(data.success)
397
				if(data.success) {
398
					if(num=="1"){//关注专家
399
						sel.classList.remove("attenedSpan");
400
						sel.innerText="关注";
401
						plus.nativeUI.toast("已取消关注", toastStyle);
402
					}else{//收藏资源或文章
403
						document.getElementById("ifCollect").classList.add("icon-shoucang");
404
						document.getElementById("ifCollect").classList.remove("icon-yishoucang");
405
						plus.nativeUI.toast("已取消收藏", toastStyle);
406
					}
407
					
408
				}
409
			},
410
			error: function(data) {
411
				plus.nativeUI.toast("服务器链接超时", toastStyle);
412
			}
413
		});
414
415
	}
416 354
	var r64 = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "-", "_"];
417 355
		var d64 = {
418 356
			"0": 0,
@ -892,7 +830,7 @@ mui('.commentBlock').on('tap', '.useHead,.h1Font', function() {
892 830
							li.innerHTML = '<div class="flexCenter OflexCenter mui-clearfix">' +
893 831
								'<div class="madiaHead patentHead"></div>' +
894 832
								'<div class="madiaInfo OmadiaInfo">' +
895
								'<p class="mui-ellipsis h1Font">' + $data[i].name + '</p>' +
833
								'<p class="mui-ellipsis-2 h1Font">' + $data[i].name + '</p>' +
896 834
								'<p class="mui-ellipsis h2Font">作者:' + $data[i].authors.substring(0, $data[i].authors.length - 1) + '</p>' +
897 835
								'</div>' +
898 836
								'</div>'
@ -929,7 +867,7 @@ mui('.commentBlock').on('tap', '.useHead,.h1Font', function() {
929 867
							li.innerHTML = '<div class="flexCenter OflexCenter mui-clearfix">' +
930 868
								'<div class="madiaHead paperHead"></div>' +
931 869
								'<div class="madiaInfo OmadiaInfo">' +
932
								'<p class="mui-ellipsis h1Font">' + $data[i].name + '</p>' +
870
								'<p class="mui-ellipsis-2 h1Font">' + $data[i].name + '</p>' +
933 871
								'<p class="mui-ellipsis h2Font">' + $data[i].authors.substring(0, $data[i].authors.length - 1) + '</p>' +
934 872
								'</div>' +
935 873
								'</div>'

+ 46 - 22
app/js/public/base.js

@ -1,8 +1,8 @@
1 1
//公共文件
2 2
mui.init();
3 3
//var baseUrl = "http://www.ekexiu.com",
4
var baseUrl = "http://192.168.3.233:81",
5
//var baseUrl = "http:192.168.3.85:80",    
4
var baseUrl = "http://192.168.3.233",
5
//var baseUrl = "http:192.168.3.233:81",    
6 6
	toastStyle = {
7 7
		'verticalAlign': 'top',
8 8
	}
@ -248,7 +248,9 @@ var eduDegree = {
248 248
}
249 249

250 250
/*判断是否收藏资源文章或者是否关注专家*/
251
function ifcollectionAbout(watchObject,num) {
251
function ifcollectionAbout(watchObject,sel, num,flag) {
252
	var that=sel;
253
	console.log(JSON.stringify(that))
252 254
	mui.ajax(baseUrl + '/ajax/watch/hasWatch', {
253 255
		data: {
254 256
			"professorId": plus.storage.getItem('userid'),
@ -262,19 +264,29 @@ function ifcollectionAbout(watchObject,num) {
262 264
			console.log(JSON.stringify(data))
263 265
			if(data.success && data.data != null) {
264 266
				if(num=="1" || num == "6"){//已关注专家
265
					document.getElementById("ifAttend").classList.remove("icon-shoucang");
266
					document.getElementById("ifAttend").classList.add("icon-yishoucang");
267
					if(flag==1){
268
						that.classList.add("attenedSpan");
269
						that.innerText="已关注";
270
					}else{
271
						that.classList.remove("icon-shoucang");
272
						that.classList.add("icon-yishoucang");
273
					}
267 274
				}else{//已收藏资源或文章
268
					document.getElementById("ifCollect").classList.remove("icon-shoucang");
269
					document.getElementById("ifCollect").classList.add("icon-yishoucang");
275
					that.classList.remove("icon-shoucang");
276
					that.classList.add("icon-yishoucang");
270 277
				}
271 278
			} else {
272 279
				if(num=="1" || num == "6"){//关注专家
273
					document.getElementById("ifAttend").classList.add("icon-shoucang");
274
					document.getElementById("ifAttend").classList.remove("icon-yishoucang");
280
					if(flag==1){
281
						that.classList.remove("attenedSpan");
282
						that.innerText="关注";
283
					}else{
284
						that.classList.add("icon-shoucang");
285
						that.classList.remove("icon-yishoucang");
286
					}
275 287
				}else{//收藏资源或文章
276
					document.getElementById("ifCollect").classList.add("icon-shoucang");
277
					document.getElementById("ifCollect").classList.remove("icon-yishoucang");
288
					that.classList.add("icon-shoucang");
289
					that.classList.remove("icon-yishoucang");
278 290
				}
279 291
			}
280 292
		},
@ -285,7 +297,8 @@ function ifcollectionAbout(watchObject,num) {
285 297
}
286 298

287 299
/*收藏资源、文章或者关注专家*/
288
function collectionAbout(watchObject, num) {
300
function collectionAbout(watchObject,sel, num,flag) {
301
	var that=sel;
289 302
	mui.ajax(baseUrl + '/ajax/watch', {
290 303
		data: {
291 304
			"professorId": plus.storage.getItem('userid'),
@ -300,12 +313,17 @@ function collectionAbout(watchObject, num) {
300 313
			console.log(JSON.stringify(data))
301 314
			if(data.success) {
302 315
				if(num=="1" || num == "6"){//关注专家
303
					document.getElementById("ifAttend").classList.remove("icon-shoucang");
304
					document.getElementById("ifAttend").classList.add("icon-yishoucang");
316
					if(flag==1){
317
						that.classList.add("attenedSpan");
318
						that.innerText="已关注";
319
					}else{
320
						that.classList.remove("icon-shoucang");
321
						that.classList.add("icon-yishoucang");
322
					}
305 323
					plus.nativeUI.toast("关注成功", toastStyle);
306 324
				}else{//收藏资源或文章
307
					document.getElementById("ifCollect").classList.remove("icon-shoucang");
308
					document.getElementById("ifCollect").classList.add("icon-yishoucang");
325
					that.classList.remove("icon-shoucang");
326
					that.classList.add("icon-yishoucang");
309 327
					plus.nativeUI.toast("收藏成功", toastStyle);
310 328
				}
311 329
			}
@ -317,7 +335,8 @@ function collectionAbout(watchObject, num) {
317 335
}
318 336

319 337
/*取消收藏资源、文章或者取消关注专家*/
320
function cancelCollectionAbout(watchObject, num) {
338
function cancelCollectionAbout(watchObject,sel, num,flag) {
339
	var that=sel;
321 340
	mui.ajax({
322 341
		url: baseUrl + '/ajax/watch/delete',
323 342
		data: {
@ -332,12 +351,17 @@ function cancelCollectionAbout(watchObject, num) {
332 351
			console.log(JSON.stringify(data))
333 352
			if(data.success) {
334 353
				if(num=="1" || num == "6"){//关注专家
335
					document.getElementById("ifAttend").classList.add("icon-shoucang");
336
					document.getElementById("ifAttend").classList.remove("icon-yishoucang");
354
					if(flag==1){
355
						that.classList.remove("attenedSpan");
356
						that.innerText="关注";
357
					}else{
358
						that.classList.add("icon-shoucang");
359
						that.classList.remove("icon-yishoucang");
360
					}
337 361
					plus.nativeUI.toast("已取消关注", toastStyle);
338 362
				}else{//收藏资源或文章
339
					document.getElementById("ifCollect").classList.add("icon-shoucang");
340
					document.getElementById("ifCollect").classList.remove("icon-yishoucang");
363
					that.classList.add("icon-shoucang");
364
					that.classList.remove("icon-yishoucang");
341 365
					plus.nativeUI.toast("已取消收藏", toastStyle);
342 366
				}
343 367
				
@ -348,4 +372,4 @@ function cancelCollectionAbout(watchObject, num) {
348 372
		}
349 373
	});
350 374

351
}
375
}

+ 36 - 124
app/js/resourceShow.js

@ -19,6 +19,7 @@ var odetailDescp = document.getElementById("detailDescp"); //详细描述
19 19
var oconsultBtn = document.getElementById("consultBtn"); //咨询按钮
20 20
var ocollectBtn = document.getElementById("collectBtn"); //收藏按钮
21 21
var oattenSpan = document.getElementById("attenSpan"); //关注用户按钮
22
var oifCollect = document.getElementById("ifCollect")//星星
22 23
23 24
var professorId;
24 25
var orgId;
@ -65,9 +66,9 @@ mui.plusReady(function() {
65 66
							othisInfo.setAttribute("data-type",mydata.resourceType);
66 67
							professorId = othisInfo.getAttribute("data-id");
67 68
							if(userid != professorId) {
68
								ifcollectionAbout(professorId, 1)
69
								oattenSpan.style.display="block";
69
								ifcollectionAbout(professorId,oattenSpan, 1,1);
70 70
							}else{
71
								oattenSpan.style.display="none";
71 72
								document.getElementsByClassName('footbox')[0].style.display = "none";
72 73
							}
73 74
							if(mydata.orgName) { //所属机构
@ -102,11 +103,15 @@ mui.plusReady(function() {
102 103
							othisInfo.setAttribute("data-id",mydata.organization.id);
103 104
							othisInfo.setAttribute("data-status",mydata.organization.authStatus);
104 105
							othisInfo.setAttribute("data-type",mydata.resourceType);
106
							orgId = othisInfo.getAttribute("data-id");
105 107
							if(mydata.organization.forShort){
106 108
								othisName.innerHTML = mydata.organization.forShort;
107 109
							}else{
108 110
								othisName.innerHTML = mydata.organization.name;
109 111
							}
112
							if(userid) {
113
								ifcollectionAbout(orgId,oattenSpan, 6,1)
114
							}
110 115
							if(mydata.organization.subject) {
111 116
								othisOther.innerHTML = (mydata.organization.subject).replace(/,/, " | ");
112 117
							}
@ -237,17 +242,9 @@ mui.plusReady(function() {
237 242
										
238 243
										var comName="";
239 244
										if($html[n].articleType==1) {
240
											var stl = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
241 245
											comName=data.data.name;
242 246
											likeRli.setAttribute("data-type", 1);
243 247
										}else {
244
											var stl={};
245
											stl.sty="";
246
											stl.title="";
247
											if(data.data.authStatus==3) {
248
												stl.sty="authicon-com-ok";
249
												stl.title="认证企业";
250
											}
251 248
											if(data.data.forShort){
252 249
												comName=data.data.forShort;
253 250
											}else{
@ -265,7 +262,10 @@ mui.plusReady(function() {
265 262
										}
266 263
										str += '<div class="madiaInfo OmadiaInfo">'
267 264
										str += '<p class="mui-ellipsis-2 h1Font">' + $html[n].articleTitle + '</p>'
268
										str += '<p><span class="h2Font">' + comName + '</span><em class="authicon ' + stl.sty + '" title="' + stl.title + '"></em></p>'
265
										str += '<p class="h2Font mui-ellipsis">'
266
										str +='<span class="nameSpan" style="margin-right:10px">' + comName + '</span>'
267
										str +='<span class="time">'+commenTime($html[n].publishTime)+'</span>'
268
										str +='</p>'
269 269
										str += '</div></div>'
270 270
										likeRli.innerHTML = str;
271 271
										likeRUl.appendChild(likeRli,likeRUl.lastChild);
@ -345,8 +345,8 @@ mui.plusReady(function() {
345 345
										add.setAttribute("data-id",$respond[n].resourceId);
346 346
										var itemlist = '<div class="flexCenter OflexCenter"><div class="madiaHead resourceHead" style="background-image:url('+imgL+')"></div>';
347 347
											itemlist += '<div class="madiaInfo OmadiaInfo">';
348
											itemlist += '<p class="mui-ellipsis h2Font" id="usertitle">'+$respond[n].resourceName+'</p>';
349
											itemlist += '<p><span class="h1Font">'+thisName+'</span><em class="authicon '+thisAuth+'" title="'+thisTitle+'"></em></p>';
348
											itemlist += '<p class="mui-ellipsis h1Font" id="usertitle">'+$respond[n].resourceName+'</p>';
349
											itemlist += '<p><span class="h2Font">'+thisName+'</span><em class="authicon '+thisAuth+'" title="'+thisTitle+'"></em></p>';
350 350
											itemlist += '</div></div>';
351 351
											
352 352
										add.innerHTML=itemlist;
@ -492,129 +492,41 @@ mui.plusReady(function() {
492 492
493 493
	//点击关注专家按钮
494 494
	oattenSpan.addEventListener('tap', function() {
495
		var typeNum=othisInfo.getAttribute("data-type");
496
		var thisId=othisInfo.getAttribute("data-id");
495 497
		if(userid && userid != null && userid != "null") {
496
			if(this.className=='mui-icon attenSpan attenedSpan') {
497
				cancelCollectionAbout(professorId, 1)
498
			} else {
499
				collectionAbout(professorId, 1);
498
			if(typeNum==1){
499
				if(this.className=='mui-icon attenSpan attenedSpan') {
500
					cancelCollectionAbout(thisId,this, 1,1)
501
				} else {
502
					collectionAbout(thisId,this, 1,1);
503
				}
504
			}else{
505
				if(this.className=='mui-icon attenSpan attenedSpan') {
506
					cancelCollectionAbout(thisId,this, 6,1)
507
				} else {
508
					collectionAbout(thisId,this, 6,1);
509
				}
500 510
			}
501
		}else{
502
			isLogin();
503
		}
511
					
512
		}else{
513
			isLogin();
514
		}
504 515
	});
505 516
	//点击收藏按钮
506
	ifcollectionAbout(resourceId,2);
517
	ifcollectionAbout(resourceId,oifCollect,2);
507 518
	ocollectBtn.addEventListener('tap', function() {
508 519
		if(userid && userid != null && userid != "null") {
509
			if(document.getElementById("ifCollect").className=='mui-icon iconfontnew icon-yishoucang'){
510
				cancelCollectionAbout(resourceId, 2)
520
			if(oifCollect.className=='mui-icon iconfontnew icon-yishoucang'){
521
				cancelCollectionAbout(resourceId,oifCollect,2);
511 522
			} else {
512
				collectionAbout(resourceId, 2);
523
				collectionAbout(resourceId,oifCollect,2);
513 524
			}
514 525
		}else{
515 526
			isLogin();
516 527
		}
517 528
	});
518
	/*判断是否收藏资源文章或者是否关注专家*/
519
	function ifcollectionAbout(watchObject,num) {
520
		mui.ajax(baseUrl + '/ajax/watch/hasWatch', {
521
			data: {
522
				"professorId": userid,
523
				"watchObject": watchObject
524
			},
525
			dataType: 'json', //数据格式类型
526
			type: 'get', //http请求类型
527
			timeout: 10000,
528
			async: false,
529
			success: function(data) {
530
				if(data.success && data.data != null) {
531
					if(num=="1"){//已关注专家
532
						oattenSpan.classList.add("attenedSpan");
533
						oattenSpan.innerText="已关注";
534
					}else{//已收藏资源或文章
535
						document.getElementById("ifCollect").classList.remove("icon-shoucang");
536
						document.getElementById("ifCollect").classList.add("icon-yishoucang");
537
					}
538
				} else {
539
					if(num=="1"){//关注专家
540
						oattenSpan.classList.remove("attenedSpan");
541
						oattenSpan.innerText="关注";
542
					}else{//收藏资源或文章
543
						document.getElementById("ifCollect").classList.add("icon-shoucang");
544
						document.getElementById("ifCollect").classList.remove("icon-yishoucang");
545
					}
546
				}
547
			},
548
			error: function() {
549
				plus.nativeUI.toast("服务器链接超时", toastStyle);
550
			}
551
		});
552
	}
553

554
	/*收藏资源、文章或者关注专家*/
555
	function collectionAbout(watchObject, num) {
556
		mui.ajax(baseUrl + '/ajax/watch', {
557
			data: {
558
				"professorId": userid,
559
				"watchObject": watchObject,
560
				"watchType": num
561
			},
562
			dataType: 'json', //数据格式类型
563
			type: 'POST', //http请求类型
564
			timeout: 10000,
565
			async: false,
566
			success: function(data) {
567
				if(data.success) {
568
					if(num=="1"){//关注专家
569
						oattenSpan.classList.add("attenedSpan");
570
						oattenSpan.innerText="已关注";
571
						plus.nativeUI.toast("关注成功", toastStyle);
572
					}else{//收藏资源或文章
573
						document.getElementById("ifCollect").classList.remove("icon-shoucang");
574
						document.getElementById("ifCollect").classList.add("icon-yishoucang");
575
						plus.nativeUI.toast("收藏成功", toastStyle);
576
					}
577
				}
578
			},
579
			error: function() {
580
				plus.nativeUI.toast("服务器链接超时", toastStyle);
581
			}
582
		});
583
	}
584

585
	/*取消收藏资源、文章或者取消关注专家*/
586
	function cancelCollectionAbout(watchObject, num) {
587
		mui.ajax({
588
			url: baseUrl + '/ajax/watch/delete',
589
			data: {
590
				professorId: userid,
591
				watchObject: watchObject
592
			},
593
			dataType: 'json', //数据格式类型
594
			type: 'post', //http请求类型
595
			timeout: 10000,
596
			async: true,
597
			success: function(data) {
598
				console.log(data.success)
599
				if(data.success) {
600
					if(num=="1"){//关注专家
601
						oattenSpan.classList.remove("attenedSpan");
602
						oattenSpan.innerText="关注";
603
						plus.nativeUI.toast("已取消关注", toastStyle);
604
					}else{//收藏资源或文章
605
						document.getElementById("ifCollect").classList.add("icon-shoucang");
606
						document.getElementById("ifCollect").classList.remove("icon-yishoucang");
607
						plus.nativeUI.toast("已取消收藏", toastStyle);
608
					}
609
					
610
				}
611
			},
612
			error: function(data) {
613
				plus.nativeUI.toast("服务器链接超时", toastStyle);
614
			}
615
		});
616

617
	}
529
	
618 530
   /*微信及微信朋友圈分享专家*/
619 531
	var auths, shares;
620 532
	plus.oauth.getServices(function(services) {

+ 1 - 1
app/js/searchListNew2.js

@ -168,7 +168,7 @@ for(var n=0;n<6;n++) {
168 168
						for(var n = 0; n < data.data[i].researchAreas.length; n++) {
169 169
							arr[n] = data.data[i].researchAreas[n].caption;
170 170
						}
171
						oSub = "研究方向:" + arr.join(",");
171
						oSub = "研究方向:" + arr.join("");
172 172
					}
173 173
					li.setAttribute("data-id", data.data[i].id);
174 174
					li.setAttribute("data-flag", 1);

+ 18 - 26
app/js/userInforShow.js

@ -209,7 +209,7 @@ mui.plusReady(function() {
209 209
							} else {
210 210
								oString += '<div class="madiaHead resouseHead"></div>'
211 211
							}
212
							oString += '<div class="madiaInfo OmadiaInfo"><p class="mui-ellipsis h1Font">' + obj[i].resourceName + '</p><p class="h2Font mui-ellipsis">用途:' + obj[i].supportedServices + '</p>'
212
							oString += '<div class="madiaInfo OmadiaInfo"><p class="mui-ellipsis h1Font">' + obj[i].resourceName + '</p><p class="h2Font mui-ellipsis-2">用途:' + obj[i].supportedServices + '</p>'
213 213
							oString += '</div></div>'
214 214
							liItem.innerHTML = oString;
215 215
							document.getElementById("resourceShow").appendChild(liItem);
@ -255,6 +255,7 @@ mui.plusReady(function() {
255 255
								oString += '<div class="madiaHead artHead"></div>'
256 256
							}
257 257
							oString += '<div class="madiaInfo OmadiaInfo"><p class="mui-ellipsis-2 h1Font">' + obj[i].articleTitle + '</p>'
258
							oString += '<p class="h2Font mui-ellipsis"><span class="time">'+commenTime(obj[i].publishTime)+'</span></p>'
258 259
							oString += '</div></div>'
259 260
							liItem.innerHTML = oString;
260 261
							document.getElementById("articelShow").appendChild(liItem);
@ -295,7 +296,7 @@ mui.plusReady(function() {
295 296
							li.innerHTML = '<div class="flexCenter OflexCenter mui-clearfix">' +
296 297
								'<div class="madiaHead paperHead"></div>' +
297 298
								'<div class="madiaInfo OmadiaInfo">' +
298
								'<p class="mui-ellipsis h1Font">' + obj[i].name + '</p>' +
299
								'<p class="mui-ellipsis-2 h1Font">' + obj[i].name + '</p>' +
299 300
								'<p class="mui-ellipsis h2Font">' + obj[i].authors.substring(0, obj[i].authors.length - 1) + '</p>' +
300 301
								'</div>' +
301 302
								'</div>'
@ -336,7 +337,7 @@ mui.plusReady(function() {
336 337
							li.innerHTML = '<div class="flexCenter OflexCenter mui-clearfix">' +
337 338
								'<div class="madiaHead patentHead"></div>' +
338 339
								'<div class="madiaInfo OmadiaInfo">' +
339
								'<p class="mui-ellipsis h1Font">' + obj[i].name + '</p>' +
340
								'<p class="mui-ellipsis-2 h1Font">' + obj[i].name + '</p>' +
340 341
								'<p class="mui-ellipsis h2Font">' + obj[i].authors.substring(0, obj[i].authors.length - 1) + '</p>' +
341 342
								'</div>' +
342 343
								'</div>'
@ -437,7 +438,10 @@ mui.plusReady(function() {
437 438
						var ExpId = data.data[i].professorId;
438 439
						var paperN=data.data[i].paperCount;
439 440
						var patentN=data.data[i].patentCount;
440
						relExpertsList(ExpId,paperN,patentN);
441
						var liItem=document.createElement("li");
442
						liItem.className="mui-table-view-cell flexCenter";
443
						document.getElementById("relatePro").appendChild(liItem);
444
						relExpertsList(ExpId,paperN,patentN,liItem);
441 445
					}
442 446
					
443 447
				}
@ -448,7 +452,7 @@ mui.plusReady(function() {
448 452
			}
449 453
		});
450 454
	}
451
	function relExpertsList(Id,numL,numZ){
455
	function relExpertsList(Id,numL,numZ,liItem){
452 456
		mui.ajax(baseUrl + "/ajax/professor/info/"+Id, {
453 457
			"type" :  "GET" ,
454 458
			"dataType" : "json",
@ -495,17 +499,14 @@ mui.plusReady(function() {
495 499
						}
496 500
					}
497 501
					var userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
498
					var add = document.createElement("li");
499
					add.className = "mui-table-view-cell flexCenter";
500
					add.setAttribute("data-id",data.data.id)
501 502
					var itemlist = '<div class="madiaHead useHead" style="background-image:url('+thisImg+')"></div>';
502 503
						itemlist += '<div class="madiaInfo">';
503 504
						itemlist += '<p><span class="h1Font" id="userName">'+data.data.name+'</span><em class="authicon '+userType.sty+'" title="'+userType.title+'"></em></p>';
504 505
						itemlist += '<p class="mui-ellipsis h2Font">'+thisTit+'</p>';
505 506
						itemlist += '<p class="h2Font mui-ellipsis">'+copNum+'</p>';
506 507
						itemlist += '</div>';
507
					add.innerHTML = itemlist
508
					document.getElementById("relatePro").appendChild(add);
508
					liItem.innerHTML = itemlist
509
					liItem.setAttribute("data-id",data.data.id)
509 510
				}
510 511
			},
511 512
			error: function() {
@ -558,24 +559,14 @@ mui.plusReady(function() {
558 559
										}else{
559 560
											thisName=data.data.name;
560 561
										}
561
										if(StrData[n].articleType==1) {
562
											userType = autho(data.data.authType, data.data.orgAuth, data.data.authStatus);
563
											thisTitle = userType.title;
564
											thisAuth = userType.sty;
565
										}else {
566
											if(data.data.authStatus==3) {
567
												thisTitle = "科袖认证企业";
568
												thisAuth = "authicon-com-ok";
569
											}
570
										}
571 562
										var add = document.createElement("li");
572 563
										add.className = "mui-table-view-cell"; 
573 564
										add.setAttribute("data-id",StrData[n].articleId);
574 565
										add.setAttribute("owner-id", StrData[n].professorId);
575 566
										var itemlist = '<div class="flexCenter OflexCenter"><div class="madiaHead artHead" style="background-image:url('+imgL+')"></div>';
576 567
											itemlist += '<div class="madiaInfo OmadiaInfo">';
577
											itemlist += '<p class="mui-ellipsis h2Font" id="usertitle">'+StrData[n].articleTitle+'</p>';
578
											itemlist += '<p><span class="h1Font">'+thisName+'</span><em class="authicon '+thisAuth+'" title="'+thisTitle+'"></em></p>';
568
											itemlist += '<p class="mui-ellipsis-2 h2Font" id="usertitle">'+StrData[n].articleTitle+'</p>';
569
											itemlist += '<p><span class="h2Font" style="margin-right:10px">'+thisName+'</span><span class="time">'+commenTime(StrData[n].publishTime)+'</span></p>';
579 570
											itemlist += '</div></div>';
580 571
											
581 572
										add.innerHTML=itemlist;
@ -664,7 +655,7 @@ mui.plusReady(function() {
664 655
					}
665 656
					var itemlist = '<div class="madiaHead useHead" style="background-image:url('+imgL+')"></div>';
666 657
						itemlist += '<div class="madiaInfo">';
667
						itemlist += '<p><span class="h1Font">'+data.data.name+'</span><em class="authicon '+userType.sty+'" title="'+userType.title+'"></em></p>';
658
						itemlist += '<p class="mui-ellipsis"><span class="h1Font">'+data.data.name+'</span><em class="authicon '+userType.sty+'" title="'+userType.title+'"></em></p>';
668 659
						itemlist += '<p class="mui-ellipsis h2Font">'+otherI+'</p>';
669 660
						itemlist += '</div>';
670 661
					add.innerHTML=itemlist;
@ -798,7 +789,8 @@ mui.plusReady(function() {
798 789
	ozixun.addEventListener('tap', function() {
799 790
		isLogin();
800 791
	});
801
	ifcollectionAbout(proId, '1');
792
	var oifAttend=document.getElementById("ifAttend")
793
	ifcollectionAbout(proId,oifAttend,1);
802 794
	document.getElementById('ifAttend').addEventListener("tap", function() {
803 795
		if(!userid) {
804 796
			mui.openWindow({
@ -814,9 +806,9 @@ mui.plusReady(function() {
814 806
			return;
815 807
		}
816 808
		if(this.className == "mui-icon iconfontnew icon-yishoucang") {
817
			cancelCollectionAbout(proId, '1');
809
			cancelCollectionAbout(proId,this, 1);
818 810
		} else {
819
			collectionAbout(proId, '1');
811
			collectionAbout(proId,this,1);
820 812
		}
821 813

822 814
	})