|
|
|
<extend name="Public/bases" />
|
|
|
|
<block name="css">
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
|
|
<link href="__CSS__/user.css" rel="stylesheet" >
|
|
|
|
<script src="__JS__/jquery-1.11.3.min.js"></script>
|
|
|
|
<script type="text/javascript" src="__JS__/getRem.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="__CSS__/reset.css">
|
|
|
|
<link rel="stylesheet" type="text/css" href="__CSS__/foot_tabbar.css">
|
|
|
|
<link rel="stylesheet" type="text/css" href="__CSS__/myBag.css">
|
|
|
|
</block>
|
|
|
|
<block name="body" >
|
|
|
|
<body style="background-image:none;">
|
|
|
|
<div class="myBag">
|
|
|
|
<!-- 子页公共头部 -->
|
|
|
|
<div class="subpage-heard" style="width: 100%;position: fixed;top:0;margin-bottom: 1rem;z-index: 999">我的礼包
|
|
|
|
<a href="{:U('User/index')}" class="arrows"></a>
|
|
|
|
</div>
|
|
|
|
<div style="height: 1.4rem"></div>
|
|
|
|
<!-- 没有内容时显示 -->
|
|
|
|
<empty name="data">
|
|
|
|
|
|
|
|
<div class="not-play" >
|
|
|
|
<img src="__IMG__/not_play.png" alt="">
|
|
|
|
<span>您还没有相关内容哦</span>
|
|
|
|
</div>
|
|
|
|
<else/>
|
|
|
|
<div id="ajaxContainer" currentpage="{$page}">
|
|
|
|
<volist name="data" id="data">
|
|
|
|
<div class="myBag-box">
|
|
|
|
<div class="myBag-info">
|
|
|
|
<div class="infoBox">
|
|
|
|
<div class="title">特权礼包</div>
|
|
|
|
<div class="gift-bag">
|
|
|
|
<img src="__IMG__/libao.png" alt="">
|
|
|
|
<span>{$data.gift_name}</span>
|
|
|
|
</div>
|
|
|
|
<div class="describe">[{$data.desribe}]</div>
|
|
|
|
<div class="redeem">
|
|
|
|
<div >兑换码:<span >{$data.novice}</span></div>
|
|
|
|
<a class="jsgetgiftcopy" data-clipboard-text="{$data.novice}">复制兑换码</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</volist>
|
|
|
|
</div>
|
|
|
|
</empty>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="loading ms-none hidden" id="moreBtn"><a href="javascript:" class="link"></a></div>
|
|
|
|
<div class="pop pop-dialog"></div>
|
|
|
|
<style>
|
|
|
|
.pop-dialog span {
|
|
|
|
padding: .1rem 1rem;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<div class="popmsg pop-dialog" style="font-size: 15px!important;"></div>
|
|
|
|
<div class="space"></div>
|
|
|
|
<script src="__JS__/ajaxload.js"></script>
|
|
|
|
<script src="__JS__/pop.lwx.min.js"></script>
|
|
|
|
<script src="__JS__/clipboard.min.js"></script>
|
|
|
|
<script src="__JS__/slider.lwx.min.js"></script>
|
|
|
|
<script>
|
|
|
|
$(function() {
|
|
|
|
var pmsg = $('.popmsg').pop();
|
|
|
|
|
|
|
|
var clipboard = new Clipboard('.jsgetgiftcopy');
|
|
|
|
|
|
|
|
clipboard.on('success', function(e) {
|
|
|
|
pmsg.msg('复制成功');
|
|
|
|
e.clearSelection();
|
|
|
|
});
|
|
|
|
|
|
|
|
clipboard.on('error', function(e) {
|
|
|
|
pmsg.msg('此浏览器不支持此操作,请长按礼包码复制');
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$('.jscopy').click(function(event) {
|
|
|
|
var elem = $(this).siblings('input');
|
|
|
|
if (window.clipboarData) {
|
|
|
|
window.clipboarData.clearData();
|
|
|
|
window.clipboarData.setData('text',elem.val());
|
|
|
|
alert('已经成功复制');
|
|
|
|
} else {
|
|
|
|
elem.select();
|
|
|
|
alert('请长按礼包号码上选择');
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
|
|
|
slider.init('.jsbutton');
|
|
|
|
var pop = $('.pop').pop();
|
|
|
|
$('.jsdel').click(function() {
|
|
|
|
pop.msg('dddd');
|
|
|
|
});
|
|
|
|
|
|
|
|
var popmsg = $('.loading').pop();
|
|
|
|
|
|
|
|
<?php if(!$data){?>
|
|
|
|
pmsg.msg('暂无数据');
|
|
|
|
<?php }?>
|
|
|
|
var ac = $('#ajaxContainer');
|
|
|
|
ajaxload('{:U("ajaxUserGift")}',{},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 += '<div class="myBag-box">'+
|
|
|
|
'<div class="myBag-info">'+
|
|
|
|
'<div class="infoBox"> ' +
|
|
|
|
'<div class="title">特权礼包</div>' +
|
|
|
|
'<div class="gift-bag">' +
|
|
|
|
'<img src="__IMG__/libao.png" alt="">' +
|
|
|
|
'<span>{$data.gift_name}</span></div>' +
|
|
|
|
'<div class="describe">[' + item.desribe+ ']</div>'+
|
|
|
|
'<div class="redeem">'+
|
|
|
|
'<div >兑换码:<span >'+item.novice+'</span></div>' +
|
|
|
|
'<a class="jsgetgiftcopy" data-clipboard-text="'+item.novice+'">复制兑换码</a>'+
|
|
|
|
'</div> </div> </div> </div>';
|
|
|
|
}
|
|
|
|
ac.append(html);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('.loading').addClass('ms-none');
|
|
|
|
$('#moreBtn').removeClass('ms-none');loads = false;
|
|
|
|
} else {
|
|
|
|
$('.loading').removeClass('hidden').addClass('ms-none');
|
|
|
|
pmsg.msg('已经到底了~');
|
|
|
|
}
|
|
|
|
})
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
<script type="text/javascript" src="http://www.jq22.com/demo/clipboard.js-master201703170013/dist/clipboard.min.js"></script>
|
|
|
|
<script type="text/javascript" src="__JS__/myBag.js"></script>
|
|
|
|
</block>
|
|
|
|
<block name="footer"></block>
|