有房首页添加广告

This commit is contained in:
xuhe@fangjia.com
2018-05-30 17:32:05 +08:00
parent 7b2aad5883
commit 0b089f5c89
4 changed files with 26 additions and 5 deletions
+6 -2
View File
@@ -507,14 +507,15 @@ input::-webkit-input-placeholder{
.cardInfo01b .card-footer span{font-size:0.7rem;color:#999;display:inline-block;width:100%;word-wrap:break-word;white-space:normal;}
.cardInfo01c .card-footer span small{width:1.5rem;height:0.8rem;background:#F0F0F0;border-radius:0.1rem;font-size:0.55rem;text-align:center;line-height:0.8rem;display:inline-block;margin-right:0.3rem;}
.cardInfo01c .card-footer span label{font-size:0.55rem;color:#B5B5B5;line-height:0.8rem;}
.cardInfo02{padding:0.25rem 0;}
.cardInfo02 img{width:6.5rem;height:5.2rem;}
.cardInfo02 .item-content{padding:0;}
.cardInfo02 .item-title{font-size:0.85rem;white-space:normal;-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;}
.cardInfo02 .item-title{font-size:0.9rem;white-space:normal;-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;}
.cardInfo02 .item-title span{text-align:right;}
.cardInfo02 .item-subtitle font{font-size:0.7rem;white-space:normal;-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;margin:0.2rem 0;}
.cardInfo02 .item-subtitle span{font-size:0.6rem;color:#666;max-width:100%;}
.cardInfo02 .item-subtitle span{font-size:0.55rem;color:#B5B5B5;max-width:100%;}
.cardInfo02 .item-subtitle small{font-size:0.7rem;color:#999;}
.cardInfo02 .item-subtitle em{font-size:0.7rem;color:#EB5F34;}
.cardInfo02 .item-subtitle em strong{font-size:1rem;}
@@ -524,6 +525,7 @@ input::-webkit-input-placeholder{
.cardInfo02a img{width:5.8rem;height:3.6rem;}
.cardInfo02a .item-title{line-height:1.2rem;}
.cardInfo02a .item-subtitle{position:absolute;bottom:0.3rem;}
.cardInfo02a .item-subtitle span label{font-size:0.55rem;color:#B5B5B5;}
.cardInfo03 .card-header{padding-left:0;padding-right:0;font-size:0.85rem;}
.cardInfo03 .card-content-inner{padding-top:0;}
@@ -541,9 +543,11 @@ input::-webkit-input-placeholder{
.icon-eye-white{width:0.89rem;height:0.57rem;background:url(../images/icon-eye-white.png) no-repeat center center;background-size:100%;margin-right:0.3rem;vertical-align:baseline;}
.icon-eye-grey{width:0.85rem;height:0.6rem;background:url(../images/icon-eye-grey.png) no-repeat center center;background-size:100%;margin-right:0.3rem;vertical-align:baseline;}
.icon-eye-grey01{width:0.7rem;height:0.55rem;background:url(../images/icon-eye-grey01.png) no-repeat center center;background-size:100%;margin-right:0.3rem;vertical-align:baseline;}
.icon-eye-orange{width:0.7rem;height:0.5rem;background:url(../images/icon-eye-orange.png) no-repeat center center;background-size:100%;margin-right:0.3rem;vertical-align:baseline;}
.icon-comments-white{width:13px;height:12px;background:url(../images/icon-comments-white.png) no-repeat center center;background-size:100%;margin-right:0.3rem;vertical-align:baseline;}
.icon-comments-grey{width:13px;height:12px;background:url(../images/icon-comments-grey.png) no-repeat center center;background-size:100%;margin-right:0.3rem;vertical-align:baseline;}
.icon-comments-grey01{width:0.55rem;height:0.5rem;background:url(../images/icon-comments-grey01.png) no-repeat center center;background-size:100%;margin-right:0.3rem;margin-left:0.5rem;vertical-align:baseline;}
.icon-comments-orange{width:0.55rem;height:0.5rem;background:url(../images/icon-comments-orange.png) no-repeat center center;background-size:100%;margin-right:0.3rem;margin-left:0.5rem;vertical-align:baseline;}
.icon-light-grey{width:45px;height:45px;background:url(../images/icon-light-grey.png) no-repeat center center;background-size:100%;display:block;margin:0 auto;}
.icon-light-red{width:45px;height:45px;background:url(../images/icon-light-red.png) no-repeat center center;background-size:100%;display:block;margin:0 auto;}
Binary file not shown.

After

Width:  |  Height:  |  Size: 633 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

+20 -3
View File
@@ -1843,6 +1843,23 @@ function addItems(number, lastIndex) {
for(var i in dataObj){
if(i>=lastIndex){
if((dataObj.length<lastIndex + number) || (i < lastIndex + number)){
if(dataObj[i].type=="广告"){
if(dataObj[i].adUrl!=null && dataObj[i].adUrl!=""){
html += '<div class="card cardInfo cardInfo01 cardInfo01c" onclick="openUrl(\''+BASE_PATH+'/message/openView?url='+dataObj[i].adUrl+'\',\''+dataObj[i].id+'\')">';
}else{
html += '<div class="card cardInfo cardInfo01 cardInfo01c">';
}
html += '<div class="card-header">'+dataObj[i].title+'</div>'+
'<img src="cardInfoPlaceholderImg.png" onload="loadImg(\''+dataObj[i].coverImg+'\', this)">'+
'<div class="cardInfoPlaceholder dn"></div>'+
'<div class="card-footer">'+
'<span>'+
'<small>广告</small>'+'<label>'+dataObj[i].source+'</label>'+
'</span>'+
'</div>'+
'</div>';
}
if(dataObj[i].type=="专题"){
html += '<div class="card cardInfo cardInfo01" onclick="openNewsView(\''+dataObj[i].id+'\',\''+dataObj[i].type+'\')">'+
'<div class="card-header">'+dataObj[i].title+'</div>'+
@@ -1955,9 +1972,9 @@ function addItems(number, lastIndex) {
'<ul><li class="item-content">'+
'<div class="item-inner"><div class="item-title-row"><div class="item-title">'+
dataObj[i].title+'</div></div>'+
'<div class="item-subtitle"><font>'+dataObj[i].introduction+'</font></div>'+
'<div class="item-subtitle"><span><i class="icon icon-eye-orange"></i><label id="visitCount_'+dataObj[i].id+'">'+numberConver(dataObj[i].visitCount)+'人</label>'+
'<i class="icon icon-comments-orange"></i><label id="visitComment_'+dataObj[i].id+'">'+numberConver(dataObj[i].recommendCommentCount)+'条</label></span></div></div>'+
//'<div class="item-subtitle"><font>'+dataObj[i].introduction+'</font></div>'+
'<div class="item-subtitle"><span><i class="icon icon-eye-grey01"></i><label id="visitCount_'+dataObj[i].id+'">'+numberConver(dataObj[i].visitCount)+'人</label>'+
'<i class="icon icon-comments-grey01"></i><label id="visitComment_'+dataObj[i].id+'">'+numberConver(dataObj[i].recommendCommentCount)+'条</label></span></div></div>'+
'<div class="item-media"><img src="cardInfoPlaceholderImg.png" onload="loadImg(\''+dataObj[i].coverImg+'\',this)"></div>'+
'</li></ul></div></div></div>';
}