Browse Source

资源浏览页面补上浏览量,点赞量,留言量

LIPENGTAO1313 6 years ago
parent
commit
7a15d7f847
2 changed files with 14 additions and 4 deletions
  1. 13 3
      js/resourceShow.js
  2. 1 1
      resourceShow.html

+ 13 - 3
js/resourceShow.js

@ -310,6 +310,14 @@ $(document).ready(function() {
310 310
						stl.sty="";
311 311
						stl.title="";
312 312
					}
313
					var sowU=''
314
					if($html.pageViews!=0){
315
							if($html.articleAgree!=0){
316
								sowU='<span>阅读量 '+$html.pageViews+'</span><span>赞 '+$html.articleAgree+'</span>'
317
							}else{
318
								sowU='<span>阅读量 '+$html.pageViews+'</span>'
319
							}
320
						}
313 321
					var str = ""
314 322
					str += '<li data-id="' + $html.articleId + '" data-createTime="' + $html.createTime + '" data-shareId="' + $html.shareId + '"><a class="flexCenter OflexCenter">'
315 323
					if($html.articleImg) {
@ -317,11 +325,13 @@ $(document).ready(function() {
317 325
					} else {
318 326
						str += '<div class="madiaHead artHead"></div>'
319 327
					}
320
					str += '<div class="madiaInfo"  style="margin-top:18px;padding-bottom:8px">'
321
					str += '<p class="h1Font ellipsisSty">' + $html.articleTitle + '</p>'
322
					str += '<p><span class="h2Font" style="margin-right:10px">'+ cmpname +'</span><span class="time">'+commenTime($html.publishTime)+'</span></p>'
328
					str += '<div class="centercon centercon2"  style="margin-top:18px;padding-bottom:8px">'
329
					str += '<p class="h1font ellipsisSty-2">' + $html.articleTitle + '</p>'
330
					str += '<div class="h2font showInfo"><span>'+ cmpname +'</span><span>'+commenTime($html.publishTime)+'</span>'+sowU+'<span class="leaveMsgCount"></span></div>'
323 331
					str += '</div></a></li>'
332
					var $itemlist =$(str);
324 333
					$("#oArticle").append(str);
334
					leaveMsgCount($html.articleId,1,$itemlist);
325 335
				}
326 336
			},
327 337
			'dataType': "json",

+ 1 - 1
resourceShow.html

@ -113,7 +113,7 @@
113 113
						<div class="form-item otherShow displayNone">
114 114
							<div class="aboutTit">相关文章</div>
115 115
							<div class="form-result aboutRes pointOk">
116
								<ul id="oArticle">
116
								<ul id="oArticle" class="listitemdiv">
117 117
								</ul>
118 118
							</div>
119 119
						</div>