<divclass="container margin-top over-hidden">
<divclass="xl12 xb12 over-hidden">
<styletype="text/css">
.slideTxtBox{ width:100%; text-align:left; }
.slideTxtBox .hd{ height:38px; line-height:27px; position:relative; overflow:hidden }
.slideTxtBox .hd ul{left:10px; float:left; position:absolute; top:3px; height:39px;over-flow:hidden;}
.slideTxtBox .hd ul li{height:40px; float:left;color:#fff;padding:0px 7px 0px 6px; cursor:pointer; }
.slideTxtBox .hd ul li a{color:#fff; }
.slideTxtBox .hd ul li.on
{background:url({dede:global.cfg_templets_skin/}/images/bg5.png) repeat-x; }
.slideTxtBox .hd ul li.on a{color:#555}
.slideTxtBox .bd ul{zoom:1;padding-bottom:50px;display:none;position:relative;min-height:100px}
.slideTxtBox .bd li{ height:24px; line-height:24px; }
</style>
<divid="slideTxtBox"class="slideTxtBox padding00"style="overflow:visible !important;">
<divclass="hd bg-main pr">
<ulid="tab"class="border-top border-main border-big">
<liclass="on"id=""><ahref="javascript:"onclick="javascript:loadMoreApply(1,0);">全部</a></li>
{dede:channel type='top'row='50' }
<liid="tab[field:id/]"><ahref="javascript:"onclick="javascript:change_tab([field:id/]);loadMoreApply(1,[field:id/]);" >[field:typename/]</a></li>
{/dede:channel}
</ul>
<spanclass="icon-angle-down text-white width30 padding-left10 ib text-22 top7 right2 bg-main"data-target="#navbar2">
</span>
</div>
<divclass="navbar-body margin-top6 hidden ib"id="navbar2">
<ulclass="nav nav-inline nav-menu ">
{dede:channelartlist typeid="top"row='33' }
<liclass="{dede:field.active/}">
<ahref="javascript:"onclick="javascript:change_tab({dede:field.typeid/});loadMoreApply(1,{dede:field.typeid/});">
{dede:field name="typename"/}
</a>
</li>
{/dede:channelartlist}
</ul>
</div>
<divclass="bd"id="slideTxtBox-bd">
<ulid="0"class="show">
{dede:arclist row='2'titlelen='100'orderby='id' }
<divclass="bg-fff width-100 ib pr">
<divclass="xl12 padding10">
<divclass="media media-x">
<aclass="float-left"href="[field:arcurl/]">
<imgsrc="[field:litpic/]"width="80"class="radius"alt="[field:title/]">
</a>
<divclass="media-body"style="width:900px;height:;">
<strong>[field:title/]</strong>
<divstyle="height:5px;"></div>
<span>
<spanclass=" cursor icon-click"></span>
<scriptsrc="/plus/count_list.php?view=yes&aid=[field:id/]"type='text/javascript'language="javascript"></script></span>
<spanid="diggNum[field:id/]"><ahref="javascript:"class=" text-bbb text-16 width33 " onclick="javascript:postDigg('good',[field:id/])"><spanid="digg[field:id/]"class="icon-heart2 "></span></a>[field:goodpost/]
</span>
<divstyle="height:12px;"></div>
<aclass="button bg-gray button-little radius-none margin-right2 text-12"href="javascript:"onclick="javascript:change_tab([field:typeid/]);loadMoreApply(1,[field:typeid/]);">[field:typename/]</a>[field:typeid2 function="get_url_by_typeid2(@me)"/]
</div>
</div>
</div>
<aclass="button bg-main button-small right5 text-white ib pa text-14"href="javascript:;" onclick="showtip('[field:title/]')"style="top:40px">进入小程序</a>
</div>
{/dede:arclist}
<pclass="text-center margin-bottom bottom0 right width-100"><aonclick="javascript:loadMoreApply(1,0);"href="javascript:"class="button radius-rounded border-main"id="0data">加载更多</a></p>
</ul>
{dede:channel type='top'row='25' }
<ulid="[field:id/]">
<pclass="text-center bottom0 margin-bottom margin-big-top width-100"><aonclick="javascript:loadMoreApply(1,[field:id/]);"href="javascript:" class="button radius-rounded border-main"id="[field:id/]data">加载更多</a></p>
</ul>
{/dede:channel}
</div>
</div>
<scripttype="text/javascript">
var tabs=document.getElementById("tab").getElementsByTagName("li");
var divs=document.getElementById("slideTxtBox-bd").getElementsByTagName("ul");
for(var i=0;i<tabs.length;i++){
tabs[i].onclick=function(){change(this);}
}
function change(obj){
for(var i=0;i<tabs.length;i++)
{
if(tabs[i]==obj){
tabs[i].className="on";
divs[i].className="show";
}
else{
tabs[i].className="";
divs[i].className="";
}
}
}
//所属分类切换
function change_tab(typeid){
$("#tab"+typeid).siblings("li").removeClass("on");
$("#tab"+typeid).addClass("on");
$("#"+typeid).siblings("ul").removeClass("show");
$("#"+typeid).addClass("show");
}
</script>
</div>
</div>
<scripttype="text/javascript">
$('.icon-angle-down').each(function() {
var e = $(this);
var target = e.attr("data-target");
e.click(function() {
$(target).toggleClass("hidden");
});
});
var loadConfig = {
url_api:'/plus/list.php',
//typeid:{dede:field name="typeid"/},
pagesize:2,
loading : 0
}
var page0=2;
{dede:channel type='top'row='25' }
var page[field:id/]=1;
{/dede:channel}
function loadMoreApply(orderby,typeid){
$("#navbar2").addClass("hidden");
eval(" page =page"+typeid+";");
var pagesize = loadConfig.pagesize;
var url = loadConfig.url_api,
data={ajax:'pullload',typeid:typeid,page:page,pagesize:pagesize,orderby:orderby};
function ajax(url, data) {
$.ajax({url: url,data: data,async: false,type: 'GET',dataType: 'json',success: function(data) {
addContent(data,typeid);
}});
}
ajax(url,data);
}
function addContent (rs,typeid){
if(rs.statu== 1){
var data = rs.list;
var total = rs.total;
var arr=[];
var length = data.length;
for(var i=0;i<length;i++){
arr.push('<divclass="bg-fff width-100 ib pr">');
arr.push('<divclass="xl12 padding10"><divclass="media media-x"><aclass="float-left"href="'+data[i].arcurl+'"><imgsrc="'+data[i].picname+'"width="80"class="radius"alt="'+data[i].title+'"></a><divclass="media-body"style="width:900px"><strong>'+data[i].title+'</strong><divstyle="height:5px;"></div><span><spanclass=" cursor icon-click"></span>'+data[i].click+'</span>');
arr.push('<spanid="diggNum'+data[i].id+'"><ahref="javascript:"class=" text-bbb text-16" onclick="javascript:postDigg(\'good\','+data[i].id+');"><spanid="digg'+data[i].id+'"class="icon-heart2 "></span></a>'+data[i].goodpost+'</span><divstyle="height:12px;"></div>');
arr.push('<aclass="button bg-gray button-little radius-none margin-right2 text-12"href="javascript:"onclick="javascript:change_tab('+data[i].typeid+');loadMoreApply(1,'+data[i].typeid+');">'+data[i].typename+'</a>'+data[i].typeid2+'</div></div></div><aclass="button bg-main button-small right5 text-white ib pa text-14"href="javascript:;" onclick="showtip(\''+data[i].title+'\')"style="top:40px">进入小程序</a></div>');
}
$('#'+typeid).append(arr.join(''));
loadConfig.load_num = rs.load_num;
if(total<page*loadConfig.pagesize || page> loadConfig.load_num){
//$('#'+typeid).append('<pclass="text-center margin-top"><ahref="javascript:"class="button radius-rounded border-main width-20"id="'+typeid+'data">没有了!</a></p>');
$("#"+typeid+"data").html('没有了!');
}else{
//$('#'+typeid).append('<pclass="text-center margin-top"><ahref="javascript:"class="button radius-rounded border-main width-20"id="'+typeid+'data">加载更多</a></p>');
}
eval("page"+typeid+" ++;");
}else{
$("#"+typeid+"data").html('没有了!');
}
}
$(document).ready(function(){
loadMoreApply(1,0);
$('.copy-lay .close2').click(function(){
$('.alert2').hide();
});
$('.alert2').click(function(e){
if( $(e.target).parents().hasClass('copy-lay') ){
return;
}else{
$(this).hide();
}
});
});
function showtip(title){
$('#alerttip,#copyBtn').html(title);
$('.alert2').show();
}
</script>
{dede:sql sql='Select * from `myppttype` where id=2'}
<divclass="alert2 alert-copy">
<divclass="copy-lay"style="[field:other/]">
<spanclass="close2"></span>
<divclass="copy"id="copyBtn"></div>
<divclass="copy-layer-img"style="background: url('[field:pic/]') no-repeat; -o-background-size: contain; background-size: contain; "></div>
</div>
</div>
{/dede:sql}