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.
238 lines
9.5 KiB
HTML
238 lines
9.5 KiB
HTML
5 years ago
|
<extend name="Public/bases" />
|
||
|
<block name="css">
|
||
|
<link href="__CSS__/swiper.min.css" rel="stylesheet" >
|
||
|
<link href="__CSS__/{:C('DEFAULT_THEME')}/index.css" rel="stylesheet" >
|
||
|
</block>
|
||
|
<block name="body">
|
||
|
<div class="trunk-box">
|
||
|
<div class="banner">
|
||
|
<div <if condition="count($slider) gt 1">id="banner-carousel"</if> class="swiper-container">
|
||
|
<div class="swiper-wrapper" style="width:{$slider[0]['width']};height:{$slider[0]['height']};">
|
||
|
<notempty name="slider">
|
||
|
<volist name="slider" id="vo">
|
||
|
<div class="swiper-slide">
|
||
|
<a class="pic" target="{$vo['target']}" href="<notempty name='vo.url'>{$vo.url}<else />javascript:;</notempty>"><span class="font table"><span class="table-cell">{$vo['title']}</span></span><if condition="@fopen($vo['data'],'r')"><img src="{$vo['data']}" /><else/></if></a>
|
||
|
</div>
|
||
|
</volist>
|
||
|
<else />
|
||
|
<div class="swiper-slide">
|
||
|
<a class="pic" href="javascript:;"><span class="font table"><span class="table-cell">手游</span></span></a>
|
||
|
</div>
|
||
|
</notempty>
|
||
|
</div>
|
||
|
<!-- 如果需要分页器 -->
|
||
|
<div class="swiper-pagination"></div>
|
||
|
|
||
|
<!-- 如果需要导航按钮 -->
|
||
|
<if condition="count($slider) gt 1">
|
||
|
<div class="swiper-button-prev"></div>
|
||
|
<div class="swiper-button-next"></div>
|
||
|
</if>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="wrap">
|
||
|
<div class="recommend">
|
||
|
<div class="list-title"><a href="{:U('Game/index',array('rs'=>1,'account'=>I('account')))}" class="list-more">更多<img src="__IMG__/home_content_icon_more.png"></a><i></i><span>精品推荐</span></div>
|
||
|
<ul class="clearfix">
|
||
|
<notempty name="recgame">
|
||
|
<volist name="recgame" id="vo">
|
||
|
<li>
|
||
|
<div class="item">
|
||
|
<div class="pic"><div class="cover"><div class="coverbox"><span class="table"><span class="table-cell"><notempty name='vo.download'><img src="{:U('Base/qrcode',array('url'=>base64_encode(base64_encode($vo['download']))))}"><span class="qrcode-text">扫描二维码下载</span></notempty></span></span></div></div><span class="font table"><span class="table-cell">----游戏</span></span><if condition="$vo['game_img']"><img src="{:get_cover($vo['game_img'],'path')}"></if></div>
|
||
|
<div class="txt">
|
||
|
<a href="{:U('Game/detail',array('name'=>$vo['game_name'],'source'=>$vo['game_source'],'account'=>I('account')))}" class="name">{:str_replace(array('(安卓版)','(苹果版)'),'',$vo['game_name'])}</a>
|
||
|
<p class="info"><span>{$vo.open_type}<span><i></i><span>{$vo.game_type}</span><i></i><span>{$vo.game_size}MB</span></p>
|
||
|
<a href="{:U('Game/detail',array('name'=>$vo['game_name'],'source'=>$vo['game_source'],'account'=>I('account')))}" class="butn">下载</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
</li>
|
||
|
</volist>
|
||
|
<else />
|
||
|
<div class="z_tuijian">
|
||
|
<p class="z_ptabcell">暂无游戏</p>
|
||
|
<div>
|
||
|
</notempty>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="pic-text clearfix">
|
||
|
<div class="newsgame">
|
||
|
<div class="list-title"><a href="{:U('Game/index',array('rs'=>3,'account'=>I('account')))}" class="list-more">更多<img src="__IMG__/home_content_icon_more.png"></a><i></i><span>新游上线</span></div>
|
||
|
<ul class="clearfix" style="height:318px;">
|
||
|
<notempty name="newsgame">
|
||
|
<volist name="newsgame" id="vo">
|
||
|
<li>
|
||
|
<div class="item clearfix">
|
||
|
<div class="pic">
|
||
|
<span class="font table"><span class="table-cell">----游戏</span></span>
|
||
|
<if condition="$vo['game_icon']"><img src="{:get_cover($vo['game_icon'],'path')}" class="icon"></if>
|
||
|
</div>
|
||
|
<div class="txt">
|
||
|
<a href="{:U('Game/detail',array('name'=>$vo['game_name'],'source'=>$vo['game_source'],'account'=>I('account')))}" class="name">{:str_replace(array('(安卓版)','(苹果版)'),'',$vo['game_name'])}</a>
|
||
|
<p class="downloadnum">{:set_number_short($vo['download_number'])}人下载</p>
|
||
|
<a href="{:U('Game/detail',array('name'=>$vo['game_name'],'source'=>$vo['game_source'],'account'=>I('account')))}" class="butn">下载</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
</li>
|
||
|
</volist>
|
||
|
<else />
|
||
|
<div class="z_newshangxian">
|
||
|
<p class="z_ptabcell">暂无游戏</p>
|
||
|
</div>
|
||
|
</notempty>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="open">
|
||
|
<div class="list-title"><a href="{:U('Open/index',array('account'=>I('account')))}" class="list-more">更多<img src="__IMG__/home_content_icon_more.png"></a><i></i><span>开服表</span></div>
|
||
|
<ul class="clearfix">
|
||
|
<notempty name="open">
|
||
|
<li>
|
||
|
<div class="item table-title clearfix">
|
||
|
<span class="column column1">游戏</span>
|
||
|
<span class="column column2" style="color:#666;">服务器</span>
|
||
|
<span class="column column3">时间</span>
|
||
|
</div>
|
||
|
</li>
|
||
|
<volist name="open" id="vo">
|
||
|
<li class="open_li">
|
||
|
<div class="item table-content clearfix">
|
||
|
<span class="column column1"><a class="name">{:str_replace(array('(安卓版)','(苹果版)'),'',$vo['game_name'])}</a></span>
|
||
|
<span class="column column2">{$vo.server_name}</span>
|
||
|
<span class="column column3">{$vo.start_time|date='m-d H:i',###}</span>
|
||
|
</div>
|
||
|
</li>
|
||
|
</volist>
|
||
|
<else/>
|
||
|
<div class="z_kaifu">
|
||
|
<p class="z_ptabcell">暂无游戏</p>
|
||
|
</div>
|
||
|
</notempty>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hotgift">
|
||
|
<div class="list-title"><a href="{:U('Gift/index',array('rs'=>2,'account'=>I('account')))}" class="list-more">更多<img src="__IMG__/home_content_icon_more.png"></a><i></i><span>热门礼包</span></div>
|
||
|
<ul class="clearfix">
|
||
|
<notempty name="hotgift">
|
||
|
<volist name="hotgift" id="vo">
|
||
|
<li>
|
||
|
<div class="item clearfix">
|
||
|
<div class="pic">
|
||
|
<span class="font table"><span class="table-cell">----游戏</span></span>
|
||
|
<if condition="$vo['game_icon']"><img src="{:get_cover($vo['game_icon'],'path')}" class="icon"></if>
|
||
|
</div>
|
||
|
<div class="txt">
|
||
|
<a href="{:U('Gift/detail',array('id'=>$vo['id'],'account'=>I('account')))}" class="name">[{:str_replace(array('(安卓版)','(苹果版)'),'',$vo['game_name'])}]{$vo.gift_name}</a>
|
||
|
<p class="surplus">剩余<span><notempty name="vo.novice">{:count(explode(',',trim($vo['novice'])))}<else />0</notempty></span>个<eq name="vo.giftbag_version" value="1"><img src="__IMG__/icon_package_android.png" class="and"></eq>
|
||
|
<eq name="vo.giftbag_version" value="2"><img src="__IMG__/icon_package_ios.png" class="ios"></eq></p>
|
||
|
<gt name='vo.recordid' value='0'>
|
||
|
<a href="javascript:;" class="butn jsgetgift disabled">已领取</a>
|
||
|
<else />
|
||
|
<a href="javascript:;" data-id="{$vo.id}" class="butn jsgetgift">领取</a>
|
||
|
</gt>
|
||
|
</div>
|
||
|
</div>
|
||
|
</li>
|
||
|
</volist>
|
||
|
<else />
|
||
|
<div class="z_libao">
|
||
|
<p class="z_ptabcell">暂无礼包</p>
|
||
|
</div>
|
||
|
</notempty>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</block>
|
||
|
|
||
|
<block name="script">
|
||
|
<script src="__JS__/swiper.min.js"></script>
|
||
|
<script src="__STATIC__/layer/layer.js"></script>
|
||
|
<script>
|
||
|
function Copy(str,that,index){
|
||
|
var save = function(e){
|
||
|
e.clipboardData.setData('text/plain', str);
|
||
|
e.preventDefault();
|
||
|
}
|
||
|
|
||
|
document.addEventListener('copy', save);
|
||
|
document.execCommand('copy');
|
||
|
document.removeEventListener('copy',save);
|
||
|
that.text('复制成功');
|
||
|
setTimeout(function(){layer.close(index);layer.msg('复制成功');},1500);
|
||
|
|
||
|
}
|
||
|
$(function() {
|
||
|
new Swiper('#banner-carousel', {autoplay:{delay:2000},loop:true,
|
||
|
// 如果需要分页器
|
||
|
pagination: {
|
||
|
el: '.swiper-pagination',
|
||
|
},
|
||
|
|
||
|
// 如果需要前进后退按钮
|
||
|
navigation: {
|
||
|
nextEl: '.swiper-button-next',
|
||
|
prevEl: '.swiper-button-prev',
|
||
|
},
|
||
|
|
||
|
});
|
||
|
|
||
|
$('.jsgetgift').on('click',function() {
|
||
|
var that=$(this),id=$.trim(that.attr('data-id')),text = $.trim(that.text());
|
||
|
if (id>0) {
|
||
|
if (that.hasClass('disabled')) {return false;}
|
||
|
that.addClass('disabled').text('领取中');
|
||
|
|
||
|
$.ajax({
|
||
|
type:'post',
|
||
|
dataType:'json',
|
||
|
url:'{:U("Gift/getgift")}',
|
||
|
data:{id:id},
|
||
|
success:function(data) {
|
||
|
|
||
|
switch(parseInt(data.status)) {
|
||
|
case 1:
|
||
|
case 2:
|
||
|
case 3:{
|
||
|
that.text('已领取');
|
||
|
var title = parseInt(data.status)==2?'你已成功领取过':'领取成功!';
|
||
|
layer.open({
|
||
|
type: 1,
|
||
|
closeBtn: '1',
|
||
|
title: false,
|
||
|
skin: 'layer-lwx-style', //加上边框
|
||
|
area: ['262px', '133px'], //宽高
|
||
|
content: '<div class="layer-lwx-notice"><h4 class="layer-lwx-title">'+title+'</h4><p class="layer-lwx-novice"><span>激活码:</span><span class="novice-txt">'+data.info+'</span></p><div class="layer-lwx-butn"><a href="javascript:;" class="butn copy">复制激活码</a></div></div>',
|
||
|
success:function(layero, index){
|
||
|
|
||
|
$('.copy').click(function() {
|
||
|
// //移动端复制
|
||
|
$(".copy").text('复制');
|
||
|
Copy($('.novice-txt').text(),$(this),index);
|
||
|
|
||
|
return false;
|
||
|
});
|
||
|
}
|
||
|
});
|
||
|
};break;
|
||
|
case 4:{
|
||
|
that.text('已领完');
|
||
|
layer.msg(data.info);
|
||
|
};break;
|
||
|
default:{layer.msg(data.info);
|
||
|
that.removeClass('disabled').text(text);}
|
||
|
|
||
|
}
|
||
|
},error:function() {
|
||
|
layer.msg('服务器故障,请稍候再试...');
|
||
|
that.removeClass('disabled').text(text);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
return false;
|
||
|
});
|
||
|
|
||
|
});
|
||
|
</script>
|
||
|
</block>
|