Browse Source

文章添加发布时间

luyanan 7 years ago
parent
commit
7700d68e30
3 changed files with 13 additions and 12 deletions
  1. 1 0
      css/genindex.css
  2. 10 10
      js/articalShow.js
  3. 2 2
      js/resourceShow.js

+ 1 - 0
css/genindex.css

@ -315,6 +315,7 @@ ul.artAbout .frmadd{width:auto;position:absolute;right:0;top:0;background: #ff99
315 315
.form-item .madiaInfo{width:100%;padding-left:62px;margin:2px 0;}
316 316
.form-item ul .h1Font{font-size:16px;color:#333;line-height: 20px;margin-bottom:4px;}
317 317
.form-item ul .h2Font{font-size:14px;color:#666;line-height: 22px;}
318
.form-item ul .time{font-size:14px;color:#666;line-height: 22px;}
318 319
.form-item ul .h3Font{font-size:13px;color:#999;line-height:20px;}
319 320
.form-item ul .circlePre{display: inline-block;content:"";width:5px;height: 5px;border-radius: 50%;background:#ff9900;position: relative;top:-3px;margin-right:5px;}
320 321
.form-drop>ul>li{position:relative;min-height:76px;padding:12px;cursor:pointer;background: #FFFFFF;}

+ 10 - 10
js/articalShow.js

@ -230,9 +230,9 @@ $(function() {
230 230
						itemlist += '</div></a></li>';
231 231
						$itemlist = $(itemlist);
232 232
						$("#relevantExperts").append($itemlist);
233
						if(data.data.title) {
233
						if(data.data.title) {
234 234
							if(data.data.orgName) {
235
								$itemlist.find("#usertitle").text(data.data.title +","+ data.data.orgName);
235
								$itemlist.find("#usertitle").text(data.data.title +","+ data.data.orgName);
236 236
							}else{
237 237
								$itemlist.find("#usertitle").text(data.data.title);
238 238
							}
@ -243,14 +243,15 @@ $(function() {
243 243
								}else{
244 244
									$itemlist.find("#usertitle").text(data.data.office);
245 245
								}
246
							}else{
246
							}else{
247 247
								if(data.data.orgName) {
248
									$itemlist.find("#usertitle").text(data.data.orgName);
248
									$itemlist.find("#usertitle").text(data.data.orgName);
249 249
								}
250 250
							}
251 251
						}
252
						$itemlist.find("#userName").text(data.data.name);				
253
						$itemlist.find(".urlgo").attr("href", "userInforShow.html?professorId="+data.data.id);
252
						$itemlist.find("#userName").text(data.data.name);
253
						
254
						$itemlist.find(".urlgo").attr("href", "userInforShow.html?professorId="+data.data.id);
254 255
						/*获取研究方向信息*/
255 256
						var researchAreas = data.data.researchAreas;
256 257
						if(researchAreas != ""){
@ -476,7 +477,7 @@ $(function() {
476 477
							itemlist += '<div class="madiaHead artHead" id="userimg"></div>';
477 478
							itemlist += '<div class="madiaInfo">';
478 479
							itemlist += '<p class="h1Font ellipsisSty" id="resourceName"></p>';
479
							itemlist += '<p><span class="h2Font username2"></span><em class="authiconNew" id="relatedLabels" title="科袖认证专家"></em></p>';
480
							itemlist += '<p><span class="h2Font username2" style="margin-right:10px"></span><span class="time"></span></p>';
480 481
							itemlist += '</div></a></li>';
481 482
							$itemlist = $(itemlist);
482 483
							$("#abutartical").append($itemlist);
@ -486,6 +487,7 @@ $(function() {
486 487
							if(datalist.articleImg!=undefined){
487 488
								$itemlist.find("#userimg").attr("style", "background-image: url(/data/article/" + datalist.articleImg + ");");
488 489
							}
490
							$itemlist.find(".time").text(commenTime(datalist.publishTime))
489 491
							if(datalist.articleType==1){
490 492
								$.ajax({
491 493
									"url" : "/ajax/professor/baseInfo/"+datalist.professorId,
@ -495,9 +497,7 @@ $(function() {
495 497
									"success" : function($data) {
496 498
										if ($data.success && $data.data){
497 499
											$itemlist.find(".username2").text($data.data.name);
498
											var userType = autho($data.data.authType, $data.data.orgAuth, $data.data.authStatus);
499
											$itemlist.find("#relatedLabels").attr("title", userType.title);
500
											$itemlist.find("#relatedLabels").addClass(userType.sty);
500
											
501 501
										}
502 502
									},
503 503
									"error":function(){

+ 2 - 2
js/resourceShow.js

@ -304,7 +304,7 @@ $(document).ready(function() {
304 304
					}
305 305
					str += '<div class="madiaInfo"  style="margin-top:18px;padding-bottom:8px">'
306 306
					str += '<p class="h1Font ellipsisSty">' + $html.articleTitle + '</p>'
307
					str += '<p><span class="h2Font">' + cmpname + '</span><em class="authiconNew ' + stl.sty + '" title="' + stl.title + '"></em></p>'
307
					str += '<p><span class="h2Font" style="margin-right:10px">'+ cmpname +'</span><span class="time">'+commenTime($html.publishTime)+'</span></p>'
308 308
					str += '</div></a></li>'
309 309
					$("#oArticle").append(str);
310 310
				}
@ -640,4 +640,4 @@ $(document).ready(function() {
640 640
	})
641 641
	
642 642
	
643
})
643
})