You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

176 lines
7.8 KiB
HTML

5 years ago
<extend name="Public/bases" />
<block name="css">
<link href="__CSS__/open.css" rel="stylesheet" >
</block>
<block name="body" >
<header class="header">
<div class="">
<a href="{:U('Category/index')}" class="hbtn back" ><i class="iconfont icon-drop-left"></i></a>
<h1 class="caption">{$mate_title}</h1>
</div>
</header>
<div class="occupy"></div>
<section class="trunker">
<section class="container category">
<div class="searchbox">
<form action="{:U('Category/categorydetail',array('id'=>I('request.id')))}" method="post" class="search">
<input type="text" name="name" class="text" placeholder="请输入游戏名称" value="{:I('name')}">
<span class="btn searchbtn"><i class="iconfont icon-search"></i></span>
<input type="hidden" name="" value="{:I('type')}">
</form>
</div>
<section class="list-detail c-list-detail">
<ul class="" id="ajaxContainer" currentpage="{$page}" title="{$name}" type="{$type}" maxpage="{$total}">
<empty name="data">
<li style="text-align: center;">暂无数据</li>
<else/>
<foreach name="data" item="v">
<li>
<a class="za_icongift" href="{:U('Game/detail?id='.$v['game_id'])}">
<div class="icon-wrap">
<img src="{$v['icon']}" class="icon" onerror="this.src='__IMG__/empty.jpg';this.onerror=null">
</div>
</a>
<div class="text" onclick="abc('{$v.id}')">
<div class="namebox">
<a href="" class="name">{$v['relation_game_name']}</a>
<gt name="v.game_score" value="0"><p class="stars"><i style="width:{:$v['game_score']*10}%;"></i></p></gt>
</div>
<div class="info"><span class="size">{$v['game_size']}</span><span class="dlnumber">{$v['dow_num']}查看</span></div>
<p class="description">{$v['features']|default='&nbsp;'}</p>
</div>
<div class="btnbox">
<if condition="$v['ratio'] gt 0">
<p>返利{$v['ratio']}%</p>
</if>
<if condition='$v.dow_status eq 0'>
<a class="btn disabled">查看</a>
<elseif condition='$v["down_port"] eq 1 && $v["sdk_version"] eq 1 && empty($v["and_dow_address"]) || $v["down_port"] eq 1 && $v["sdk_version"] eq 2 && empty($v["ios_dow_address"]) || $v["down_port"] eq 2 && $v["sdk_version"] eq 1 && empty($v["add_game_address"]) || $v["down_port"] eq 2 && $v["sdk_version"] eq 2 && empty($v["ios_game_address"])'/>
<a class="btn disabled">查看</a>
<else/>
<if condition='$v["down_port"] eq 2 && $v["sdk_version"] eq 2'>
<a href='{$v["ios_game_address"]}' class="btn">查看</a>
<elseif condition='$v["down_port"] eq 2 && $v["sdk_version"] eq 1' />
<a href='{$v["add_game_address"]}' class="btn">查看</a>
<else/>
<a href="javascript:" url="{:U('AjaxDown/down_file',array('game_id'=>$v['game_id'],'sdk_version'=>$v["sdk_version"]))}" class="btn down">查看</a>
</if>
</if>
</div>
</li>
</foreach>
</empty>
</ul>
</section>
</section>
</section>
<div style="display: none;" class="loading ms-none" id="moreBtn"><a href="javascript:" class="link"></a></div>
<div class="popmsg pop-dialog"></div>
<script src="__JS__/ajaxload.js"></script>
<script src="__JS__/pop.lwx.min.js"></script>
<script>
var popmsg = $('.loading').pop();
var pmsg = $(".popmsg").pop();
var ac = $('#ajaxContainer'),title = ac.attr('title'),type = ac.attr('type'),page = ac.attr('currentpage');
ajaxload('{:U("ajaxlists")}',{name:title,type:type},function(data) {
if (data.status == 1) {
ac.attr('currentpage',data.page);
var html = '',timestamp=(new Date().getTime())/1000;
$.each(data.data, function(index, item) {
var html_1='';
if(item.ratio>0){
html_1 = ' <p>返利'+item.ratio+'%</p>' ;
}
if(item.dow_status==0){
html_1 += ' <a class="btn disabled">查看</a>';
}else if((item.down_port==1&&item.sdk_version==1&&item.and_dow_address=='') || (item.down_port==1&&item.sdk_version==2&&item.ios_dow_address=='')||(item.down_port==2&&item.sdk_version==1&&item.add_game_address=='')||(item.down_port==2&&item.sdk_version==2&&item.ios_game_address=='')){
html_1 += ' <a class="btn disabled">查看</a>';
}else{
if(item.down_port==2&&item.sdk_version==2){
html_1 += ' <a href='+item.ios_game_address+' class="btn">查看</a>';
}else if(item.down_port==2&&item.sdk_version==1){
html_1 += ' <a href='+item.add_game_address+' class="btn">查看</a>';
}else{
url = "{:U('AjaxDown/down_file','',false)}";
html_1 += ' <a href="javascript:;" url="'+url+'/game_id/'+item.game_id+'/type/'+item.sdk_version+'" class="btn down">查看</a>';
}
}
var html_2 = '<p class="stars"><i style="width:'+item.game_score+'0%;"></i></p>';
html += '<li><a class="za_icongift" href="{:U('Game/detail')}&id='+item.game_id+'">'+
' <img src="'+item.icon+'" class="icon" onerror="this.src=\'__IMG__/empty.jpg\';this.onerror=null">'+
' </a>'+
'<div class="btnbox">'+
html_1 +
'</div>'+
'<div class="text">'+
' <div class="namebox">'+
' <a href="{:U('Game/detail')}&id='+item.game_id+'" class="name">'+item.game_name+'</a>'+
' <span class="starbox">'+
html_2 +
' </span>'+
' </div>'+
' <div class="info"><span class="size">'+item.game_size+'</span><span class="dlnumber">'+item.dow_num+'查看</span></div>'+
' <p class="description">'+item.features+'</p>'+
'</div>';
html += '</li>';
});
ac.append(html);
$('.loading').addClass('ms-none');
$('#moreBtn').removeClass('ms-none');loads=false;
} else {
$('.loading').addClass('ms-none');
popmsg.msg('已经到底了~');
}
});
function abc($id){
var url = "{:U('Game/detail','',false)}";
window.location.href=url+"/id/"+$id;
}
$("body").on("click",'#ajaxContainer .down',function(){
var url = $(this).attr('url');
var pmsg = $(".popmsg").pop();
$.ajax({
url:url,
type:"get",
dataType:"json",
data:{},
success:function(result){
if(result.status == 0){
pmsg.msg(result.info);
}else{
location.href=result.url;
return false;
}
},
error:function(){
alert("服务器异常");
}
})
})
function fromDownFile(url){
try{
var elemIF = document.createElement("iframe");
elemIF.src = url;
elemIF.style.display = "none";
document.body.appendChild(elemIF);
}catch(e){
}
}
</script>
</block>
<block name="footer"></block>