推广后台功能开发
parent
81fbe02e9f
commit
3f92608468
@ -0,0 +1,331 @@
|
||||
<extend name="Public/promote_base"/>
|
||||
<block name="css">
|
||||
<link href="__CSS__/20180207/account.css" rel="stylesheet" >
|
||||
<link href="__STATIC__/icons_alibaba/iconfont.css?v=1.3" rel="stylesheet">
|
||||
<style>
|
||||
.form-group {
|
||||
float: left;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.form-group label {
|
||||
line-height: 34px;
|
||||
height: 34px;
|
||||
}
|
||||
.iconsort {
|
||||
font-size: 1rem;
|
||||
}
|
||||
.normal_table tr .sort {
|
||||
color: #145ccd;
|
||||
cursor: pointer;
|
||||
}
|
||||
.trunk-search .select-time .txt {
|
||||
width: 100px;
|
||||
}
|
||||
.title-cursor-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
</block>
|
||||
<block name="body">
|
||||
<div class="page-list normal_list promote-mychlid-list">
|
||||
<div class="trunk-title">
|
||||
<div class="location">
|
||||
<div class="location-container">当前位置:<span>数据管理></span><span>用户留存率</span></div>
|
||||
</div>
|
||||
<img src="__IMG__/20180207/icon_normal_game.png">
|
||||
<span class="title_main">角色查询</span>
|
||||
</div>
|
||||
<div class="trunk-content article">
|
||||
<div class="trunk-search clearfix jssearch">
|
||||
<div class="form-group normal_space">
|
||||
<select id="game-select" name="game_id" class="reselect select_gallery" style="width: 220px;" >
|
||||
<option value="0">请选择游戏</option>
|
||||
<volist name="baseGames" id="game">
|
||||
<option value="{$game.id}" <if condition="I('game_id') eq $game['id']">selected</if>>{$game.name}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group normal_space">
|
||||
<select id="sdk_version" name="device_type" class="reselect select_gallery" style="width: 220px;" >
|
||||
<option value="0">请选择设备类型</option>
|
||||
<option value="1" <if condition="I('device_type') === '1'">selected</if>>Andriod</option>
|
||||
<option value="2" <if condition="I('device_type') === '2'">selected</if>>IOS</option>
|
||||
</select>
|
||||
</div>
|
||||
<include file="Public/promote_select" />
|
||||
<div class="form-group normal_space fr">
|
||||
<label>起止时间:</label>
|
||||
<input type="text" class="txt range-date" name="time_range" placeholder="创建时间" value="{$start} 至 {$end}" >
|
||||
</div>
|
||||
<div class="form-group normal_space">
|
||||
<input type="hidden" name="last_sort_name" id="last_sort_name" value="{:I('sort_name', '')}">
|
||||
<input type="hidden" name="sort_name" id="sort_name" value="{:I('sort_name', '')}">
|
||||
<input type="hidden" name="sort" id="sort" value="{$sort}">
|
||||
<input type="submit" class="submit" id='submit' url="{:U('Query/userretention','model='.$model['name'],false)}"
|
||||
value="查询">
|
||||
</div>
|
||||
</div>
|
||||
<div class="trunk-list list_normal">
|
||||
<table class="table normal_table">
|
||||
<tr class="odd">
|
||||
<th class="sort" sort-name="date" class="title-cursor-pointer">日期
|
||||
<if condition="'date' == I('sort_name', '')">
|
||||
<if condition="1 == $sort">
|
||||
<i class="iconfont iconsort-down"></i>
|
||||
<else/>
|
||||
<i class="iconfont iconsort-up"></i>
|
||||
</if>
|
||||
<else/>
|
||||
<i class="iconfont iconsort"></i>
|
||||
</if>
|
||||
</th>
|
||||
<th>游戏名称</th>
|
||||
<th>渠道名称</th>
|
||||
<th class="sort" sort-name="register_count" class="title-cursor-pointer">新增玩家
|
||||
<if condition="'register_count' == I('sort_name', '')">
|
||||
<if condition="1 == $sort">
|
||||
<i class="iconfont iconsort-down"></i>
|
||||
<else/>
|
||||
<i class="iconfont iconsort-up"></i>
|
||||
</if>
|
||||
<else/>
|
||||
<i class="iconfont iconsort"></i>
|
||||
</if>
|
||||
</th>
|
||||
<th class="sort" sort-name="retention_day1" class="title-cursor-pointer">1日留存
|
||||
<if condition="'retention_day1' == I('sort_name', '')">
|
||||
<if condition="1 == $sort">
|
||||
<i class="iconfont iconsort-down"></i>
|
||||
<else/>
|
||||
<i class="iconfont iconsort-up"></i>
|
||||
</if>
|
||||
<else/>
|
||||
<i class="iconfont iconsort"></i>
|
||||
</if>
|
||||
</th>
|
||||
<th class="sort" sort-name="retention_day2" class="title-cursor-pointer">2日留存
|
||||
<if condition="'retention_day2' == I('sort_name', '')">
|
||||
<if condition="1 == $sort">
|
||||
<i class="iconfont iconsort-down"></i>
|
||||
<else/>
|
||||
<i class="iconfont iconsort-up"></i>
|
||||
</if>
|
||||
<else/>
|
||||
<i class="iconfont iconsort"></i>
|
||||
</if>
|
||||
</th>
|
||||
<th class="sort" sort-name="retention_day3" class="title-cursor-pointer">3日留存
|
||||
<if condition="'retention_day3' == I('sort_name', '')">
|
||||
<if condition="1 == $sort">
|
||||
<i class="iconfont iconsort-down"></i>
|
||||
<else/>
|
||||
<i class="iconfont iconsort-up"></i>
|
||||
</if>
|
||||
<else/>
|
||||
<i class="iconfont iconsort"></i>
|
||||
</if>
|
||||
</th>
|
||||
<th class="sort" sort-name="retention_day4" class="title-cursor-pointer">4日留存
|
||||
<if condition="'retention_day4' == I('sort_name', '')">
|
||||
<if condition="1 == $sort">
|
||||
<i class="iconfont iconsort-down"></i>
|
||||
<else/>
|
||||
<i class="iconfont iconsort-up"></i>
|
||||
</if>
|
||||
<else/>
|
||||
<i class="iconfont iconsort"></i>
|
||||
</if>
|
||||
</th>
|
||||
<th class="sort" sort-name="retention_day5" class="title-cursor-pointer">5日留存
|
||||
<if condition="'retention_day5' == I('sort_name', '')">
|
||||
<if condition="1 == $sort">
|
||||
<i class="iconfont iconsort-down"></i>
|
||||
<else/>
|
||||
<i class="iconfont iconsort-up"></i>
|
||||
</if>
|
||||
<else/>
|
||||
<i class="iconfont iconsort"></i>
|
||||
</if>
|
||||
</th>
|
||||
<th class="sort" sort-name="retention_day6" class="title-cursor-pointer">6日留存
|
||||
<if condition="'retention_day6' == I('sort_name', '')">
|
||||
<if condition="1 == $sort">
|
||||
<i class="iconfont iconsort-down"></i>
|
||||
<else/>
|
||||
<i class="iconfont iconsort-up"></i>
|
||||
</if>
|
||||
<else/>
|
||||
<i class="iconfont iconsort"></i>
|
||||
</if>
|
||||
</th>
|
||||
<th class="sort" sort-name="retention_day7" class="title-cursor-pointer">7日留存
|
||||
<if condition="'retention_day7' == I('sort_name', '')">
|
||||
<if condition="1 == $sort">
|
||||
<i class="iconfont iconsort-down"></i>
|
||||
<else/>
|
||||
<i class="iconfont iconsort-up"></i>
|
||||
</if>
|
||||
<else/>
|
||||
<i class="iconfont iconsort"></i>
|
||||
</if>
|
||||
</th>
|
||||
<th class="sort" sort-name="retention_day15" class="title-cursor-pointer">15日留存
|
||||
<if condition="'retention_day15' == I('sort_name', '')">
|
||||
<if condition="1 == $sort">
|
||||
<i class="iconfont iconsort-down"></i>
|
||||
<else/>
|
||||
<i class="iconfont iconsort-up"></i>
|
||||
</if>
|
||||
<else/>
|
||||
<i class="iconfont iconsort"></i>
|
||||
</if>
|
||||
</th>
|
||||
<th class="sort" sort-name="retention_day30" class="title-cursor-pointer">30日留存
|
||||
<if condition="'retention_day30' == I('sort_name', '')">
|
||||
<if condition="1 == $sort">
|
||||
<i class="iconfont iconsort-down"></i>
|
||||
<else/>
|
||||
<i class="iconfont iconsort-up"></i>
|
||||
</if>
|
||||
<else/>
|
||||
<i class="iconfont iconsort"></i>
|
||||
</if>
|
||||
</th>
|
||||
</tr>
|
||||
<empty name="data">
|
||||
<tr><td colspan="13" class="text-align: center;height: 45vh;"">
|
||||
<?= $error ? '<span style="color: #ff0000;">' . $error . '</span>': '<img src="__IMG__/20180207/icon_wushujv2.png"/><p style="line-height: 40px;color: #A5A5A5;">暂无数据</p>' ?></td>
|
||||
</tr>
|
||||
<else />
|
||||
<volist name="data" id="vo">
|
||||
<tr>
|
||||
<td>{$vo.date}</td>
|
||||
<td>{$vo.game_name}</td>
|
||||
<td>{$vo.promote_name}</td>
|
||||
<td>{$vo.register_count}</td>
|
||||
<?php if ($vo['register_count']>0):?>
|
||||
<td>{$vo['retention_day1']}%</td>
|
||||
<td>{$vo['retention_day2']}%</td>
|
||||
<td>{$vo['retention_day3']}%</td>
|
||||
<td>{$vo['retention_day4']}%</td>
|
||||
<td>{$vo['retention_day5']}%</td>
|
||||
<td>{$vo['retention_day6']}%</td>
|
||||
<td>{$vo['retention_day7']}%</td>
|
||||
<td>{$vo['retention_day15']}%</td>
|
||||
<td>{$vo['retention_day30']}%</td>
|
||||
<?php else:?>
|
||||
<td>--</td>
|
||||
<td>--</td>
|
||||
<td>--</td>
|
||||
<td>--</td>
|
||||
<td>--</td>
|
||||
<td>--</td>
|
||||
<td>--</td>
|
||||
<td>--</td>
|
||||
<td>--</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</volist>
|
||||
</empty>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="pagenation clearfix">
|
||||
<?php if ($loginer['level'] !== 4) :?>
|
||||
<a id="sch-btn" data-href="{:U('download/userRoles_data_export',array_merge(['xlsname'=>'ceshi'],I('get.')))}" class="ajax-get">导出</a>
|
||||
<?php endif ;?>
|
||||
{$pagination}
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-explain promote-mychlid-explain">
|
||||
<div class="trunk-content article border_normal">
|
||||
<!-- <table class="desccontent">
|
||||
<tr><td class="title" style="width: 100px;display: inline-block;">二级渠道说明:</td><td class="det">推广员默认为一级渠道,一级渠道可通过推广员后台新增二级渠道;二级渠道由一级渠道管理开启权限,并由一级渠道给二级渠道结算,结算可到财务管理操作。</td></tr>
|
||||
</table>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
<block name="script">
|
||||
<link rel="stylesheet" href="__STATIC__/flatpickr/flatpickr.min.css">
|
||||
<script src="__STATIC__/flatpickr/flatpickr.min.js"></script>
|
||||
<script src="__STATIC__/flatpickr/l10n/zh.js"></script>
|
||||
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/common.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
setValue('row', '{:I("get.row",10)}');
|
||||
|
||||
var defaultDate = $('.range-date').val()
|
||||
defaultDate = defaultDate == '' ? [] : defaultDate.split(' 至 ')
|
||||
$('.range-date').flatpickr({
|
||||
mode: 'range',
|
||||
locale: 'zh',
|
||||
dateFormat: "Y-m-d",
|
||||
defaultDate: defaultDate,
|
||||
})
|
||||
$('.select_gallery').select2()
|
||||
var gameId = $('#game-select').val();
|
||||
var sdkVersion = $('#sdk_version').val();
|
||||
var defaultServerId = $('#server-select').attr('data-server');
|
||||
getGameServers(gameId, sdkVersion, defaultServerId)
|
||||
$('#game-select,#sdk_version').on({
|
||||
change: function name() {
|
||||
gameId = $('#game-select').val();
|
||||
sdkVersion = $('#sdk_version').val();
|
||||
getGameServers(gameId, sdkVersion, 0);
|
||||
}
|
||||
});
|
||||
function getGameServers(gameId, sdkVersion, defaultServerId) {
|
||||
$.ajax({
|
||||
url: "{:U('Query/getGameServers')}",
|
||||
dataType: 'json',
|
||||
data: {game_id: gameId, sdk_version: sdkVersion},
|
||||
success: function(response) {
|
||||
var options = '<option value="0">请选择区服</option>'
|
||||
for (var i in response.data.servers) {
|
||||
var server = response.data.servers[i]
|
||||
var selected = ''
|
||||
if (defaultServerId > 0 && server.id==defaultServerId) {
|
||||
selected = 'selected'
|
||||
}
|
||||
options += '<option value="' + server.server_id + '"' + selected + '>' + server.server_name + '</option>'
|
||||
}
|
||||
$('#server-select').html(options)
|
||||
$("#server-select").val(defaultServerId).trigger("change")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
var promoteUrl = "{:U('Query/getSubPromotes')}"
|
||||
initPromoteSelect(promoteUrl)
|
||||
|
||||
$('.sort').click(function () {
|
||||
var element = $(this);
|
||||
var sortName = element.attr('sort-name');
|
||||
var sort = parseInt($('#sort').val());
|
||||
|
||||
sort = (sort === 1) ? 2 : 1;
|
||||
$('#sort').val(sort);
|
||||
$('#sort_name').val(sortName);
|
||||
$('#submit').trigger('click');
|
||||
});
|
||||
|
||||
$('#submit').click(function () {
|
||||
var url = $(this).attr('url');
|
||||
console.log(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;
|
||||
}
|
||||
window.location.href = url;
|
||||
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</block>
|
Loading…
Reference in New Issue