Browse Source

修改文章h5感兴趣的文章显示不出来

luyanan 7 years ago
parent
commit
669dd0c968
3 changed files with 24 additions and 20 deletions
  1. 3 1
      css/share.css
  2. 11 9
      e/a.html
  3. 10 10
      js/cmpInforShow.js

+ 3 - 1
css/share.css

@ -73,6 +73,7 @@ html,body {outline: 0;margin:0;padding:0px;background: #efeff4;-webkit-text-size
73 73
.showDetail .h1Font{font-size:20px;margin:8px 0;line-height:30px;color:#333;}
74 74
.showDetail .showFont{font-size:16px;margin-top:-4px; line-height:24px;color:#333;}
75 75
.showDetail .h2Font{font-size:14px;color:#666; line-height:16px;}
76
.showDetail .madiaInfo .h2Font{font-size:14px;color:#999;}
76 77
.showDetail .h3Font{font-size:13px;color:#999; line-height:24px;}
77 78
.showDetail .showMain{font-size:15px;color:#333;line-height:28px;}
78 79
.showDetail .showMain img{max-width: 100%;}
@ -104,6 +105,7 @@ ul.tagList>li .h2Font{color: #666;}
104 105
.madiaBlock .flexCenter.OflexCenter{min-height:72px;}
105 106
.madiaBlock .madiaInfo .h1Font{font-size: 16px;margin:0;line-height:24px;}
106 107
.madiaBlock .madiaInfo .ellipsisSty-2{max-height: 44px;}
108
.madiaBlock .madiaInfo .time{font-size:14px;color:#999;}
107 109
/*点赞模块*/
108 110
.thumbBlock{text-align: center;margin:30px 0;}
109 111
.thumbBlock .thumbBtn{display:inline-block;position:relative;padding:10px 24px;padding-left:44px;font-size:16px;color:#fff;background:url(../images/g_article_icon_dianzan_nor.png) no-repeat 24px center;background-size:16px 16px;background-color:#ff9900;border-radius:30px;cursor: pointer;}
@ -195,7 +197,7 @@ ul.tagList>li .h2Font{color: #666;}
195 197
.infocon ul{ padding:0; margin: 0; overflow: hidden;}
196 198
.infocon ul>li{list-style: none;}
197 199
ul.mui-table-view>li{position: relative;overflow: hidden; padding: 11px 0px;}
198
ul.mui-table-view>li:after{position: absolute;right: 0;bottom: 0;left:0px;height: 1px;content: '';-webkit-transform: scaleY(.5);transform: scaleY(.5); background-color: #c8c7cc;}
200
ul.mui-table-view>li:after{position: absolute;right: 0;bottom: 0;left:0px;height: 1px;content: '';-webkit-transform: scaleY(.5);transform: scaleY(.5); background-color: #E5E5E5;}
199 201
ul.mui-table-view>li:last-child:after{background: none;}
200 202
.infocon.listArea>ul{overflow: hidden;margin-right: -10px;margin-top:-10px;}
201 203
.infocon.listArea>ul>li{float: left;margin-right: 10px;margin-top:10px;border:1px solid #E5E5E5;border-radius:6px;padding:2px 12px;}

+ 11 - 9
e/a.html

@ -181,7 +181,7 @@
181 181
						var oLi = document.createElement("li");
182 182
						oLi.innerHTML = '<span class="h2Font">' + arr[i] + '</span>'
183 183
						document.getElementsByClassName("tagList")[0].appendChild(oLi);
184
					}
184
					}
185 185
				}
186 186
				document.getElementById("snum").innerHTML = $data.articleAgree;
187 187
				document.getElementById("oTime").innerHTML = commenTime($data.publishTime);
@ -257,16 +257,16 @@
257 257
				} else {
258 258
					if($data.office) {
259 259
						if($data.orgName) {
260
							os = $data.office + "," + $data.orgName;
260
							os = $data.office + "," + $data.orgName;
261 261
						} else {
262 262
							os = $data.office;
263
						}
263
						}
264 264
					} else {
265 265
						if($data.orgName) {
266
							os = $data.orgName;
266
							os = $data.orgName;
267 267
						}
268 268
					}
269
				}
269
				}
270 270
				var baImg = "../images/default-photo.jpg";
271 271
				if($data.hasHeadImage == 1) {
272 272
					baImg = "/images/head/" + $data.id + "_l.jpg";
@ -326,12 +326,11 @@
326 326
				document.getElementById("resourceList").appendChild(li);
327 327
			},
328 328
			correlationArticle: function($data) {
329
	
330 329
				if($data.length == 0) {
331 330
					return;
332 331
				}
333 332
				document.getElementById('article').classList.remove("displayNone");
334
				for(var i = 0; i < 5; i++) {
333
				for(var i = 0; i < $data.length; i++) {
335 334
					var ourl, of ;
336 335
					if($data[i].articleType == 1) {
337 336
						ourl = "/ajax/professor/editBaseInfo/" + $data[i].professorId; of = 1;
@ -375,13 +374,15 @@
375 374
									li.setAttribute("data-type", 2);
376 375
								}
377 376
								li.setAttribute("data-id", $data[i].articleId);
377
								li.className = "mui-table-view-cell";
378 378
								li.innerHTML = '<div class="flexCenter OflexCenter clearfix">' +
379 379
									'<div class="madiaHead artHead" style="background-image:url(' + arImg + ')"></div>' +
380 380
									'<div class="madiaInfo OmadiaInfo">' +
381 381
									'<p class="ellipsisSty-2 h1Font">' + title + '</p>' +
382
									'<p><span class="h2Font" style="margin-right:10px;">' + namepo + '</span><span class="time">'+commenTime($html[n].publishTime)+'</span></p>'+
382
									'<p><span class="h2Font" style="margin-right:10px">'+namepo+'</span><span class="time">'+commenTime($data[i].publishTime)+'</span></p>'+
383 383
									'</div>' +
384 384
									'</div>'
385
								
385 386
								document.getElementById("articleList").appendChild(li);
386 387
							}
387 388
						},
@ -581,6 +582,7 @@
581 582
		});
582 583
	})
583 584
</script>
585

584 586
</body>
585 587

586
</html>
588
</html>

+ 10 - 10
js/cmpInforShow.js

@ -325,16 +325,16 @@ $(function() {
325 325
					} else {
326 326
						$("#item3user  .nodatabox").show();
327 327
						$("#item3user  .nodatabox").find(".noContip").text("企业尚未发布任何文章");
328
						var i = 0;
329
						$("#item1user").find('.coninfobox').each(function() {
330
							if($(this).css("display") == "none") {
331
								i++;
332
							}
333
						})
328
						var i = 0;
329
						$("#item1user").find('.coninfobox').each(function() {
330
							if($(this).css("display") == "none") {
331
								i++;
332
							}
333
						})
334 334
						if(i == 4) {
335
							$("#item1user").hide();
336
							$(".navconBox ul>li").eq(3).addClass("liNow").siblings().removeClass("liNow");
337
							$("#item6user").show();
335
							$("#item1user").hide();
336
							$(".navconBox ul>li").eq(3).addClass("liNow").siblings().removeClass("liNow");
337
							$("#item6user").show();
338 338
						}
339 339
					}
340 340
				}
@ -535,7 +535,7 @@ $(function() {
535 535
				if (data.success && data.data!=""){
536 536
					$("#relateCmp").parents(".conBlock").removeClass("displayNone");
537 537
					var itemlist = '<li class="flexCenter"><a traget="_blank" href="" class="urlgo">';
538
						itemlist += '<div class="madiaHead cmpHead" style="width:50px;height:36px;margin-top:-18px;"><div class="boxBlock" style="width: 48px;height: 34px;">';
538
						itemlist += '<div class="madiaHead cmpHead" style="width:50px;height:36px;margin-top:-18px;"><div class="boxBlock" style="width: 50px;height: 36px;">';
539 539
						itemlist += '<img class="boxBlockimg" id="userimg" src="" /></div></div>';
540 540
						itemlist += '<div class="madiaInfo">';
541 541
						itemlist += '<p class="clearfix"><span class="h1Font ellipsisSty floatL" style="display:block;max-width:136px" id="userName"></span><em class="authiconNew floatL" title=""></em></p>';