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.

196 lines
5.3 KiB
HTML

<extend name="Public/bases" />
<block name="css">
<link href="__CSS__/{:C('DEFAULT_THEME')}/open.css" rel="stylesheet" >
</block>
<block name="header">
<div class="header">
<section class="wrap">
<div class="caption">
<span class="table">
<span class="table-cell">
<a href="{:U('Open/index',array('account'=>I('account'),'st'=>-1))}" class="tab-item <eq name='Think.get.st' value='-1'>active</eq>"><span>已开新服</span></a>
</span>
<span class="table-cell">
<a href="{:U('Open/index',array('account'=>I('account'),'st'=>1))}" class="tab-item <eq name='Think.get.st' value='1'>active</eq>"><span>新服预告</span></a>
</span>
</span>
</div>
</section>
</div>
<div class="header-space"></div>
</block>
<block name="body">
<div class="trunk-box">
<div class="wrap">
<div class="panel list">
<notempty name="lists">
<ul class="clearfix">
<volist name="lists" id="vo">
<li>
<div class="item clearfix">
<div class="pic">
<span class="font table"><span class="table-cell">----游戏</span></span>
<img src="{$vo.game_icon_url}" class="icon">
</div>
<div class="but">
<span class="table">
<span class="table-cell">
<eq name="vo.game_source" value="2">
<a href="javascript:;" date-id="{$vo[id]}" date-value="{$vo.game_dow_url}" date-promote="{$vo.promote_id}" class="butn goto <empty name='vo.game_dow_url'>disabled</empty>">下载</a>
<else />
<a href="http://{$_SERVER['HTTP_HOST']}{:U('Down/down_file',array('game_id'=>$vo['game_id'],'promote_id'=>$vo['promote_id'],'type'=>$vo['sdk_version']))}" class="butn">下载</a>
</eq>
</span>
</span>
</div>
<div class="txt">
<a href="{$vo.jump_url}" class="name">{$vo['game_name']}</a>
<p class="info"><span>{$vo.server_name}<span><i></i><span>{$vo.start_time_format}</span></p>
</div>
</div>
</li>
</volist>
</ul>
<a href="javascript:;" class="loading jsmore">加载更多</a>
<else />
<div class="empty">
<span class="table">
<span class="table-cell">
<img src="__IMG__/wap/empty_icon_list.png" class="empty-icon">
<p class="empty-text"><span>无数据</span></p>
</span>
</span>
</div>
</notempty>
</div>
</div>
</div>
</block>
<block name="footer">
<include file="Public:footer" />
</block>
<block name="script">
<empty name="lists">
<script>
window.onload = function(){
$('.list').css({'height':($(window).height()-$('.header-space').height()-$('.footer-space').height())+'px'});
}
</script>
<else />
<script>
var total = "{$total}";
var page = 1;
var loadflag = false;
$(function() {
$('.goto').click(function(){
var url = $(this).attr("date-value");
if(url == '')return false;
var game_id = $(this).attr("date-id");
var promote_id = $(this).attr("date-promote");
$.ajax({
type:'GET',
dataType:'json',
url:'{:U("Game/setdownload")}',
data:{game_id:game_id,promote_id:promote_id},
success:function(data) {
},
});
window.location.href = url;
})
$('.jsmore').on('click',function() {
ajax();
});
load();
$(window).scroll(function() {
load();
return false;
});
});
function load() {
var totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop());
if ($(document).height() <= totalheight) {
ajax();
} else {
ajax();
}
}
function ajax() {
var loading = $('.jsmore');
if (loadflag) {return false;}
if (page>total) {loading.html('数据加载完成');return false;}
$.ajax({
type:'get',
dataType:'json',
url:'{:U("more")}',
data:{p:++page,account:'{:I("account")}',st:'{:I("st")}'},
beforeSend:function() {
loading.html('<span class="icon"></span>');loadflag = true;
},
success:function(data) {
if (parseInt(data.status) == 1) {
loading.html('加载更多');
var html = '';
$.each(data.list,function(i,n) {
html+='<li>'
html+=' <div class="item clearfix">'
html+=' <div class="pic">'
html+=' <span class="font table"><span class="table-cell">----游戏</span></span>'
html+=' <img src="'+n.game_icon_url+'" class="icon">'
html+=' </div>'
html+=' <div class="but">'
html+=' <span class="table">'
html+=' <span class="table-cell">'
if (n.downloadurl)
html+=' <a href="'+n.downloadurl+'" class="butn down">下载</a>'
else
html+=' <a href="javascript:;" class="butn down disabled">下载</a>'
html+=' </span>'
html+=' </span>'
html+=' </div>'
html+=' <div class="txt">'
html+=' <a href="'+n.jump_url+'" class="name">'+n.game_name+'</a>'
html+=' <p class="info"><span>'+n.server_name+'<span><i></i><span>'+n.start_time_format+'</span></p>'
html+=' </div>'
html+=' </div>'
html+='</li>';
});
$('.list ul').append(html);
} else {
loading.html('数据加载完成');
}
loadflag = false;
},
error:function() {
loading.html('加载更多');loadflag = false;
}
});
}
</script>
</empty>
</block>