Merge remote-tracking branch 'origin/dev' into dev

master
liuweiwen 5 years ago
commit 866e8ad44c

@ -111,6 +111,10 @@ class BehaviorLogController extends ThinkController
$map['tab_repair_pay.type'] = $params['type'];
}
if(isset($params['type'])) {
$map['tab_spend.extend'] = $params['extend'];
}
if(isset($params['pay_order_number'])) {
$map['tab_repair_pay.pay_order_number'] = $params['pay_order_number'];
}
@ -120,8 +124,8 @@ class BehaviorLogController extends ThinkController
}
if(!empty(I('get.order_number'))) {
$map['tab_spend.order_number'] = I('get.order_number');
if(!empty(I('get.extend'))) {
$map['tab_spend.extend'] = I('get.extend');
$data = M('repair_pay', 'tab_')->join('tab_spend on tab_spend.pay_order_number = tab_repair_pay.pay_order_number')->where($map)->page($p, $row)->order('tab_repair_pay.id DESC')->select();
} else {
$data = M('repair_pay', 'tab_')->where($map)->page($p, $row)->order('id DESC')->select();
@ -133,10 +137,10 @@ class BehaviorLogController extends ThinkController
$order_detail = M('spend', 'tab_')->field('extend,pay_time,user_account,promote_account,game_name,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
$re_data['pay_time'] = $order_detail['pay_time'];
} elseif($v['tab'] == 'deposit') {
$order_detail = M('deposit', 'tab_')->field('order_number,create_time,user_account,promote_account,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
$order_detail = M('deposit', 'tab_')->field('create_time,user_account,promote_account,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
$re_data['pay_time'] = $order_detail['create_time'];
}
$re_data['order_number'] = isset($order_detail['extend']) ? $order_detail['extend'] : '-';
$re_data['extend'] = isset($order_detail['extend']) ? $order_detail['extend'] : '-';
$re_data['user_account'] = $order_detail['user_account'];
$re_data['promote_account'] = $order_detail['promote_account'];
$re_data['game_name'] = !empty($order_detail['game_name']) ? $order_detail['game_name'] : '-';
@ -149,8 +153,8 @@ class BehaviorLogController extends ThinkController
$show_data[] = $re_data;
}
if(!empty(I('get.order_number'))) {
$map['tab_spend.order_number'] = I('get.order_number');
if(!empty(I('get.extend'))) {
$map['tab_spend.extend'] = I('get.extend');
$count = M('repair_pay', 'tab_')->join('tab_spend on tab_spend.pay_order_number = tab_repair_pay.pay_order_number')->where($map)->count();
} else {
$count = M('repair_pay', 'tab_')->where($map)->count();

@ -2151,7 +2151,7 @@ class ExportController extends Controller
$xlsCell = array(
array('type', '类型'),
array('pay_order_number', '支付订单号'),
array('order_number', 'CP订单号'),
array('extend', 'CP订单号'),
array('pay_time', '充值时间'),
array('user_account', '玩家账号'),
array('promote_account', '所属推广员'),
@ -2169,6 +2169,9 @@ class ExportController extends Controller
$map['tab_repair_pay.create_time'] = array('BETWEEN', [$startTime, $endTime]);
}
if(isset($params['type'])) {
$map['tab_spend.extend'] = $params['extend'];
}
if(isset($params['type'])) {
$map['tab_repair_pay.type'] = $params['type'];
@ -2183,8 +2186,8 @@ class ExportController extends Controller
}
if(!empty(I('get.order_number'))) {
$map['tab_spend.order_number'] = I('get.order_number');
if(!empty(I('get.extend'))) {
$map['tab_spend.extend'] = I('get.extend');
$data = M('repair_pay', 'tab_')->join('tab_spend on tab_spend.pay_order_number = tab_repair_pay.pay_order_number')->where($map)->page($p, $row)->order('tab_repair_pay.id DESC')->select();
} else {
$data = M('repair_pay', 'tab_')->where($map)->page($p, $row)->order('id DESC')->select();
@ -2193,13 +2196,13 @@ class ExportController extends Controller
$xlsData = [];
foreach($data as $k => $v) {
if($v['tab'] == 'spend') {
$order_detail = M('spend', 'tab_')->field('order_number,pay_time,user_account,promote_account,game_name,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
$order_detail = M('spend', 'tab_')->field('extend,pay_time,user_account,promote_account,game_name,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
$re_data['pay_time'] = set_show_time($order_detail['pay_time']);
} elseif($v['tab'] == 'deposit') {
$order_detail = M('deposit', 'tab_')->field('order_number,create_time,user_account,promote_account,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
$order_detail = M('deposit', 'tab_')->field('create_time,user_account,promote_account,pay_amount,pay_way')->where(['pay_order_number' => $v['pay_order_number']])->find();
$re_data['pay_time'] = set_show_time($order_detail['create_time']);
}
$re_data['order_number'] = !empty($order_detail['order_number']) ? $order_detail['order_number'] : '-';
$re_data['extend'] = !empty($order_detail['extend']) ? $order_detail['extend'] : '-';
$re_data['user_account'] = $order_detail['user_account'];
$re_data['promote_account'] = $order_detail['promote_account'];
$re_data['game_name'] = !empty($order_detail['game_name']) ? $order_detail['game_name'] : '-';
@ -3122,7 +3125,7 @@ class ExportController extends Controller
}
if ($status) {
$client = new Client([
'base_uri' => C('PACKAGE_SERVER_URL'),
'base_uri' => C('TASK_URL'),
'timeout' => 10.0,
]);
$response = $client->post('/statistics/player-retention', [
@ -3512,23 +3515,27 @@ class ExportController extends Controller
$start_time = $start = strtotime($start);
$end_time = $end = strtotime($end) + 86400;
if (is_file(RUNTIME_PATH.'/access_data_ltv.txt')) {
$filetxt = file_get_contents(RUNTIME_PATH.'/access_data_ltv.txt');
// if (is_file(RUNTIME_PATH.'/access_data_ltv.txt')) {
// $filetxt = file_get_contents(RUNTIME_PATH.'/access_data_ltv.txt');
$data = json_decode($filetxt, true);
}
// $data = json_decode($filetxt, true);
// }
$map = " 1=1 ";
$game_map = "";
if (isset($_REQUEST['game_name'])) {
if (isset($_REQUEST['game_name']) && isset($_REQUEST['server_id'])) {
$game_ids = implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id'));
$map .= " AND game_id in (" . implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) . ")";
$map .= " AND game_id in ({$game_ids})";
$game_map = " AND EXISTS (SELECT upi.user_id FROM tab_user_play_info as upi where upi.game_id in ({$game_ids}) AND upi.user_id = u.id ";
if (isset($_REQUEST['server_name'])) $game_map .= " AND upi.server_name = '{$_REQUEST['server_name']}' ";
if (isset($_REQUEST['server_id'])) {
$game_map .= " AND upi.server_id = '{$_REQUEST['server_id']}' ";
$map .= " AND server_id = '{$_REQUEST['server_id']}' ";
};
$game_map .= ") ";
} else if (isset($_REQUEST['game_name'])) {
$game_ids = implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id'));
$map .= " AND game_id in ({$game_ids})";
$game_map = " AND EXISTS (SELECT upi.user_id FROM tab_user_play as upi where upi.game_id in ({$game_ids}) AND upi.user_id = u.id ";
$game_map .= ") ";
}
if (isset($_REQUEST['server_name'])) {
$map .= " AND server_name = '{$_REQUEST['server_name']}' ";
}
// 获取包含的用户id

@ -432,7 +432,7 @@ class PlatformController extends ThinkController
unset($_REQUEST['game_name']);
}
if (isset($_REQUEST['server_id'])) {
$play_info_map .= " and upi.server_name = '{$_REQUEST['server_id']}' ";
$play_info_map .= " and upi.server_id = '{$_REQUEST['server_id']}' ";
}
$today = total(1);
@ -489,6 +489,7 @@ class PlatformController extends ThinkController
->group('tp1.id')
->order('register_time')
->select();
// dd($tdata);die();
$tmdata = [];
foreach($data as $k=>$v){
@ -497,19 +498,18 @@ class PlatformController extends ThinkController
$v['mounth'] = 0;
$tmdata[$v['id']] = $v;
}
foreach ($tdata as $k => $v) {
$tmdata[$v['id']]['today'] = $v['today'];
$tmdata[$v['id']]['week'] = $v['week'];
$tmdata[$v['id']]['mounth'] = $v['mounth'];
if (!$tmdata[$v['id']]['promote_account']) {
$tmdata[$v['id']]['promote_account'] = $v['promote_account'];
$tmdata[$v['id']]['count'] = 0;
if(!empty($tdata)){
foreach ($tdata as $k => $v) {
$tmdata[$v['id']]['today'] = $v['today'];
$tmdata[$v['id']]['week'] = $v['week'];
$tmdata[$v['id']]['mounth'] = $v['mounth'];
if (!$tmdata[$v['id']]['promote_account']) {
$tmdata[$v['id']]['promote_account'] = $v['promote_account'];
$tmdata[$v['id']]['count'] = 0;
}
}
}
$data = [];
foreach($tmdata as $k => $v){
$data[] = $v;
@ -519,7 +519,8 @@ class PlatformController extends ThinkController
unset($map['tp1.chain']);
unset($tmap['tp1.chain']);
unset($tmap['tp1.chain']);
$map['promote_id'] = 0;
$map['u.promote_id'] = 0;
$tmap['u.promote_id'] = 0;
$authorityData['count'] = 0;
//如果有官方渠道权限
@ -527,7 +528,8 @@ class PlatformController extends ThinkController
if ($user_auth_promote_ids == 'all' || in_array('0', explode(",", $user_auth_promote_ids))) {
//官方渠道数据添加
$authorityData = M('user', 'tab_')->alias('u')
->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time,count(id) as count')
->field('date_format(FROM_UNIXTIME(register_time),"%Y-%m-%d") AS time,count(u.id) as count')
->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false)
->where($map)
->find();
$tauthorityData = M('user', 'tab_')->alias('u')
@ -536,6 +538,7 @@ class PlatformController extends ThinkController
count(IF(register_time ' . $week . ',1,null)) as week,
count(IF(register_time ' . $mounth . ',1,null)) as mounth')
->where($tmap)
->join($play_info_map ? "tab_user_play_info as upi on upi.user_id = u.id " . $play_info_map : false)
->find();
$authorityData['today'] = $tauthorityData['today'];
$authorityData['week'] = $tauthorityData['week'];

@ -172,7 +172,7 @@ class StatController extends ThinkController
}
if ($status) {
$client = new Client([
'base_uri' => C('PACKAGE_SERVER_URL'),
'base_uri' => C('TASK_URL'),
'timeout' => 10.0,
]);
$response = $client->post('/statistics/player-retention', [

@ -1035,11 +1035,14 @@ class StatisticsController extends ThinkController {
$map = " 1=1 ";
$game_map = "";
if (isset($_REQUEST['game_name']) && isset($_REQUEST['server_name'])) {
if (isset($_REQUEST['game_name']) && isset($_REQUEST['server_id'])) {
$game_ids = implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id'));
$map .= " AND game_id in ({$game_ids})";
$game_map = " AND EXISTS (SELECT upi.user_id FROM tab_user_play_info as upi where upi.game_id in ({$game_ids}) AND upi.user_id = u.id ";
if (isset($_REQUEST['server_name'])) $game_map .= " AND upi.server_name = '{$_REQUEST['server_name']}' ";
if (isset($_REQUEST['server_id'])) {
$game_map .= " AND upi.server_id = '{$_REQUEST['server_id']}' ";
$map .= " AND server_id = '{$_REQUEST['server_id']}' ";
};
$game_map .= ") ";
} else if (isset($_REQUEST['game_name'])) {
$game_ids = implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id'));

@ -51,7 +51,7 @@
<input type="text" name="pay_order_number" class="" value="{:I('pay_order_number')}" placeholder="支付订单号">
</div>
<div class="input-list">
<input type="text" name="order_number" class="" value="{:I('order_number')}" placeholder="CP订单号">
<input type="text" name="extend" class="" value="{:I('order_number')}" placeholder="CP订单号">
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="admin_name" name="admin_name" class="select_gallery" >
@ -113,7 +113,7 @@
<tr>
<td>{$vo.type}</td>
<td>{$vo.pay_order_number}</td>
<td>{$vo.order_number}</td>
<td>{$vo.extend}</td>
<td>{:set_show_time($vo['pay_time'])}</td>
<td>{$vo.user_account}</td>
<td>{$vo.promote_account}</td>

@ -286,14 +286,15 @@
$("#game_id").change(function(){
$.ajax({
url:"{:U('Ajax/getUserServer')}",
url:"{:U('getSpendServer')}",
type:"post",
data:{game_id:$("#game_id option:selected").attr('game-id')},
dataType:'json',
success:function(data){
console.log(data)
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_name+"'>"+data[i].server_name+"</option>"
str += "<option value='"+data[i].server_id+"'>"+data[i].server_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);
@ -306,14 +307,15 @@
var game_server = "{:I('server_id')}";
if(game_id){
$.ajax({
url:"{:U('Ajax/getUserServer')}",
url:"{:U('getSpendServer')}",
type:"post",
data:{game_id:game_id,type:2},
data:{game_name:game_id},
dataType:'json',
success:function(data){
console.log(data)
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_name+"' "+(game_server && data[i].server_name == game_server?'selected':'')+">"+data[i].server_name+"</option>"
str += "<option value='"+data[i].server_id+"' "+(game_server && data[i].server_id == game_server?'selected':'')+">"+data[i].server_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);

@ -65,7 +65,7 @@
<label>链接类型:</label>
<select name="link_type">
<option value="0">全部</option>
<option value="1">复制下载链接</option>
<option value="1">下载链接</option>
<option value="2">落地页下载链接</option>
</select>
</div>

@ -64,7 +64,7 @@
</select>
</div>
<div class="input-list input-list-server search_label_rehab">
<select id="server_name" name="server_name" class="select_gallery" >
<select id="server_id" name="server_id" class="select_gallery" >
<option value="">区服名称</option>
</select>
</div>
@ -128,7 +128,7 @@
'end'=>I('end',date('Y-m-d',strtotime('-1 day'))),
'game_name'=>I('game_name'),
'game_type'=>I('game_type'),
'server_name'=>I('server_name'),
'server_id'=>I('server_id'),
'xlsname'=>'统计_ltv统计'
),false)}">导出</a>
{$_page|default=''}
@ -222,7 +222,7 @@ $(function(){
pickerPosition:'bottom-right'
});
var game_server = "{:I('server_name')}";
var game_server = "{:I('server_id')}";
$("#game_type").change(function(){
console.log({sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()})
$.ajax({
@ -234,11 +234,11 @@ $(function(){
console.log(data)
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_name+"' "+(game_server && data[i].server_name == game_server?'selected':'')+">"+data[i].server_name+"</option>"
str += "<option value='"+data[i].server_id+"' "+(game_server && data[i].server_id == game_server?'selected':'')+">"+data[i].server_name+"</option>"
}
$("#server_name").empty();
$("#server_name").append(str);
$("#server_name").select2();
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
})
});

@ -42,7 +42,13 @@ class HomeController extends Controller
$secret = 'd3219c70a45c5e1954be4608b288d38b';
$tokenUrl = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=' . $appid . '&secret=' . $secret;
$content = file_get_contents(RUNTIME_PATH . 'Data/wechat_ticket');
$tempDataDir = RUNTIME_PATH . 'Data';
if(!is_dir($tempDataDir)) {
@mkdir($tempDataDir);
}
$content = file_get_contents($tempDataDir . '/wechat_ticket');
$ticketData = null;
if ($content) {
$ticketData = json_decode($content, true);

@ -6,6 +6,7 @@
<meta name="description" itemprop="description" content="{$game['features']}"/>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"/>
<meta content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width" name="viewport">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="{:get_cover(C('CH_SET_ICO'),'path')}" type="image/x-icon" rel="shortcut icon">
<script src="__JS__/jquery-1.11.3.min.js"></script>
@ -467,7 +468,7 @@
<div class="register-forget">
<div>
<div style="color:#292929;font-size: 0.22rem;">注册即表示同意</div>
<span><a href="/mobile.php?s=/News/protocol.html">《用户协议》</a></span>
<span><a href="/mobile.php?s=/News/protocol.html" style="color: #21B1EB;">《用户协议》</a></span>
</div>
<div class="phoneCut">
<img src="__IMG__/20191225/qiehuan.png" alt="">
@ -642,6 +643,7 @@ var PhoneObj = {
})
$(".mounting").click(function(){
$(".mounting").hide();
document.body.style.overflow = 'auto';
});
// $(".login").click(function(){
// $(".login").hide();

@ -440,7 +440,7 @@
width: 4.40rem;
height:0.7rem;
margin: 0.15rem 0;
background:linear-gradient(0deg,rgba(210,211,211,1),rgba(209,209,209,1));
background:linear-gradient(0deg,rgba(196,196,196,1),rgba(217,218,218,1));
box-shadow:0px 0.11rem 0.27rem 0px rgba(24,24,24,0.17);
border-radius:0.35rem;
text-align: center;
@ -588,7 +588,7 @@
}
.register-box{
width: 6rem;
height: 7.2rem;
height: 7.4rem;
background-color: #fff;
border-radius: 0.3rem;
}
@ -624,7 +624,7 @@
.input-box{
display: flex;
align-items: center;
width: 4.6rem;
width: 4.4rem;
border-bottom: 1px solid #C9C9C9;
padding-bottom: 0.14rem;
margin-bottom: 0.51rem;
@ -638,9 +638,10 @@
border: 0;
outline: 0;
font-size: 0.24rem;
width: 4rem;
}
.input-code{
width: 4.6rem;
width: 4.4rem;
display: flex;
align-items: flex-end;
justify-content: space-between;
@ -689,7 +690,7 @@
line-height: 0.7rem;
}
.register-forget{
width: 5.4rem;
width: 4.8rem;
display: flex;
align-items: center;
justify-content: space-between;
@ -782,6 +783,7 @@
color: #292929;
font-size: 0.28rem;
font-weight: bold;
width: 4.6rem;
}
.title-one>img{
width: 0.3rem;
@ -801,7 +803,7 @@
font-weight: 400;
}
.mounting-btn{
width:4.4rem;
width:4.6rem;
height:0.7rem;
background:linear-gradient(0deg,rgba(33,177,235,1),rgba(88,197,240,1));
box-shadow:0px 0.11rem 0.27rem 0px rgba(24,24,24,0.17);
@ -813,10 +815,11 @@
margin-top: 0.46rem;
}
.title-two{
margin-top: 0.77rem;
margin-top: 0.67rem;
color: #292929;
font-size: 0.28rem;
font-weight: bold;
width: 4.6rem;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Loading…
Cancel
Save