|
|
<extend name="Public/base"/>
|
|
|
<block name="css">
|
|
|
</block>
|
|
|
<block name="body">
|
|
|
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
|
|
|
|
|
<div class="cf main-place top_nav_list navtab_list">
|
|
|
<h3 class="page_title">LTV统计</h3>
|
|
|
<p class="description_text">说明:计算用户生命周期价值的相关数据(充值金额统计用户在平台内/游戏内进行现金充值的数据汇总,游戏内通过平台币/绑币进行消费的不计算在内 )</p>
|
|
|
</div>
|
|
|
|
|
|
<div class="cf jssearch top_nav_list">
|
|
|
<!-- 高级搜索 -->
|
|
|
<div class=" fl cf search_list">
|
|
|
<div class="input-list search-title-box">
|
|
|
<label>搜索:</label>
|
|
|
</div>
|
|
|
<div class="input-list">
|
|
|
<input type="text" id="time-start" name="start" class="" value="{:I('start',date('Y-m-d',strtotime('-30 day')))}" placeholder="选择开始时间" />
|
|
|
-
|
|
|
<input type="text" id="time-end" name="end" class="" value="{:I('end',date('Y-m-d',strtotime('-1 day')))}" placeholder="选择结束时间" />
|
|
|
</div>
|
|
|
|
|
|
<div class="input-list">
|
|
|
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Statistics/ltv','model='.$model['name'] .'&row='.I('row'),false)}">搜索</a>
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<!-- 数据列表 -->
|
|
|
<div class="data_list">
|
|
|
<div class="">
|
|
|
<table>
|
|
|
<!-- 表头 -->
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th>日期</th>
|
|
|
<th>充值金额</th>
|
|
|
<th>活跃用户</th>
|
|
|
<th>LTV1</th>
|
|
|
<th>LTV2</th>
|
|
|
<th>LTV3</th>
|
|
|
<th>LTV4</th>
|
|
|
<th>LTV5</th>
|
|
|
<th>LTV6</th>
|
|
|
<th>LTV7</th>
|
|
|
<th>LTV14</th>
|
|
|
<th>LTV30</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<!-- 列表 -->
|
|
|
<tbody>
|
|
|
<empty name ="data">
|
|
|
<tr><td colspan="12" class="text-center">aOh! 暂时还没有内容!</td></tr>
|
|
|
<else/>
|
|
|
<volist name="data" id="vo">
|
|
|
<tr>
|
|
|
<td>{$vo.time}</td>
|
|
|
<td>{$vo.amount}</td>
|
|
|
<td>{$vo.active}</td>
|
|
|
<td>{$vo.ltv1}</td>
|
|
|
<td>{$vo.ltv2}</td>
|
|
|
<td>{$vo.ltv3}</td>
|
|
|
<td>{$vo.ltv4}</td>
|
|
|
<td>{$vo.ltv5}</td>
|
|
|
<td>{$vo.ltv6}</td>
|
|
|
<td>{$vo.ltv7}</td>
|
|
|
<td>{$vo.ltv14}</td>
|
|
|
<td>{$vo.ltv30}</td>
|
|
|
</tr>
|
|
|
</volist>
|
|
|
</empty>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="page">
|
|
|
<a class="sch-btn" href="{:U('Export/ltv',array(
|
|
|
'start'=>I('start',date('Y-m-d',strtotime('-30 day'))),
|
|
|
'end'=>I('end',date('Y-m-d',strtotime('-1 day'))),
|
|
|
'xlsname'=>'统计_ltv统计'
|
|
|
),false)}">导出</a>
|
|
|
{$_page|default=''}
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</block>
|
|
|
|
|
|
<block name="script">
|
|
|
<script>
|
|
|
Think.setValue('start',"{$Think.get.start|default=''}");
|
|
|
Think.setValue('end',"{$Think.get.end|default=''}");
|
|
|
Think.setValue('row',"{$Think.get.row|default='10'}");
|
|
|
</script>
|
|
|
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
|
|
|
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
|
|
|
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
|
|
|
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
|
|
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
|
|
|
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
|
|
<script type="text/javascript">
|
|
|
//导航高亮
|
|
|
highlight_subnav('{:U('Statistics/ltv')}');
|
|
|
$(function(){
|
|
|
|
|
|
//计算天数差的函数,通用
|
|
|
function GetDateDiff(startDate,endDate)
|
|
|
{
|
|
|
var startTime = new Date(Date.parse(startDate.replace(/-/g, "/"))).getTime();
|
|
|
var endTime = new Date(Date.parse(endDate.replace(/-/g, "/"))).getTime();
|
|
|
var dates = Math.abs((startTime - endTime))/(1000*60*60*24);
|
|
|
return dates;
|
|
|
}
|
|
|
|
|
|
//搜索功能
|
|
|
$("#search").click(function(){
|
|
|
|
|
|
var start = $("#time-start").val();
|
|
|
start = start.substring(0,19);
|
|
|
var end = ($("#time-end").val() == "") ? "{:date('Y-m-d')}" : $("#time-end").val();
|
|
|
end = end.substring(0,19);
|
|
|
var interval = GetDateDiff(start,end);
|
|
|
if(interval < 0 || start == ''){
|
|
|
layer.msg('请选择搜索时间');
|
|
|
return false;
|
|
|
}else if(interval>90){
|
|
|
layer.msg('请选择90日内的时间段');
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
|
|
|
var url = $(this).attr('url');
|
|
|
var query = $('.jssearch').find('input').serialize();
|
|
|
query += "&"+$('.jssearch').find('select').serialize();
|
|
|
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
|
|
|
query = query.replace(/^&/g,'');
|
|
|
if( url.indexOf('?')>0 ){
|
|
|
url += '&' + query;
|
|
|
}else{
|
|
|
url += '?' + query;
|
|
|
}
|
|
|
var start = $("#time-start").val();
|
|
|
var end = $("#time-end").val();
|
|
|
if (start !='' && end != ''){
|
|
|
if (Date.parse(start) > Date.parse(end)){
|
|
|
layer.msg('开始时间必须小于等于结束时间');
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
window.location.href = url;
|
|
|
});
|
|
|
|
|
|
//回车自动提交
|
|
|
$('.jssearch').find('input').keyup(function(event){
|
|
|
if(event.keyCode===13){
|
|
|
$("#search").click();
|
|
|
}
|
|
|
});
|
|
|
$('#time-start').datetimepicker({
|
|
|
format: 'yyyy-mm-dd',
|
|
|
language:"zh-CN",
|
|
|
minView:2,
|
|
|
autoclose:1,
|
|
|
});
|
|
|
|
|
|
$('#time-end').datetimepicker({
|
|
|
format: 'yyyy-mm-dd',
|
|
|
language:"zh-CN",
|
|
|
minView:2,
|
|
|
autoclose:1,endDate:new Date(new Date().getTime()-24*60*60*1000),
|
|
|
pickerPosition:'bottom-right'
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
</script>
|
|
|
</block> |