|
|
|
@ -167,20 +167,23 @@ class StatController extends ThinkController
|
|
|
|
|
$error = '请选择游戏!';
|
|
|
|
|
$status = false;
|
|
|
|
|
}
|
|
|
|
|
if ($deviceType == '') {
|
|
|
|
|
$error = '请选择设备类型!';
|
|
|
|
|
$status = false;
|
|
|
|
|
}
|
|
|
|
|
$startTime = strtotime($start . ' 00:00:00');
|
|
|
|
|
$endTime = strtotime($end . ' 23:59:59') + 1;
|
|
|
|
|
if ((($endTime - $startTime)/(24*3600)) > 31) {
|
|
|
|
|
$error = '时间间隔不能超过31天';
|
|
|
|
|
$status = false;
|
|
|
|
|
}
|
|
|
|
|
$searchGameId = 0;
|
|
|
|
|
if ($status) {
|
|
|
|
|
|
|
|
|
|
$baseGame = M('base_game', 'tab_')->where(['id' => $baseGameId])->find();
|
|
|
|
|
$gameId = $deviceType == 'android' ? $baseGame['android_game_id'] : $baseGame['ios_game_id'];
|
|
|
|
|
$gameIds = [];
|
|
|
|
|
if ($deviceType) {
|
|
|
|
|
$searchGameId = $deviceType == 'android' ? $baseGame['android_game_id'] : $baseGame['ios_game_id'];
|
|
|
|
|
$gameIds[] = $searchGameId;
|
|
|
|
|
} else {
|
|
|
|
|
$gameIds = [$baseGame['android_game_id'], $baseGame['ios_game_id']];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$client = new Client([
|
|
|
|
|
'base_uri' => C('TASK_URL'),
|
|
|
|
@ -192,7 +195,7 @@ class StatController extends ThinkController
|
|
|
|
|
'start_time' => $start,
|
|
|
|
|
'end_time' => $end,
|
|
|
|
|
'promote_id' => I('promote_id', 0),
|
|
|
|
|
'game_id' => $gameId,
|
|
|
|
|
'game_ids' => $gameIds,
|
|
|
|
|
]
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
@ -203,7 +206,7 @@ class StatController extends ThinkController
|
|
|
|
|
}
|
|
|
|
|
$data = $result['data']['records'];
|
|
|
|
|
$dayList = [1, 2, 3, 4, 5, 6, 7, 15, 30];
|
|
|
|
|
$gameName = get_game_name($gameId);
|
|
|
|
|
$gameName = $deviceType ? get_game_name($searchGameId) : $baseGame['name'];
|
|
|
|
|
$promoteName = '全部';
|
|
|
|
|
if ($promoteId) {
|
|
|
|
|
$promoteName = get_promote_account($promoteId);
|
|
|
|
|