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.

197 lines
7.2 KiB
HTML

<extend name="Public/bases" />
<block name="css">
<link href="__CSS__/{:C('DEFAULT_THEME')}/open.css" rel="stylesheet" >
</block>
<block name="body">
<div class="trunk-box">
<div class="wrap clearfix">
<div class="mainer">
<div class="tab clearfix">
<a href="{:U('Open/index',array('account'=>I('account'),'st'=>0))}" class="tab-item <empty name='Think.request.st'>active</empty>">今日开服</a>
<a href="{:U('Open/index',array('account'=>I('account'),'st'=>1))}" class="tab-item <eq name='Think.request.st' value='1'>active</eq>">即将开服</a>
<a href="{:U('Open/index',array('account'=>I('account'),'st'=>-1))}" class="tab-item <eq name='Think.request.st' value='-1'>active</eq>">已开服</a>
</div>
<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>
<noempty name="vo.game_icon"><img src="{:get_cover($vo['game_icon'],'path')}" class="icon"></noempty>
</div>
<div class="but">
<span class="table">
<span class="table-cell">
<if condition="get_site_gift_count($vo['id'],$vo['game_id'],$vo['promote_id']) gt 0">
<a href="{:U('Gift/detail',array('id'=>get_site_gift_count($vo['id'],$vo['game_id'],$vo['promote_id']),'account'=>I('account')))}" class="butn get">领取礼包</a>
</if>
<a href="{:U('Game/detail',array('name'=>$vo['game_name'],'source'=>$vo['game_source'],'account'=>I('account')))}" class="butn down">下载游戏</a>
</span>
</span>
</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>{:get_game_type_by_id($vo['game_type_id'])}<span><i></i><span>{$vo.start_time|date='Y-m-d H:i',###}</span><i></i><span>{$vo.server_name}</span></p>
</div>
</div>
</li>
</volist>
</ul>
<div class="pagenation">{$_page}</div>
<else />
<div class="empty">
<div class="nothing">
<img src="__IMG__/empty_icon_list.png" class="empty-icon">
<p class="empty-text">找不到相关开服信息</p>
</div>
</div>
</notempty>
</div>
</div>
<div class="side">
<div class="recommon">
<div class="list-title"><i></i><span>推荐游戏</span></div>
<div class="recommon-content">
<ul>
<game:gamerecommon name="vo" recommon="1" limit="6">
<li>
<div class="item clearfix">
<div class="pic">
<span class="font table"><span class="table-cell">----游戏</span></span>
<notempty name="vo.game_icon"><img src="{:get_cover($vo['game_icon'],'path')}" class="icon"></notempty>
</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>
</game:gamerecommon>
</ul>
</div>
</div>
<div class="hot">
<div class="list-title"><i></i><span>热门礼包</span></div>
<div class="hot-content">
<ul>
<gift:giftrecommon name="vo" recommon="2" limit="6">
<li>
<div class="item clearfix">
<div class="pic">
<span class="font table"><span class="table-cell">----游戏</span></span>
<notempty name="vo.game_icon"><img src="{:get_cover($vo['game_icon'],'path')}" class="icon"></notempty>
</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">剩余:<i><notempty name="vo.novice">{:count(explode(',',$vo['novice']))}<else />0</notempty></i></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>
</gift:giftrecommon>
</ul>
</div>
</div>
</div>
</div>
</div>
</block>
<block name="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);
}
//@author zwm 自适用所有高度
$(function() {
var length=$(".list").length;
var height = $('.pagenation').height() || 100;
var asideh=$('.aside').height();
if(length>8){
$('.list').css({'height':($(window).height()-100-height)+'px'});
}else if(asideh<708){
$(".list").css({ "min-height": "708px"});
}else{
length=asideh; //高度为侧边栏高度
}
$('.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>