<extend name="Public/manage" />

<block name="head">

    <link href="__CSS__/user_zxy.css" rel="stylesheet">

    <script src="__JS__/zh-cn.js"></script>

   <script src="__JS__/echarts-all.js"></script>

   <script src="__JS__/chart.js"></script>

    <script src="__JS__/jquery.tablesorter.js"></script>

    <script src="__JS__/string.js"></script>

    <script src="__JS__/datacommon.js"></script>

	<script src="__JS__/bootstrap-select.min.js"></script>
	<style>
		.icon-calendarz {position:absolute;top:14px;right:5px;cursor:pointer;}
		
	</style>

</block>

<block name="location">

	<a class="z_nav curt_nav" href="{:U('Stats/overview')}">开发者概览</a>

</block>

<block name="body" >

    

                    <div class="">

                        <div class="matter_box">

                            <div class="row count-panel clearfix">

                                <div class="mrc_colum2_5 mrc">

                                    <div class="frame">

										<div class="z_frame">

											<strong class="s-c-blue">{$total_player}</strong>

										</div>     

                                        <div class="z_frame">

											<small>累计玩家</small>

										</div>

                                    </div>

                                </div>

                                <div class="mrc_colum2_5 mrc">

                                    <div class="frame">

										<div class="z_frame">

                                            <strong class="s-c-blue">{$spend_user}</strong>

                                        </div>

										<div class="z_frame">

											<small>付费玩家</small>

										</div>

                                    </div>

                                </div>

                                <div class="mrc_colum2_5 mrc">

                                    <div class="frame">

                                        <div class="z_frame">

                                            <strong class="s-c-blue">{$total_spend}</strong>

                                        </div>

										<div class="z_frame">

											<small>累计流水</small>

                                        </div>

                                    </div>

                                </div>

                                <div class="mrc_colum2_5 mrc">

                                    <div class="frame"> 

											<div class="z_frame">

												<strong class="s-c-blue" id="realActiveUser">{$today_active_user}</strong> 

											</div>

											<div class="z_frame">											 

												<small>实时活跃</small>

											</div>

                                    </div>

                                </div>

								<div class="mrc_colum2_5 mrc">

                                    <div class="frame">

                                        <div class="z_frame">

                                           <strong class="s-c-blue" id="realIncome">{$today_spend}</strong>

                                        </div>

										<div class="z_frame">

											 <small>实时流水</small>

                                        </div>

                                    </div>

                                </div>

                            </div>

                        </div>



                        <div class="matter_panel matter_developer_panel clearfix">

                            <div class="">

                                <div class="matter_box">

                                    <div class="title">

                                        <h3 class="zicon_youxi">游戏</h3>

                                        <a href="{:U('Game/add')}" target="_blank" class="add">

                                            <span class="iconfont icon-plusz"></span>

                                            <div class="tips"><span class="iconfont icon-triangle_top"></span>创建游戏</div>

                                        </a>

                                    </div>

                                    <div class="matter_row clearfix">

                                        <div class="mrc_colum8 mrc matter_game_list">

                                            <div class="mrc_colum25 mrc zwm_mac">

												<div class="z_fram">

													<small class="font_14">已上线</small>

												</div>

												<div class="z_fram">

												   <strong class="matter_data_num zwm_online">{$online_game}</strong>

												</div> 

                                            </div>

                                            <div class="mrc_colum25 mrc zwm_mac">

												<div class="z_fram">

													<small class="font_14">已下线</small>

												</div>

												<div class="z_fram">

													<strong class="matter_data_num zwm_downline">{$down_game}</strong>

												</div>

                                            </div>

                                            <div class="mrc_colum25 mrc zwm_mac">

												<div class="z_fram">

													<small class="font_14">审核中</small>

												</div>

												<div class="z_fram">

													<strong class="matter_data_num zwm_audit">{$check_game}</strong>

												</div>

                                            </div>


                                            <div class="mrc_colum25 mrc zwm_mac" style="padding-top:0;">

												<div class="z_fram">

													<small class="font_14">游戏数量</small>

												</div>

												<div class="z_fram">

													<strong class="matter_data_num">{$game_num}</strong>

												</div>

                                            </div>

                                        </div>

                                    </div>

                                </div>

                            </div>

                        </div>



                        <div class="matter_box game_data">

                            <div class="title">

                                <h3 class="zicon_gjzhibiao">关键指标</h3>

                            </div>

                            <div class="zwm_keyindicators">

                                <ul class="nav nav-pills zclearfix" role="tablist" id="generalTabs">

                                    <li role="presentation" data-cate="1" class="<empty name='Think.post.cate'>active<else /><eq name='Think.post.cate' value='1'>active</eq></empty>" data-toggle="tooltip" data-placement="bottom" data-original-title="数据概况">

                                        <a href="#activeUsers" aria-controls="activeUsers" role="tab" data-toggle="tab" data="activeUsers">数据概况</a>

                                    </li>

                                    <li role="presentation" data-cate="2" class="<eq name='Think.post.cate' value='2'>active</eq>" data-toggle="tooltip" data-placement="bottom" data-original-title="当日新进入游戏的玩家数">

                                        <a href="#newUsers" aria-controls="newUsers" role="tab" data-toggle="tab" data="newUsers">新增玩家</a>

                                    </li>

                                    <li role="presentation" data-cate="3" class="<eq name='Think.post.cate' value='3'>active</eq>" data-toggle="tooltip" data-placement="bottom" data-original-title="当日进行过充值的玩家数">

                                        <a href="#payUsers" aria-controls="payUsers" role="tab" data-toggle="tab" data="payUsers">付费玩家</a>

                                    </li>



                                    <li role="presentation" data-cate="4" class="<eq name='Think.post.cate' value='4'>active</eq>" data-toggle="tooltip" data-placement="bottom" data-original-title="当日内付费玩家占当日活跃玩家的比例">

                                        <a href="#usersPayRate" aria-controls="usersPayRate" role="tab" data-toggle="tab" data="usersPayRate">付费率</a>

                                    </li>

                                    <li role="presentation" data-cate="5" class="<eq name='Think.post.cate' value='5'>active</eq>" data-toggle="tooltip" data-placement="bottom" data-original-title="当日每活跃玩家平均收入(流水/活跃玩家)">

                                        <a href="#usersArpu" aria-controls="usersArpu" role="tab" data-toggle="tab" data="usersArpu">ARPU</a>

                                    </li>

                                    <li role="presentation" data-cate="6" class="<eq name='Think.post.cate' value='6'>active</eq>" data-toggle="tooltip" data-placement="bottom" data-original-title="当日每付费玩家平均收入(流水/付费玩家数)">

                                        <a href="#usersArppu" aria-controls="usersArppu" role="tab" data-toggle="tab" data="usersArppu">ARPPU</a>

                                    </li>



                                </ul>

								<div class="input-inline clearfix">

                                    <form class="form-inline formwidth120" id="daySearch" action="{:U('Stats/overview')}" method="post">

	<input type="hidden" id="cate" name="cate" value="{:I('cate')}">

                                        <div class="form-group form-group-sm right">

                                            <div class="input-group">

                                                <button class="right btn user_btn3" type="submit" id="search">查询</button>

                                            </div>

                                        </div>

                                        <div class="form-group form-group-sm right">

                                            <div class="input-group">

                                                <input class="form-control f-w-140 hasDatepicker " id="time_start" type="text" name="time_end" value="{:empty(I('post.time_end')) ? date('Y-m-d') : I('post.time_end')}" placeholder="{:date('Y-m-d')}">

                                                <span class="iconfont icon-calendarz jsdropdownbtn"></span>

                                            </div>

                                        </div>



                                        <div class="form-group form-group-sm right magn_l20">

                                            <div class="input-group">

                                                <input class="form-control f-w-140 hasDatepicker " id="time_end" type="text" name="time_start" value="{:empty(I('post.time_start')) ? date('Y-m-d',strtotime('-6day')) : I('post.time_start')}" placeholder="{:date('Y-m-d',strtotime('-6day'))}">

                                                <span class="iconfont icon-calendarz jsdropdownbtn"></span>

                                            </div>

                                        </div>

                                        <div class="form-group form-group-sm right zwm_yxname">

                                            <select class="form-control fwsub selectpicker" name="game_id" id="game_id">

                                                <option value="">游戏名称</option>

                                                <volist name=":getDevelopGameList(UID)" id="vo">

                                                <option value="{$vo.id}">{$vo.game_name}</option>

                                                </volist>

                                            </select>

                                        </div>

                                   </form>

                                </div>

                                <div class="tab-content f-mb-20 zwm_margt40">

                                    <div role="tabpanel" class="tab-pane <empty name='Think.post.cate'>active<else /><eq name='Think.post.cate' value='1'>active</eq></empty>" id="activeUsers">

                                        <div class="row f-mlr-0">

                                            <div id="activeUsersChart" style="height: 400px; padding-top: 10px; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; background-color: rgba(0, 0, 0, 0);" _echarts_instance_="1482742177146">

												<div style="position: relative; overflow: hidden; width: 950px; height: 340px;">

													<div data-zr-dom-id="bg" style="position: absolute; left: 0px; top: 0px; width: 950px; height: 340px; -webkit-user-select: none;">

													</div>

													<canvas width="950" height="340" data-zr-dom-id="0" style="position: absolute; left: 0px; top: 0px; width: 950px; height: 340px; -webkit-user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></canvas>

													<canvas width="950" height="340" data-zr-dom-id="1" style="position: absolute; left: 0px; top: 0px; width: 950px; height: 340px; -webkit-user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></canvas>

													<canvas width="950" height="340" data-zr-dom-id="_zrender_hover_" style="position: absolute; left: 0px; top: 0px; width: 950px; height: 340px; -webkit-user-select: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></canvas>

												</div>

											</div>

                                            <div id="activeUsersTable" style="display:none;" class="table-container"></div>

                                        </div>

                                    </div>

                                    <div role="tabpanel" class="tab-pane <eq name='Think.post.cate' value='2'>active</eq>" id="newUsers">

                                        <div class="row f-mlr-0">

                                            <div id="newUsersChart" style="height:350px;padding-top:10px;"></div>

                                            <div id="newUsersTable" style="display:none;" class="table-container"></div>

                                        </div>

                                    </div>



                                    <div role="tabpanel" class="tab-pane <eq name='Think.post.cate' value='3'>active</eq>" id="payUsers">

                                        <div class="row f-mlr-0">

                                            <div id="payUsersChart" style="height:350px;padding-top:10px;"></div>

                                            <div id="payUsersTable" style="display:none;" class="table-container"></div>

                                        </div>

                                    </div>







                                    <div role="tabpanel" class="tab-pane <eq name='Think.post.cate' value='4'>active</eq>" id="usersPayRate">

                                        <div class="row f-mlr-0">

                                            <div id="usersPayRateChart" style="height:350px;padding-top:10px;"></div>

                                            <div id="usersPayRateTable" style="display:none;" class="table-container"></div>

                                        </div>

                                    </div>



                                    <div role="tabpanel" class="tab-pane <eq name='Think.post.cate' value='5'>active</eq>" id="usersArpu">

                                        <div class="row f-mlr-0">

                                            <div id="usersArpuChart" style="height:350px;padding-top:10px;"></div>

                                            <div id="usersArpuTable" style="display:none;" class="table-container"></div>

                                        </div>

                                    </div>



                                    <div role="tabpanel" class="tab-pane <eq name='Think.post.cate' value='6'>active</eq>" id="usersArppu">

                                        <div class="row f-mlr-0">

                                            <div id="usersArppuChart" style="height:350px;padding-top:10px;"></div>

                                            <div id="usersArppuTable" style="display:none;" class="table-container"></div>

                                        </div>

                                    </div>







                                </div>

                            </div>

                        </div>



                        <div class="matter_box game_data">

                            <div class="title">

                                <h3 class="zicon_xxshuju">详细数据</h3>

                            </div>

                            <div class="zwm_detaillst">

                                <div class="tab-content">

                                    <div role="tabpanel" class="tab-pane active" id="detail">

                                        <div class="table_container">

                                            <div class="table_responsive" id="dayDetail">

                                                <table id="dataContent2" class="table table_striped table_hover table-bordered egretTable">
																								
																								
																								</table>

																								
																								<div id="dataPagination" class="pagination pagination_wrap" style="display:block;padding:30px 0 0;margin-bottom:0;">总共 1 条记录 <span class="current prev">上一页</span><span class="current">1</span><span class="current next">下一页</span></div>

																								
                                            <table  id="detailTable"  class="table table_striped table_hover table-bordered egretTable" style="display:none;">
                                    <thead>

                                        <tr>

                                            <th class="">日期</th>

                                            <th class="">新增玩家</th>

                                            <th class="">活跃玩家</th>

                                            <th class="">老玩家</th>

                                            <th class="">1日留存</th>

                                            <th class="">流水</th>

                                            <th class="">付费玩家</th>

                                            <th class="">新付费玩家</th>

                                            <th class="">付费率</th>

                                            <th class="">ARPU</th>

                                            <th class="">ARPPU</th>

                                            <th class="">累计付费玩家</th>

                                        </tr>

                                    </thead>

                                    <tbody>

                                    <volist name="detail_data_lists" id="vo">

                                        <tr name="rows">

                                            <td>{$key}</td>

                                            <td>{$vo.add_user}</td>

                                            <td>{$vo.active_user}</td>

                                            <td>{$vo['active_user']-$vo['add_user']}</td>

                                            <td>{:round($vo['keep_user']/$vo['add_user']*100,2)}%</td>

                                            <td>{$vo.spend}</td>

                                            <td>{$vo.payer_num}</td>

                                            <td>{$vo.new_payer_num}</td>

                                            <td>{:round($vo['payer_num']/$vo['active_user']*100,2)}%</td>

                                            <td>{:round($vo['spend']/$vo['active_user'],2)}</td>

                                            <td>{:round($vo['spend']/$vo['payer_num'],2)}</td>

                                            <td>{$vo.payer_num_total}</td>

                                        </tr>

                                    </volist>
																		</tbody>

																						</table>

                            </div>

                        </div>

                    </div>



                    <input type="hidden" value="detail" name="detailType" id="detailType">

                </div>

                            </div>

        </div>





                    </div>

 </block>

<block name="script"> 

    <script src="__JS__/getGeneral.js"></script>

    <script>

        $(function() {

            Think.setValue('game_id',"{:I('post.game_id')}");

            $('input[name=time_start]').datetimepicker({

                format: 'yyyy-mm-dd',

                language:"zh-CN",

                minView:2,

                autoclose:true

            });

$('#generalTabs li').click(function() {
	var that = $(this);
	
	$('#cate').val(that.attr('data-cate'));
	
	
});

            $('input[name=time_end]').datetimepicker({

                format: 'yyyy-mm-dd',

                language:"zh-CN",

                minView:2,

                autoclose:true

            });

$('.jsdropdownbtn').click(function() {
	var that = $(this);
	if(that.hasClass('active')) {
		that.removeClass('active');that.siblings('input').blur();
	} else {
		that.addClass('active');that.siblings('input').focus();
	}
	
	return false;
});
$('#game_id').selectpicker({

				    size: 15

			    });
            

        });

   

   var dataJson = {$json_data};

   // var dataJson = {"newUsers":{"2018-04-03":"50","2018-04-04":"30","2018-04-05":"100","2018-04-06":"70","2018-04-07":"90","2018-04-08":"30","2018-04-09":"60"},"activeUsers":{"2018-04-03":"40","2018-04-04":"50","2018-04-05":"30","2018-04-06":"0","2018-04-07":"20","2018-04-08":"40","2018-04-09":"30"},"oldUsers":{"2018-04-03":20,"2018-04-04":30,"2018-04-05":40,"2018-04-06":50,"2018-04-07":20,"2018-04-08":30,"2018-04-09":40},"payUsers":{"2018-04-03":"0","2018-04-04":"0","2018-04-05":"0","2018-04-06":"0","2018-04-07":"0","2018-04-08":"0","2018-04-09":"0"},"newPayUsers":{"2018-04-03":"0","2018-04-04":"0","2018-04-05":"0","2018-04-06":"0","2018-04-07":"0","2018-04-08":"0","2018-04-09":"0"},"usersIncome":{"2018-04-03":"100.00","2018-04-04":"40.00","2018-04-05":"6.00","2018-04-06":"70.00","2018-04-07":"20.00","2018-04-08":"40.00","2018-04-09":"60.00"},"usersArpu":{"2018-04-03":0,"2018-04-04":0,"2018-04-05":0,"2018-04-06":0,"2018-04-07":0,"2018-04-08":0,"2018-04-09":0},"usersArppu":{"2018-04-03":0,"2018-04-04":0,"2018-04-05":0,"2018-04-06":0,"2018-04-07":0,"2018-04-08":0,"2018-04-09":0},"usersPayRate":{"2018-04-03":0,"2018-04-04":0,"2018-04-05":0,"2018-04-06":0,"2018-04-07":0,"2018-04-08":0,"2018-04-09":0},"oldPayUsers":{"2018-04-03":0,"2018-04-04":0,"2018-04-05":0,"2018-04-06":0,"2018-04-07":0,"2018-04-08":0,"2018-04-09":0},"1RatentionRate":{"2018-04-03":0,"2018-04-04":0,"2018-04-05":0,"2018-04-06":0,"2018-04-07":0,"2018-04-08":0,"2018-04-09":0},"3RatentionRate":{"2018-04-03":0,"2018-04-04":0,"2018-04-05":0,"2018-04-06":0,"2018-04-07":0,"2018-04-08":0,"2018-04-09":0},"7RatentionRate":{"2018-04-03":0,"2018-04-04":0,"2018-04-05":0,"2018-04-06":0,"2018-04-07":0,"2018-04-08":0,"2018-04-09":0}};

    var dateKeys = ["2016-12-26","2016-12-25","2016-12-24","2016-12-23","2016-12-22","2016-12-21","2016-12-20","2016-12-19","2016-12-18","2016-12-17","2016-12-16","2016-12-15","2016-12-14","2016-12-13"];
</script>
<switch name="Think.post.cate">
<case value='2'><script>newUsersChart();</script></case>
<case value='3'><script>payUsersChart();</script></case>
<case value='4'><script>usersPayRateChart();</script></case>
<case value='5'><script>usersArpuChart();</script></case>
<case value='6'><script>usersArppuChart();</script></case>
<default />
<script>
    activeUsersChart();
</script>
</switch>
<script>


				tablePage('detailTable', 'dataContent2', 'dataPagination', [1],false);


        $.VMenu.show('#menu');

        $.VMenu.open('m5');



    </script>

</block>