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.

79 lines
3.6 KiB
HTML

5 years ago
<extend name="Public/bases"/>
<block name="body" >
<link href="__CSS__/gift.css" rel="stylesheet" >
<body>
<header class="header index-header">
<div class="">
<a href="{:U('Index/index')}" class="hbtn back"><i class="iconfont icon-drop-left"></i></a>
<h1 class="caption">游戏礼包</h1>
</div>
</header>
<div class="occupy"></div>
<section class="trunker">
<section class="container">
<div class="searchbox">
<form action="{:U('Gift/index')}" method="post" class="search">
<input type="text" name="name" class="text" value="{:I('name')}" placeholder="请输入游戏名称">
<span class="btn"><i class="iconfont icon-search"></i></span>
</form>
</div>
<section class="list-detail">
<ul class="" id="ajaxContainer" currentpage="{$page}" name="{$name}">
<empty name="data">
<li style="text-align: center;">暂无数据</li>
<else/>
<foreach name="data" item="v">
<li>
<a href="{:U('Gift/gamegift?id='.$v['game_id'])}" class="za_icongift">
<img src="{$v['icon']}" class="icon" onerror="this.src='__IMG__/empty.jpg';this.onerror=null"></notempty>
</a>
<div class="btnbox"><a href="{:U('Gift/gamegift?id='.$v['game_id'])}" class="btn">查看</a></div>
<div class="text">
<div class="namebox"><a href="{:U('Gift/gamegift?id='.$v['game_id'])}" class="name">{$v['relation_game_name']}</a></div>
<div class="info">礼包种类:{$v['num']}种</div>
<p class="description">{$v['giftbag_name']}</p>
</div>
</li>
</foreach>
</empty>
</ul>
</section>
</section>
</section>
<div class="space"></div>
<div class="loading ms-none" id="moreBtn"><a href="javascript:" class="link"></a></div>
<script src="__JS__/ajaxload.js"></script>
<script src="__JS__/pop.lwx.min.js"></script>
<script>
var ac = $('#ajaxContainer'),title = ac.attr('name');
var popmsg = $('.loading').pop();
ajaxload('{:U("ajaxlists")}',{'name':title},function(data) {
if (data.status == 1) {
ac.attr('currentpage',data.page);
var html = '',d = data.lists;
for (var i in d) {
var item = d[i];
html += '<li><a href="'+item.url+'" class="za_icongift">'+
' <img src="'+item.icon+'" class="icon" onerror="this.src=\'__IMG__/empty.jpg\';this.onerror=null">'+
' </a><div class="btnbox"><a href="'+item.url+'" class="btn">查看</a></div>'+
' <div class="text">'+
' <div class="namebox"><a href="'+item.url+'" class="name">'+item.relation_game_name+'</a></div>'+
' <div class="info">礼包种类:'+item.num+'种</div>'+
' <p class="description">'+item.giftbag_name+'</p>'+
' </div>'+
'</li>';
}
ac.append(html);
$('.loading').addClass('ms-none');
$('#moreBtn').removeClass('ms-none');loads=false;
} else {
$('.loading').addClass('ms-none');
popmsg.msg('已经到底了~');
// $('#moreBtn').show().html('已经到底了~');
}
});
</script>
</block>