Browse Source

发现 问答

XMTT 7 years ago
parent
commit
ce1e21ab99
1 changed files with 16 additions and 11 deletions
  1. 16 11
      js/discover.js

+ 16 - 11
js/discover.js

@ -456,19 +456,24 @@ $(function() {
456 456
	}
457 457

458 458
	function otherQa(dataStr,listLi){
459
        var hd = "";
460
        if (dataStr.replyCount > 0) {
461
            hd = '<span>' + dataStr.replyCount + '回答</span>'
462
        }
463
        var strAdd = '<a target="_blank" href="qa-question-show.html?id='+dataStr.id+'" class="flexCenter urlgo">'+
464
        			'<div class="madiaInfo" style="padding-left:0">'+
465
					'<p class="h1Font ellipsisSty qa-question"></p>' +
466
					'<div class="flexCenter qa-owner"></div>' +
467
					'<p class="qa-con ellipsisSty-3">' + (dataStr.cnt).replace(/\n/g,"<br />") + '</p>'+
468
					'<div class="showspan"><span>' + commenTime(dataStr.createTime) + '</span>' + hd +'<span class="leaveMsgCount"></span></div>'+
469
					'</div></a>'
459
        var strAdd = '<li class="mui-table-view-cell">' +
460
            '<div class="madiaInfo" style="padding-left:0">' +
461
            '<p class="h1Font ellipsisSty qa-question"></p>' +
462
            '<div class="flexCenter qa-owner">' +
463
            '</div>' +
464
            '<p class="qa-con ellipsisSty-3">' + dataStr.cnt +'</p>' +
465
            '<div class="showspan">' +
466
            '<span>5月8日 18:00</span>' +
467
            '<span class="agree"></span>' +
468
            '<span class="leaveMsgCount"></span>' +
469
            '</div>' +
470
            '</div>' +
471
            '</li>';
470 472
		var $str = $(strAdd);
471 473
		listLi.append($str);
474
        if(dataStr.agree > 0) {
475
            $str.find(".agree").html(dataStr.agree + "赞	");
476
        }
472 477
		questioninfo(dataStr.qid, $str);
473 478
        proinfo(dataStr.uid, $str);
474 479
		leaveMsgCount(dataStr.id, $str);