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.
131 lines
5.1 KiB
HTML
131 lines
5.1 KiB
HTML
<extend name="Public/bases" />
|
|
<block name="body" >
|
|
<link rel="stylesheet" href="__CSS__/gift.css">
|
|
<div class="gift-article-wrap">
|
|
<div class="gift-article-box">
|
|
<div class="icon"><img src="{:get_site_game_icon($data['site_game_id'])}"></div>
|
|
<div class="msg">
|
|
<div class="m1">
|
|
<div class="gift-title" id="gift-title">{$data.game_name}</div>
|
|
</div>
|
|
<div class="m2" id="getGift-box">
|
|
<php>
|
|
$num = get_site_gift_num($data['id'])
|
|
</php>
|
|
<div class="surplus-box">
|
|
<div class="s1">剩余情况:</div>
|
|
<div class="s2">
|
|
<div class="surplus-0" id="surplus-0"></div>
|
|
<div class="surplus-1" id="surplus-1" style="width: {:(get_site_gift_num($data['id'])-get_site_gift_record_num($data['id']))/$data['novice_num']*100}%;"></div>
|
|
</div>
|
|
<div class="s3" id="s3"><em>{:get_site_gift_num($data['id'])-get_site_gift_record_num($data['id'])}/{:get_site_gift_num($data['id'])}</em><a href="javascript:;" id="getgift" class="getGift">立即领取</a></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="wrap clear-fix m60">
|
|
<div class="">
|
|
<div class="gift-article-c">
|
|
<div class="gift_title">
|
|
<h2>礼包详情</h2>
|
|
</div>
|
|
<div class="gift-article-content" id="gift-content">
|
|
<div><span class="gac ">名称:</span>{$data.gift_name}</div>
|
|
<!--<div><span class="gac ">类型:</span>{get_gift($data['giftbag_type'])}</div>-->
|
|
<div><span class="gac ">内容:</span>{$data.gift_content}</div>
|
|
<div><span class="gac ">有效期:</span>{$data.start_time|date='Y-m-d',###} —— {$data.end_time|date='Y-m-d',###}</div>
|
|
<div><span class="gac ">使用方法:</span>{$data.get_way}</div>
|
|
</div>
|
|
</div>
|
|
<div class="gift-article-bottom">
|
|
<div class="gift-recommend-box">
|
|
<div class="gift_title">
|
|
<h2>推荐礼包</h2>
|
|
</div>
|
|
<div class="gift-recommend">
|
|
<ul>
|
|
<volist name="recommend" id="vo">
|
|
<li>
|
|
<div class="icon"><a target="_blank" href="{:U('detail',['id'=>$vo['id']])}">
|
|
<img src="{:get_site_game_icon($vo['site_game_id'])}"></a></div>
|
|
<div class="gamemsg">
|
|
<!--<div class="m1">{get_gift($vo['giftbag_type'])}</div>-->
|
|
<div class="m2" id="m2-1">{$vo.gift_name}</div>
|
|
<div class="m2" id="m2-2">剩余:<span>{:$vo['novice_num']-get_site_gift_record_num($vo['id'])}</span>/{$vo.novice_num}</div>
|
|
<div class="m3"><a target="_blank" href="{:U('Gift/detail',array('id'=>$vo['id']))}">
|
|
<i class="gift-icon"></i><em>领取</em></a></div>
|
|
</div>
|
|
</li>
|
|
</volist>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="game-new-box">
|
|
<div class="gift_title">
|
|
<h2>热门礼包</h2>
|
|
</div>
|
|
<div class="gift-recommend">
|
|
<ul>
|
|
<volist name="hot" id="vo">
|
|
<li>
|
|
<div class="icon"><a target="_blank" href="{:U('detail',['id'=>$vo['id']])}">
|
|
<img src="{:get_site_game_icon($vo['site_game_id'])}"></a></div>
|
|
<div class="gamemsg">
|
|
<!--<div class="m1">{get_gift($vo['giftbag_type'])}</div>-->
|
|
<div class="m2" id="m2-1">{$vo.gift_name}</div>
|
|
<div class="m2" id="m2-2">剩余:<span>{:$vo['novice_num']-get_site_gift_record_num($vo['id'])}</span>/{$vo.novice_num}</div>
|
|
<div class="m3"><a target="_blank" href="{:U('Gift/detail',array('id'=>$vo['id']))}">
|
|
<i class="gift-icon"></i><em>领取</em></a></div>
|
|
</div>
|
|
</li>
|
|
</volist>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
$(function() {
|
|
$('#getgift').on('click',function() {
|
|
$.ajax({
|
|
type:'post',
|
|
data:'id={$data.id}',
|
|
dataType:'json',
|
|
url:"{:U('Gift/get_novice')}",
|
|
success:function(data) {
|
|
if (parseInt(data.status)==1) {
|
|
pop('礼包领取成功,你的激活码为:'+data.info);
|
|
} else {
|
|
pop('不要太贪心啊,给别人一个领取的机会吧!!!');
|
|
}
|
|
},
|
|
});
|
|
});
|
|
});
|
|
function pop(content,delay,url) {
|
|
$('body').append('<div class="pop active"><div class="m-mask"></div><div class="m-box "><a href="javascript:;" class="popclose">X</a>'
|
|
+'<div class="popnotice"><div class="title">温馨提示</div><div class="content"><div class="subcontent">'+content+'</div></div>'
|
|
+'<div class="popbot"><a href="javascript:;" class="btn ok" >确定</a></div></div></div></div>');
|
|
$('.popclose').on('click',function() {
|
|
$(this).closest('.pop').remove();
|
|
if (url) {
|
|
setTimeout(function() {
|
|
window.location = url.url;
|
|
},url.time);
|
|
}
|
|
});
|
|
$('.ok').on('click',function() {
|
|
$('.popclose').click();
|
|
location.reload();
|
|
});
|
|
|
|
if (delay) {
|
|
setTimeout(function(){
|
|
$('.popclose').click();
|
|
},delay);
|
|
}
|
|
}
|
|
</script>
|
|
</block> |