Merge branch 'dev' of 47.111.118.107:/srv/git/platform

master
zyx
commit 18cddff9a4

@ -40,8 +40,8 @@ class PromoteRepository {
if (isset($params['sdk_version'])) {
$map['sdk_version'] = $params['sdk_version'];
}
if (isset($params['begin_time']) && isset($params['begin_time'])) {
$map['create_time'] = ['between', [$params['begin_time'], $params['end_time']]];
if (isset($params['begin_time']) && isset($params['begin_time']) && isset($params['time_column'])) {
$map[$params['time_column']] = ['between', [$params['begin_time'], $params['end_time']]];
}
return $map;
}
@ -54,6 +54,7 @@ class PromoteRepository {
if (count($ids) == 0) {
return [];
}
$params['time_column'] = 'create_time';
$map = $this->getPublicAchievementMap($ids, $params);
$items = M('user_play_info', 'tab_')->field(['count(*) count', 'promote_id'])->where($map)->group('promote_id')->select();
$records = [];
@ -82,6 +83,8 @@ class PromoteRepository {
if (count($ids) == 0) {
return [];
}
$params['time_column'] = 'create_time';
$map = $this->getPublicAchievementMap($ids, $params);
$items = M('user_play_info', 'tab_')->field(['count(distinct user_id) count', 'promote_id'])->where($map)->group('promote_id')->select();
@ -111,6 +114,8 @@ class PromoteRepository {
if (count($ids) == 0) {
return [];
}
$params['time_column'] = 'create_time';
$map = $this->getPublicAchievementMap($ids, $params);
$subMap = $map;
@ -150,6 +155,8 @@ class PromoteRepository {
if (count($ids) == 0) {
return [];
}
$params['time_column'] = 'create_time';
$map = $this->getPublicAchievementMap($ids, $params);
$subMap = $map;
@ -189,6 +196,8 @@ class PromoteRepository {
if (count($ids) == 0) {
return [];
}
$params['time_column'] = 'create_time';
$map = $this->getPublicAchievementMap($ids, $params);
$subMap = $map;
@ -228,8 +237,9 @@ class PromoteRepository {
if (count($ids) == 0) {
return [];
}
$params['time_column'] = 'login_time';
$map = $this->getPublicAchievementMap($ids, $params);
$items = M('user', 'tab_')->field(['count(*) count', 'promote_id'])->where($map)->group('promote_id')->select();
$items = M('user_login_record', 'tab_')->field(['count(DISTINCT user_id) as count', 'promote_id'])->where($map)->group('promote_id')->select();
$records = [];
foreach ($items as $item) {
@ -257,6 +267,8 @@ class PromoteRepository {
if (count($ids) == 0) {
return [];
}
$params['time_column'] = 'pay_time';
$map = $this->getPublicAchievementMap($ids, $params);
$items = M('spend', 'tab_')->field(['count(*) count', 'promote_id'])->where($map)->group('promote_id')->select();
@ -287,6 +299,8 @@ class PromoteRepository {
if (count($ids) == 0) {
return [];
}
$params['time_column'] = 'pay_time';
$map = $this->getPublicAchievementMap($ids, $params);
$items = M('spend', 'tab_')->field(['count(distinct user_id) count', 'promote_id'])->where($map)->group('promote_id')->select();
@ -316,6 +330,8 @@ class PromoteRepository {
if (count($ids) == 0) {
return [];
}
$params['time_column'] = 'pay_time';
$map = $this->getPublicAchievementMap($ids, $params);
$items = M('spend', 'tab_')->field(['sum(pay_amount) amount', 'promote_id', 'pay_way'])->where($map)->group('promote_id, pay_way')->select();
$records = [];

@ -8,112 +8,131 @@ class SpendRepository {
}
private function assembleDayRecords($items, $dayList, $valueColumn, $dayColumn = 'day')
private function assembleRecords($items, $keys, $valueColumn, $keyColumn = 'day')
{
$records = [];
foreach ($dayList as $day) {
$dayValue = 0;
foreach ($keys as $key) {
$value = 0;
foreach ($items as $item) {
if ($item[$dayColumn] == $day) {
$dayValue = $item[$valueColumn];
if ($item[$keyColumn] == $key) {
$value = $item[$valueColumn];
}
}
$records[$day] = $dayValue;
$records[$key] = $value;
}
return $records;
}
/**
* 付费游戏数
*/
public function getPayGameCountByDay($params) {
private function getGameGroupConditions($params)
{
$beginTime = $params['begin_time'] ?? 0;
$endTime = $params['end_time'] ?? 0;
$ids = $params['promote_ids'] ?? [];
$isBan = $params['is_ban'] ?? false;
$gameIds = $params['game_ids'] ?? [];
$conditions = [];
$conditions['pay_status'] = 1;
$conditions['promote_id'] = ['in', $ids];
$conditions['pay_time'] = ['between', [$beginTime, $endTime]];
$conditions['game_id'] = ['in', $gameIds];
$conditions['pay_way'] = $isBan ? ['neq', '-10'] : ['neq', '-1'];
return $conditions;
}
private function getDayGroupConditions($params)
{
$beginTime = $params['begin_time'] ?? 0;
$endTime = $params['end_time'] ?? 0;
$gameId = $params['game_id'] ?? 0;
$serverId = $params['server_id'] ?? 0;
$ids = $params['promote_id'] ?? [];
$isBan = $params['is_ban'] ?? false;
$dayList = $params['dayList'] ?? [];
$map = [];
$map['pay_status'] = 1;
$map['promote_id'] = ['in', $ids];
$map['pay_time'] = ['between', [$beginTime, $endTime]];
$map['game_id'] = $gameId > 0 ? $gameId : ['gt', 0];
$map['pay_way'] = $isBan ? ['neq', '-10'] : ['neq', '-1'];
$conditions = [];
$conditions['pay_status'] = 1;
$conditions['promote_id'] = ['in', $ids];
$conditions['pay_time'] = ['between', [$beginTime, $endTime]];
$conditions['game_id'] = $gameId > 0 ? $gameId : ['gt', 0];
$conditions['pay_way'] = $isBan ? ['neq', '-10'] : ['neq', '-1'];
$field = 'FROM_UNIXTIME(pay_time,"%Y-%m-%d") as day, count(DISTINCT game_id) count';
$items = M('spend', 'tab_')->field($field)->where($map)->group('day')->select();
return $this->assembleDayRecords($items, $dayList, 'count');
return $conditions;
}
/**
* 按天统计付款总额
* 付费游戏数
*/
public function getPayAmountByDay($params) {
$beginTime = $params['begin_time'] ?? 0;
$endTime = $params['end_time'] ?? 0;
$gameId = $params['game_id'] ?? 0;
$serverId = $params['server_id'] ?? 0;
$ids = $params['promote_id'] ?? [];
$isBan = $params['is_ban'] ?? false;
public function getPayGameCountGroupByDay($params)
{
$dayList = $params['dayList'] ?? [];
$conditions = $this->getDayGroupConditions($params);
$field = 'FROM_UNIXTIME(pay_time,"%Y-%m-%d") as day, count(DISTINCT game_id) count';
$items = M('spend', 'tab_')->field($field)->where($conditions)->group('day')->select();
return $this->assembleRecords($items, $dayList, 'count');
}
$map['pay_status'] = 1;
$map['pay_time'] = ['between', [$beginTime, $endTime]];
$map['game_id'] = $gameId > 0 ? $gameId : ['gt', 0];
$map['promote_id'] = ['in', $ids];
$map['pay_way'] = $isBan ? ['neq', '-10'] : ['neq', '-1'];
/**
* 付费游戏数
*/
public function getPayGameCountGroupByGame($params)
{
$gameIds = $params['game_ids'] ?? [];
$conditions = $this->getGameGroupConditions($params);
$field = 'game_id, count(*) count';
$items = M('spend', 'tab_')->field($field)->where($conditions)->group('game_id')->select();
return $this->assembleRecords($items, $gameIds, 'count', 'game_id');
}
/**
* 按天统计付款总额
*/
public function getPayAmountGroupByDay($params) {
$dayList = $params['dayList'] ?? [];
$conditions = $this->getDayGroupConditions($params);
$field = 'FROM_UNIXTIME(pay_time,"%Y-%m-%d") as day, sum(pay_amount) as amount';
$items = M('spend', 'tab_')->field($field)->where($map)->group('day')->select();
return $this->assembleDayRecords($items, $dayList, 'amount');
$items = M('spend', 'tab_')->field($field)->where($conditions)->group('day')->select();
return $this->assembleRecords($items, $dayList, 'amount');
}
/**
* 按游戏统计付款总额
*/
public function getPayAmountGroupByGame($params) {
$gameIds = $params['game_ids'] ?? [];
$conditions = $this->getGameGroupConditions($params);
$field = 'game_id, sum(pay_amount) as amount';
$items = M('spend', 'tab_')->field($field)->where($conditions)->group('game_id')->select();
return $this->assembleRecords($items, $gameIds, 'amount', 'game_id');
}
/**
* 按天统计付款用户数
*/
public function getPayUserCountByDay($params) {
$beginTime = $params['begin_time'] ?? 0;
$endTime = $params['end_time'] ?? 0;
$gameId = $params['game_id'] ?? 0;
$serverId = $params['server_id'] ?? 0;
$ids = $params['promote_id'] ?? [];
$isBan = $params['is_ban'] ?? false;
public function getPayUserCountGroupByDay($params) {
$dayList = $params['dayList'] ?? [];
$map['pay_status'] = 1;
$map['pay_time'] = ['between', [$beginTime, $endTime]];
$map['game_id'] = $gameId > 0 ? $gameId : ['gt', 0];
$map['promote_id'] = ['in', $ids];
$map['pay_way'] = $isBan ? ['neq', '-10'] : ['neq', '-1'];
$conditions = $this->getDayGroupConditions($params);
$field = 'FROM_UNIXTIME(pay_time,"%Y-%m-%d") as day, count(distinct user_id) count';
$items = M('spend', 'tab_')->field($field)->where($conditions)->group('day')->select();
return $this->assembleRecords($items, $dayList, 'count');
}
$items = M('spend', 'tab_')->field($field)->where($map)->group('day')->select();
return $this->assembleDayRecords($items, $dayList, 'count');
/**
* 游戏统计付款用户数
*/
public function getPayUserCountGroupByGame($params) {
$gameIds = $params['game_ids'] ?? [];
$conditions = $this->getGameGroupConditions($params);
$field = 'game_id, count(distinct user_id) count';
$items = M('spend', 'tab_')->field($field)->where($conditions)->group('game_id')->select();
return $this->assembleRecords($items, $dayList, 'count', 'game_id');
}
/**
* 按照时间分组统计新增付费用户数
*/
public function getNewPayUserCountByDay($params) {
public function getNewPayUserCountGroupByDay($params) {
$dayList = $params['dayList'] ?? [];
$gameId = $params['game_id'] ?? 0;
$serverId = $params['server_id'] ?? 0;
$ids = $params['promote_id'] ?? [];
$isBan = $params['is_ban'] ?? false;
$map = [];
$map['pay_status']=1;
if ($gameId > 0) {
$map['game_id'] = $gameId;
}
if ($serverId > 0) {
$map['server_id'] = $serverId;
}
$map['promote_id'] = ['in', $ids];
$map['pay_way'] = $isBan ? ['neq', '-10'] : ['neq', '-1'];
$conditions = $this->getDayGroupConditions($params);
$oldMap = $map;
$records = [];
@ -129,26 +148,27 @@ class SpendRepository {
return $records;
}
/**
* 按照时间分组统计新增付费用户数
*/
public function getNewPayUserCountGroupByGame($params) {
$beginTime = $params['begin_time'] ?? 0;
$gameIds = $params['game_ids'] ?? [];
$conditions = $this->getGameGroupConditions($params);
$oldConditions = $conditions;
$oldConditions['pay_time'] = ['lt', $beginTime];
$oldQuery = M('spend', 'tab_')->field('user_id')->where($oldConditions)->group('user_id')->buildSql();
$map['user_id'] = ['exp', ' not in (' . $oldQuery . ')'];
$items = M('spend', 'tab_')->field('count(distinct user_id) count, game_id')->where($conditions)->group('game_id')->find();
return $this->assembleRecords($items, $gameIds, 'amount', 'game_id');
}
/**
* 按照时间分组统计新增付费用户付费金额
*/
public function getNewPayAmountByDay($params) {
public function getNewPayAmountGroupByDay($params) {
$dayList = $params['dayList'] ?? [];
$gameId = $params['game_id'] ?? 0;
$serverId = $params['server_id'] ?? 0;
$ids = $params['promote_id'] ?? [];
$isBan = $params['is_ban'] ?? false;
$map = [];
$map['pay_status']=1;
if ($gameId > 0) {
$map['game_id'] = $gameId;
}
if ($serverId > 0) {
$map['server_id'] = $serverId;
}
$map['promote_id'] = ['in', $ids];
$map['pay_way'] = $isBan ? ['neq', '-10'] : ['neq', '-1'];
$conditions = $this->getDayGroupConditions($params);
$oldMap = $map;
$records = [];
@ -165,26 +185,28 @@ class SpendRepository {
return $records;
}
/**
/**
* 按照游戏统计新增付费用户付费金额
*/
public function getNewPayAmountGroupByGame($params) {
$beginTime = $params['begin_time'] ?? 0;
$gameIds = $params['game_ids'] ?? [];
$conditions = $this->getGameGroupConditions($params);
$oldConditions = $conditions;
$oldConditions['pay_time'] = ['lt', $beginTime];
$oldQuery = M('spend', 'tab_')->field('user_id')->where($oldConditions)->group('user_id')->buildSql();
$map['user_id'] = ['exp', ' not in (' . $oldQuery . ')'];
$items = M('spend', 'tab_')->field('sum(pay_amount) amount, game_id')->where($conditions)->group('game_id')->find();
return $this->assembleRecords($items, $gameIds, 'amount', 'game_id');
}
/**
* 统计给定时间前的付费玩家总数
*/
public function getHistoryPayCountByDay($params) {
public function getHistoryPayCountGroupByDay($params)
{
$dayList = $params['dayList'] ?? [];
$gameId = $params['game_id'] ?? 0;
$serverId = $params['server_id'] ?? 0;
$ids = $params['promote_id'] ?? [];
$isBan = $params['is_ban'] ?? false;
$map = [];
$map['pay_status']=1;
if ($gameId > 0) {
$map['game_id'] = $gameId;
}
if ($serverId > 0) {
$map['server_id'] = $serverId;
}
$map['promote_id'] = ['in', $ids];
$map['pay_way'] = $isBan ? ['neq', '-10'] : ['neq', '-1'];
$conditions = $this->getDayGroupConditions($params);
$records = [];
foreach ($dayList as $day) {
@ -195,4 +217,16 @@ class SpendRepository {
}
return $records;
}
/**
* 统计给定时间前的付费玩家总数
*/
public function getHistoryPayCountGroupByGame($params)
{
$beginTime = $params['begin_time'] ?? 0;
$conditions = $this->getGameGroupConditions($params);
$conditions['pay_time'] = ['elt', $beginTime];
$items = M('spend', 'tab_')->field('count(DISTINCT user_id) as count, game_id')->where($conditions)->group('game_id')->find();
return $this->assembleRecords($items, $gameIds, 'count', 'game_id');
}
}

@ -8,79 +8,115 @@ class UserRepository {
}
private function assembleDayRecords($items, $dayList, $valueColumn, $dayColumn = 'day')
private function assembleRecords($items, $keys, $valueColumn, $keyColumn = 'day')
{
$records = [];
foreach ($dayList as $day) {
$dayValue = 0;
foreach ($keys as $key) {
$value = 0;
foreach ($items as $item) {
if ($item[$dayColumn] == $day) {
$dayValue = $item[$valueColumn];
if ($item[$keyColumn] == $key) {
$value = $item[$valueColumn];
}
}
$records[$day] = $dayValue;
$records[$key] = $value;
}
return $records;
}
/**
* 按照时间分组统计登录总数
*/
public function getLoginCountByDay($params) {
private function getDayGroupConditions($params)
{
$beginTime = $params['begin_time'] ?? 0;
$endTime = $params['end_time'] ?? 0;
$gameId = $params['game_id'] ?? 0;
$serverId = $params['server_id'] ?? 0;
$ids = $params['promote_id'] ?? [];
$dayList = $params['dayList'] ?? [];
$map = [];
$map['login_time'] = ['between', [$beginTime, $endTime]];
$conditions = [];
$conditions['promote_id'] = ['in', $ids];
$conditions[$params['time_column']] = ['between', [$beginTime, $endTime]];
if ($gameId > 0) {
$map['game_id'] = $gameId;
$conditions['game_id'] = $gameId;
}
if ($serverId > 0) {
$map['server_id'] = $serverId;
$conditions['server_id'] = $serverId;
}
$map['promote_id'] = ['in', $ids];
$conditions['pay_way'] = $isBan ? ['neq', '-10'] : ['neq', '-1'];
return $conditions;
}
private function getGameGroupConditions($params)
{
$beginTime = $params['begin_time'] ?? 0;
$endTime = $params['end_time'] ?? 0;
$ids = $params['promote_ids'] ?? [];
$gameIds = $params['game_ids'] ?? [];
$conditions = [];
$conditions['promote_id'] = ['in', $ids];
$conditions[$params['time_column']] = ['between', [$beginTime, $endTime]];
$conditions['game_id'] = ['in', $gameIds];
return $conditions;
}
/**
* 按照时间分组统计登录总数
*/
public function getLoginCountGroupByDay($params) {
$dayList = $params['dayList'] ?? [];
$params['time_column'] = 'login_time';
$conditions = $this->getDayGroupConditions($params);
$items = M('user_login_record', 'tab_')->field('FROM_UNIXTIME(login_time, "%Y-%m-%d") as day, count(DISTINCT user_id) as count')
->where($map)
->where($conditions)
->group('day')
->select();
return $this->assembleDayRecords($items, $dayList, 'count');
return $this->assembleRecords($items, $dayList, 'count');
}
/**
* 按照游戏分组统计登录总数
*/
public function getLoginCountGroupByGame($params) {
$gameIds = $params['game_ids'] ?? [];
$params['time_column'] = 'login_time';
$conditions = $this->getGameGroupConditions($params);
$items = M('user_login_record', 'tab_')->field('game_id, count(DISTINCT user_id) as count')
->where($conditions)
->group('game_id')
->select();
return $this->assembleRecords($items, $gameIds, 'count', 'game_id');
}
/**
* 按照时间分组统计注册总数
*/
public function getRegisterCountByDay($params) {
$beginTime = $params['begin_time'] ?? 0;
$endTime = $params['end_time'] ?? 0;
$gameId = $params['game_id'] ?? 0;
$serverId = $params['server_id'] ?? 0;
$ids = $params['promote_id'] ?? [];
public function getRegisterCountGroupByDay($params) {
$dayList = $params['dayList'] ?? [];
$dateform = '%Y-%m-%d';
$map = [];
$map['register_time'] = ['between', [$beginTime, $endTime]];
if ($gameId > 0) {
$map['fgame_id'] = $gameId;
}
$map['promote_id'] = ['in', $ids];
$map['puid'] = 0;
$items = M('user', 'tab_')->field('count(*) count, FROM_UNIXTIME(register_time,"'.$dateform.'") as day')
$params['time_column'] = 'register_time';
$conditions = $this->getDayGroupConditions($params);
$items = M('user', 'tab_')->field('count(*) count, FROM_UNIXTIME(register_time, "%Y-%m-%d") as day')
->where($map)
->group('day')
->select();
return $this->assembleDayRecords($items, $dayList, 'count');
return $this->assembleRecords($items, $dayList, 'count');
}
/**
* 按照游戏分分组统计注册总数
*/
public function getRegisterCountGroupByGame($params) {
$gameIds = $params['game_ids'] ?? [];
$params['time_column'] = 'register_time';
$conditions = $this->getGameGroupConditions($params);
$items = M('user', 'tab_')->field('count(*) count, game_id')
->where($conditions)
->group('game_id')
->select();
return $this->assembleRecords($items, $gameIds, 'count', 'game_id');
}
/**
@ -95,7 +131,6 @@ class UserRepository {
*/
public function getRatentionRate($newslist,$game_id=0,$promote_id=0,$flag=1) {
$map['lock_status']=1;
if($game_id>0) {
$map['up.game_id'] = $game_id;

@ -0,0 +1,45 @@
<?php
namespace Base\Service;
use Base\Model\PromoteModel;
use Base\Model\ApplyModel;
class GameSourceService {
public function __construct()
{
}
public function getChannelConfigFile($gameSource) {
$configUrl = '';
if ($gameSource['sdk_version'] == 1) {
$configUrl = "META-INF/mch.properties";
} else {
$preUrl = '';
$zipGameSource = zip_open($this->getGameSourceUrl($gameSource));
if ($zipGameSource) {
while ($zipEntry = zip_read($zipGameSource)) {
if (preg_match("/^Payload.*?\.app/", zip_entry_name($zipEntry), $matches)) {
$preUrl = $matches[0];
break;
}
}
zip_close($zipGameSource);
}
$configUrl = $preUrl . '/_CodeSignature/TXChannel';
}
return $configUrl;
}
public function getGameSourceUrl($gameSource){
$path = '';
if($gameSource['file_type'] == '1'){
$path = './Uploads/SourcePack/';
}else{
$path = './Uploads/Ios/original/';
}
$fileUrl = $path . $gameSource['file_name'];
return ROOTTT . ltrim($fileUrl, './');
}
}

@ -2804,3 +2804,12 @@ function sendBrushMail($to,$content) {
$mail->AltBody = $c; //邮件正文不支持HTML的备用显示
return($mail->Send());
}
function index_by_column($column, $items)
{
$records = [];
foreach ($items as $item) {
$records[$item[$column]] = $item;
}
return $records;
}

@ -831,24 +831,24 @@ function isParentPromote($parentId, $promoteId)
}
//获取所有该类型的渠道 $promoteId-渠道ID $promoteType-1:本账号 2:组长 3:推广员
function getAllPromoteListByType($promoteType = 1, $retOne = false)
function getAllPromoteListByType($promoteType = 1, $retOne = false, $promoteId = PID)
{
$childPromoteData = array();
switch ($promoteType) {
case 1:
$map['id'] = PID;
$map['id'] = $promoteId;
break;
case 2:
case 3:
$promoteData = D('Promote')->where(array('id' => PID))->find();
$promoteData = D('Promote')->where(array('id' => $promoteId))->find();
if ($promoteData['grand_id'] > 0) {
return [];
} elseif ($promoteData['parent_id'] > 0) {
$promoteType--;
}
$childPromoteIds = getAllPromoteIdsByType((string)PID, $promoteType);
$childPromoteIds = getAllPromoteIdsByType((string)$promoteId, $promoteType);
break;
}
@ -901,10 +901,10 @@ function getAllPromoteIdsByType($promoteIds, $level = 3, $nowLevel = 1)
}
//获取所有子渠道列表 $type 1-返回数组 2-返回id数组 3-返回id字符串
function getAllChildPromoteList($type = 1)
function getAllChildPromoteList($type = 1, $promoteId = PID)
{
$childPromoteData = array();
$childPromoteIds = getAllChildPromoteIds((string)PID);
$childPromoteIds = getAllChildPromoteIds((string)$promoteId);
if (!empty($childPromoteIds)) {
$map['id'] = ['in', $childPromoteIds];

@ -64,6 +64,8 @@ return array(
'__IMG__' => __ROOT__ . '/Public/' . MODULE_NAME . '/images',
'__CSS__' => __ROOT__ . '/Public/' . MODULE_NAME . '/css',
'__JS__' => __ROOT__ . '/Public/' . MODULE_NAME . '/js',
'__LAY__' => __ROOT__ . '/Public/' . MODULE_NAME . '/layui',
),
/* SESSION 和 COOKIE 配置 */

@ -172,7 +172,8 @@ class BaseController extends HomeController{
'p' => $page,
'row' => $pageSize
];
$pagination = set_pagination($count, $pageSize);
$params = array_merge($params, $_POST);
$pagination = set_pagination($count, $pageSize, $params);
return [$records, $pagination, $count];
}

@ -44,14 +44,21 @@ class QueryController extends BaseController
$map['tab_spend.promote_id'] = ['in', $childPromoteIds];
}
$teamLeaderId = I('team_leader_id');//组长账号
$teamLeaderId = intval(I('team_leader_id'));//组长账号
if (!empty($teamLeaderId)) {
$hasTeamLeaderPermission = hasPromotePermission(PID, $teamLeaderId);
if ($hasTeamLeaderPermission === false) {
$this->error('组长权限异常');
}
$map['tab_spend.promote_id'] = $teamLeaderId;
$childPromoteIds = getAllChildPromoteList(3, $teamLeaderId);
if (empty($childPromoteIds)) {
$map['tab_spend.promote_id'] = $teamLeaderId;
} else {
$childPromoteIds = $teamLeaderId . ',' . $childPromoteIds;
$map['tab_spend.promote_id'] = ['in', $childPromoteIds];
}
}
$promoteId = I('promote_id');//推广员账号
@ -61,18 +68,10 @@ class QueryController extends BaseController
$this->error('推广员权限异常');
}
if (!empty($map['tab_spend.promote_id'])) {
$map['_string'] = 'tab_spend.promote_id = ' . $promoteId;
} else {
$map['tab_spend.promote_id'] = $promoteId;
}
$map['tab_spend.promote_id'] = $promoteId;
}
if (!empty(I('own_id'))) {
if (!empty($map['_string'])) {
unset($map['_string']);
}
$map['tab_spend.promote_id'] = I('own_id');//本账号
}
@ -84,11 +83,15 @@ class QueryController extends BaseController
$map['tab_spend.pay_time'] = ['between', [strtotime(I('begtime')), strtotime(I('endtime')) + 86399]];
}
if (I('pay_way') !== null && I('pay_way') !== '') {
if (I('pay_way') == 2) {
$map['tab_spend.pay_way'] = ['in', '2,3,4'];
} else {
$map['tab_spend.pay_way'] = I('pay_way');
if (isset($_REQUEST['pay_way']) && $_REQUEST['pay_way'] !== '') {
$payWay = intval(I('pay_way'));
if (in_array($payWay, array_keys(QueryController::$payWay))) {
if ($payWay == 2) {
$map['tab_spend.pay_way'] = ['in', '2,3,4'];
} else {
$map['tab_spend.pay_way'] = $payWay;
}
}
}
@ -142,6 +145,7 @@ class QueryController extends BaseController
empty(I('own_id')) || $parameter['own_id'] = I('own_id');
empty(I('begtime')) || $parameter['begtime'] = I('begtime');
empty(I('endtime')) || $parameter['endtime'] = I('endtime');
!isset($_REQUEST['pay_way']) || $parameter['pay_way'] = I('pay_way');
$serverData = $this->getServer(I('relation_game_id'), I('sdk_version'));
@ -159,6 +163,9 @@ class QueryController extends BaseController
$this->assign('pID', PID);
$this->assign('ownId', I('own_id'));
$this->assign('payWayData', QueryController::$payWay);
if (!empty(I('team_leader_id'))) {
$this->assign('teamLeaderData', getAllPromoteListByType(1, false, intval(I('team_leader_id'))));
}
$this->meta_title = "订单查询";
$this->display();
}
@ -181,14 +188,21 @@ class QueryController extends BaseController
$map['tab_user.promote_id'] = ['in', $childPromoteIds];
}
$teamLeaderId = I('team_leader_id');//组长账号
$teamLeaderId = intval(I('team_leader_id'));//组长账号
if (!empty($teamLeaderId)) {
$hasTeamLeaderPermission = hasPromotePermission(PID, $teamLeaderId);
if ($hasTeamLeaderPermission === false) {
$this->error('组长权限异常');
}
$map['tab_user.promote_id'] = $teamLeaderId;
$childPromoteIds = getAllChildPromoteList(3, $teamLeaderId);
if (empty($childPromoteIds)) {
$map['tab_user.promote_id'] = $teamLeaderId;
} else {
$childPromoteIds = $teamLeaderId . ',' . $childPromoteIds;
$map['tab_user.promote_id'] = ['in', $childPromoteIds];
}
}
$promoteId = I('promote_id');//推广员账号
@ -198,18 +212,10 @@ class QueryController extends BaseController
$this->error('推广员权限异常');
}
if (!empty($map['tab_user.promote_id'])) {
$map['_string'] = 'tab_user.promote_id = ' . $promoteId;
} else {
$map['tab_user.promote_id'] = $promoteId;
}
$map['tab_user.promote_id'] = $promoteId;
}
if (!empty(I('own_id'))) {
if (!empty($map['_string'])) {
unset($map['_string']);
}
$map['tab_user.promote_id'] = I('own_id');//本账号
}
@ -272,6 +278,9 @@ class QueryController extends BaseController
$this->assign('thisParentPromoteId', $thisParentPromoteId);
$this->assign('pID', PID);
$this->assign('ownId', I('own_id'));
if (!empty(I('team_leader_id'))) {
$this->assign('teamLeaderData', getAllPromoteListByType(1, false, intval(I('team_leader_id'))));
}
$this->meta_title = '注册明细';
$this->display();
}
@ -653,10 +662,10 @@ class QueryController extends BaseController
{
$this->meta_title = 'ARPU统计';
$defaultTime = date('Y-m-d', time() - 7 * 24 * 3600) . ' 至 ' . date('Y-m-d');
$defaultTime = date('Y-m-d', time() - 7 * 24 * 3600) . ' 至 ' . date('Y-m-d');
$defaultTime = date('Y-m-d', time() - 6 * 24 * 3600) . ' 至 ' . date('Y-m-d');
$time = I('time', $defaultTime);
$time = I('time', '');
$time = $time == '' ? $defaultTime : $time;
$sdkVersion = I('sdk_version', 0);
$gameId = I('game_id', 0);
$serverId = I('server_id', 0);
@ -668,16 +677,20 @@ class QueryController extends BaseController
'grand_id' => $promote['id'],
];
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
$subPromotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $promote['id']])->select();
$games = $this->getGamesByPromote($promote);
$params = [];
$searchGameName = '';
$searchServerName = '';
if ($gameId > 0) {
$params['game_id'] = $gameId;
$searchGameName = M('game', 'tab_')->where(['id' => $gameId])->getField('game_name');
}
if ($serverId > 0) {
$params['server_id'] = $serverId;
$searchServerName = M('server', 'tab_')->where(['server_id' => $serverId])->getField('server_name');
}
if ($sdkVersion > 0) {
$params['sdk_version'] = $sdkVersion;
@ -695,14 +708,14 @@ class QueryController extends BaseController
if (intval($endTime - $beginTime) / (24 * 3600) <= 30) {
$userRepository = new UserRepository();
$spendRepository = new SpendRepository();
$payGameCountList = $spendRepository->getPayGameCountByDay($params);
$payUserCountList = $spendRepository->getPayUserCountByDay($params);
$newPayUserCountList = $spendRepository->getNewPayUserCountByDay($params);
$payAmountList = $spendRepository->getPayAmountByDay($params);
$newPayAmountList = $spendRepository->getNewPayAmountByDay($params);
$historyPayCountList = $spendRepository->getHistoryPayCountByDay($params);
$loginCountList = $userRepository->getLoginCountByDay($params);
$registerCountList = $userRepository->getRegisterCountByDay($params);
$payGameCountList = $spendRepository->getPayGameCountGroupByDay($params);
$payUserCountList = $spendRepository->getPayUserCountGroupByDay($params);
$newPayUserCountList = $spendRepository->getNewPayUserCountGroupByDay($params);
$payAmountList = $spendRepository->getPayAmountGroupByDay($params);
$newPayAmountList = $spendRepository->getNewPayAmountGroupByDay($params);
$historyPayCountList = $spendRepository->getHistoryPayCountGroupByDay($params);
$loginCountList = $userRepository->getLoginCountGroupByDay($params);
$registerCountList = $userRepository->getRegisterCountGroupByDay($params);
foreach ($dayList as $day) {
$records[] = [
@ -728,9 +741,39 @@ class QueryController extends BaseController
$this->assign('subPromotes', $subPromotes);
$this->assign('timeout', $timeout);
$this->assign('records', $records);
$this->assign('searchGameName', $searchGameName);
$this->assign('searchServerName', $searchServerName);
$this->display();
}
public function gameArpu()
{
$promote = $this->getLoginPromote();
$map = [
'_logic' => 'or',
'id' => $promote['id'],
'parent_id' => $promote['id'],
'grand_id' => $promote['id'],
];
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
$time = I('time', date('Y-m-d'));
$applys = M('Apply', 'tab_')->field('game_id, game_name')->where(['promote_id' => $promote['id']])->order('game_id desc')->select();
$gameIds = array_column($applys, 'game_id');
$params = [
'begin_time' => strtotime($time . ' 00:00:00'),
'end_time' => strtotime($time . ' 23:59:59'),
'game_ids' => $gameIds,
'promote_ids' => $ids,
];
$spendRepository = new SpendRepository();
// $result = $spendRepository->getHistoryPayCountGroupByGame($params);
$result = $spendRepository->getPayGameCountGroupByGame($params);
var_dump($result);
}
public function arpu_analysis()
{
$this->meta_title = "ARPU统计";
@ -960,16 +1003,25 @@ class QueryController extends BaseController
$spendWhere['tab_spend.promote_id'] = ['in', $childPromoteIds];
}
$teamLeaderId = I('team_leader_id');//组长账号
$teamLeaderId = intval(I('team_leader_id'));//组长账号
if (!empty($teamLeaderId)) {
$hasTeamLeaderPermission = hasPromotePermission(PID, $teamLeaderId);
if ($hasTeamLeaderPermission === false) {
$this->error('组长权限异常');
}
$userPlayInfoWhere['tab_user_play_info.promote_id'] = $teamLeaderId;
$userGameLoginWhere['tab_user_game_login_record.promote_id'] = $teamLeaderId;
$spendWhere['tab_spend.promote_id'] = $teamLeaderId;
$childPromoteIds = getAllChildPromoteList(3, $teamLeaderId);
if (empty($childPromoteIds)) {
$userPlayInfoWhere['tab_user_play_info.promote_id'] = $teamLeaderId;
$userGameLoginWhere['tab_user_game_login_record.promote_id'] = $teamLeaderId;
$spendWhere['tab_spend.promote_id'] = $teamLeaderId;
} else {
$childPromoteIds = $teamLeaderId . ',' . $childPromoteIds;
$userPlayInfoWhere['tab_user_play_info.promote_id'] = ['in', $childPromoteIds];
$userGameLoginWhere['tab_user_game_login_record.promote_id'] = ['in', $childPromoteIds];
$spendWhere['tab_spend.promote_id'] = ['in', $childPromoteIds];
}
}
$promoteId = I('promote_id');//推广员账号
@ -979,24 +1031,12 @@ class QueryController extends BaseController
$this->error('推广员权限异常');
}
if (!empty($userPlayInfoWhere['tab_apply.promote_id'])) {
$userPlayInfoWhere['_string'] = 'tab_user_play_info.promote_id = ' . $promoteId;
$userGameLoginWhere['_string'] = 'tab_user_game_login_record.promote_id = ' . $promoteId;
$spendWhere['_string'] = 'tab_spend.promote_id = ' . $promoteId;
} else {
$userPlayInfoWhere['tab_user_play_info.promote_id'] = $promoteId;
$userGameLoginWhere['tab_user_game_login_record.promote_id'] = $promoteId;
$spendWhere['tab_spend.promote_id'] = $promoteId;
}
$userPlayInfoWhere['tab_user_play_info.promote_id'] = $promoteId;
$userGameLoginWhere['tab_user_game_login_record.promote_id'] = $promoteId;
$spendWhere['tab_spend.promote_id'] = $promoteId;
}
if (!empty(I('own_id'))) {
if (!empty($userPlayInfoWhere['_string'])) {
unset($userPlayInfoWhere['_string']);
unset($userGameLoginWhere['_string']);
unset($spendWhere['_string']);
}
$userPlayInfoWhere['tab_user_play_info.promote_id'] = I('own_id');
$userGameLoginWhere['tab_user_game_login_record.promote_id'] = I('own_id');
$spendWhere['tab_spend.promote_id'] = I('own_id');
@ -1184,6 +1224,9 @@ class QueryController extends BaseController
$this->assign('serverData', $serverData['data']);
$this->assign('thisParentPromoteId', $thisParentPromoteId);
$this->assign('pID', PID);
if (!empty(I('team_leader_id'))) {
$this->assign('teamLeaderData', getAllPromoteListByType(1, false, intval(I('team_leader_id'))));
}
$this->display();
}
@ -1218,10 +1261,20 @@ class QueryController extends BaseController
$this->error('组长权限异常');
}
$map['tab_apply.promote_id'] = $teamLeaderId;
$userPlayInfoMap['tab_user_play_info.promote_id'] = $teamLeaderId;
$userGameLoginMap['tab_user_game_login_record.promote_id'] = $teamLeaderId;
$spendMap['tab_spend.promote_id'] = $teamLeaderId;
$childPromoteIds = getAllChildPromoteList(3, $teamLeaderId);
if (empty($childPromoteIds)) {
$map['tab_apply.promote_id'] = $teamLeaderId;
$userPlayInfoMap['tab_user_play_info.promote_id'] = $teamLeaderId;
$userGameLoginMap['tab_user_game_login_record.promote_id'] = $teamLeaderId;
$spendMap['tab_spend.promote_id'] = $teamLeaderId;
} else {
$childPromoteIds = $teamLeaderId . ',' . $childPromoteIds;
$map['tab_apply.promote_id'] = ['in', $childPromoteIds];
$userPlayInfoMap['tab_user_play_info.promote_id'] = ['in', $childPromoteIds];
$userGameLoginMap['tab_user_game_login_record.promote_id'] = ['in', $childPromoteIds];
$spendMap['tab_spend.promote_id'] = ['in', $childPromoteIds];
}
}
$promoteId = intval(I('promote_id'));//推广员账号
@ -1231,21 +1284,14 @@ class QueryController extends BaseController
$this->error('推广员权限异常');
}
$map['_string'] = 'tab_apply.promote_id = ' . $promoteId;
$userPlayInfoMap['_string'] = 'tab_user_play_info.promote_id = ' . $promoteId;
$userGameLoginMap['_string'] = 'tab_user_game_login_record.promote_id = ' . $promoteId;
$spendMap['_string'] = 'tab_spend.promote_id = ' . $promoteId;
$map['tab_apply.promote_id'] = $promoteId;
$userPlayInfoMap['tab_user_play_info.promote_id'] = $promoteId;
$userGameLoginMap['tab_user_game_login_record.promote_id'] = $promoteId;
$spendMap['tab_spend.promote_id'] = $promoteId;
}
$ownId = intval(I('own_id'));//本账号
if (!empty($ownId)) {
if (!empty($map['_string'])) {
unset($map['_string']);
unset($userPlayInfoMap['_string']);
unset($userGameLoginMap['_string']);
unset($spendMap['_string']);
}
$map['tab_apply.promote_id'] = $ownId;
$userPlayInfoMap['tab_user_play_info.promote_id'] = $ownId;
$userGameLoginMap['tab_user_game_login_record.promote_id'] = $ownId;
@ -1438,6 +1484,9 @@ class QueryController extends BaseController
$this->assign('serverData', $serverData['data']);
$this->assign('thisParentPromoteId', $thisParentPromoteId);
$this->assign('pID', PID);
if (!empty(I('team_leader_id'))) {
$this->assign('teamLeaderData', getAllPromoteListByType(1, false, intval(I('team_leader_id'))));
}
$this->display();
}
@ -1731,6 +1780,13 @@ class QueryController extends BaseController
'parent_id' => $promote['id'],
'grand_id' => $promote['id'],
];
if ($headmanPromoteId > 0) {
$map['parent_id'] = $headmanPromoteId;
}
if ($promoteId > 0) {
$map['id'] = $promoteId;
}
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
$promotes = [];
@ -1752,7 +1808,7 @@ class QueryController extends BaseController
$map['role_name'] = ['like', '%' . $roleName . '%'];
}
if ($userAccount != '') {
$map['user_acount'] = ['like', '%' . $userAccount . '%'];
$map['user_account'] = ['like', '%' . $userAccount . '%'];
}
if ($sdkVersion != 0) {
$map['sdk_version'] = $sdkVersion;
@ -1779,7 +1835,6 @@ class QueryController extends BaseController
}
if ($isSelf) {
$map['promote_id'] = $promote['id'];
} else {
if ($headmanPromoteId != 0) {
$map['promote_id'] = $headmanPromoteId;
}
@ -1819,6 +1874,12 @@ class QueryController extends BaseController
'parent_id' => $promote['id'],
'grand_id' => $promote['id'],
];
if ($headmanPromoteId > 0) {
$map['parent_id'] = $headmanPromoteId;
}
if ($promoteId > 0) {
$map['id'] = $promoteId;
}
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
$promotes = [];
@ -1838,7 +1899,7 @@ class QueryController extends BaseController
$map['role_name'] = ['like', '%' . $roleName . '%'];
}
if ($userAccount != '') {
$map['user_acount'] = ['like', '%' . $userAccount . '%'];
$map['user_account'] = ['like', '%' . $userAccount . '%'];
}
if ($sdkVersion != 0) {
$map['sdk_version'] = $sdkVersion;
@ -1846,11 +1907,12 @@ class QueryController extends BaseController
if ($isSelf) {
$map['promote_id'] = $promote['id'];
$spendMap['promote_id'] = $promote['id'];
} else {
if ($headmanPromoteId != 0) {
$map['promote_id'] = $headmanPromoteId;
$spendMap['promote_id'] = $headmanPromoteId;
}
if ($promoteId != 0) {
$map['promote_id'] = $promoteId;
$spendMap['promote_id'] = $promoteId;
@ -2010,6 +2072,7 @@ class QueryController extends BaseController
$gameId = I('game_id', 0);
$serverId = I('server_id', 0);
$parentId = I('parent_id', 0);
$promoteId = I('promote_id', 0);
$loginPromote = $this->getLoginPromote();
@ -2024,7 +2087,12 @@ class QueryController extends BaseController
$subPromotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $promote['id']])->select();
$query = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $promote['id']]);
$map = ['parent_id' => $promote['id']];
if ($promoteId > 0) {
$map['id'] = $promoteId;
}
$query = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where($map);
list($promotes, $pagination, $count) = $this->paginate($query);
$ids = array_column($promotes, 'id');
@ -2108,4 +2176,21 @@ class QueryController extends BaseController
$this->assign('count', $count);
$this->display();
}
public function getChildPromoteList()
{
$promoteId = I('post.promote_id', 0);
if ($promoteId == 0) {
$data['status'] = 0;
$data['msg'] = '数据异常';
$this->ajaxReturn($data);
}
$promoteList = getAllPromoteListByType(3, false, $promoteId);
$data['status'] = 1;
$data['data'] = $promoteList;
$this->ajaxReturn($data);
}
}

@ -6,7 +6,7 @@
<link href="__CSS__/20180207/finance.css" rel="stylesheet">
<link href="__CSS__/game_detailed.css" rel="stylesheet">
<link href="__STATIC__/icons_alibaba/iconfont.css" rel="stylesheet">
<link rel="stylesheet" href="__LAY__/css/layui.css" media="all">
<style type="text/css">
.trunk-list {
position: relative;
@ -114,12 +114,9 @@
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content:center;
align-items:center;
width:50%;
margin-left:25%;
background: white;opacity: 1.0;
min-height:900px;
min-height:800px;
}
.detailindex img {
width: 100%;
@ -215,7 +212,12 @@
</if>
</if>-->
<!--<span onclick="commonApply({$vo.id},this,0,0)" style="cursor: pointer;"><u>查看详情</u></span>-->
<span onclick="lookdetail({$vo.id})" style="cursor: pointer;"><u class="lookdetail">查看详情</u></span>
<!-- <span onclick="lookdetail({$vo.id})" style="cursor: pointer;"><u class="lookdetail">查看详情</u></span>-->
<div class="site-demo-button" id="layerDemo" style="margin-bottom: 0;">
<!-- <button data-method="notice" class="layui-btn">示范一个公告层</button>-->
<span id="detailArr" onclick="lookdetail({$vo.id})" class="layui-btn" style="cursor: pointer;background:#62A8EA"><u>查看详情</u></span>
</div>
</div>
</div>
</li>
@ -230,17 +232,21 @@
</div>
</div>
<div class="detailback" id="detailback">
<!-- <div class="detailback" id="detailback">
<div class="detailindex" style="">
</div>
</div>
</div>-->
</block>
<block name="script">
<script src="__STATIC__/zeroclipboard/jquery.zclip.min.js"></script>
<script type="text/javascript" src="__JS__/20170831/select2.min.js"></script>
<script type="text/javascript" src="__JS__/jquery.min.js"></script>
<script src="__LAY__/layui.js" type="text/javascript" ></script>
<script type="text/javascript">
function lookdetail(id) {
$.ajax({
type: "post",
@ -251,34 +257,47 @@
console.log(res)
if(res.code == 10000) {
content = res.info;
html = '';
html += content;
$('.detailindex').html(html);$('.detailindex').val();
$('.detailback').css('display','block')
}else {
content = "暂无资料查询";
html = '';
html += content;
$('.detailindex').html(html);$('.detailindex').val();
$('.detailback').css('display','block')
}
layer.open({
type: 1
,title: false //不显示标题栏
,closeBtn: true
,area: ["800px","900px"]
,shade: 0.8
,id: 'LAY_layuipro' //设定一个id防止重复弹出
//,btn: ['我已查阅']
,btnAlign: 'c'
,moveType: 1 //拖拽模式0或者1
,content: '<div style="padding: 50px;line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;" class="detailindex" >'+content+'</div>'
// ,content:content
,success: function(layero){
},
fail:function(err) {
console.log('err')
}
})
},
fail:function(err) {
console.log('err')
}
})
}
window.onload=function(){
var detailback = document.getElementById("detailback");
document.addEventListener("click",function(){
detailback.style.display="none";
});
detailback.addEventListener("click",function(event){
event=event||window.event;
event.stopPropagation();
});
};
//处理空白地方点击关掉事件
// window.onload=function(){
// var detailback = document.getElementById("detailback");
// document.addEventListener("click",function(){
// detailback.style.display="none";
// });
// detailback.addEventListener("click",function(event){ //添加监听事件
// event=event||window.event;
// event.stopPropagation();
// });
// };
</script>
<script type="text/javascript">
var gameScreenshotCount = 0; //游戏截图数量

@ -105,7 +105,7 @@
</block>
<block name="body">
<div class="page-list normal_list apply-index-list">
<div class="page-list normal_list apply-index-list jssearch">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>游戏管理></span><span>{$position}</span></div>
@ -180,10 +180,11 @@
</div>
</div>
<form action="{:U($game,array('row'=>I('get.row'),'type'=>$type))}" method="post" enctype="multipart/form-data"
class="marg_top20">
<!-- <form action="{:U($game,array('row'=>I('get.row'),'type'=>$type))}" method="post" enctype="multipart/form-data"-->
<!-- class="marg_top20">-->
<div class="form-group normal_space fr">
<input type="submit" class="submit" value="查询">
<input type="submit" class="submit" id='submit' url="{:U($game,array('model'=>$model['name'],'type'=>$type),false)}"
value="查询">
</div>
<div class="form-group normal_space fr">
<select id="game_id" name="game_id" class="reselect select_gallery" style="min-width:200px;width: 175px;">
@ -218,7 +219,7 @@
<input id="promote_role" name="promote_role">
</div>
</form>
<!-- </form>-->
</div>
<div class="trunk-list">
<div class="div_bgtab">
@ -869,5 +870,21 @@
$('#promote_id').on('change', function () {
newPromoteId = $(this).val();
});
$('#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>

@ -89,7 +89,7 @@
</block>
<block name="body">
<div class="page-list normal_list apply-my_game-list">
<div class="page-list normal_list apply-my_game-list jssearch">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>游戏管理></span><span>{$position}</span></div>
@ -156,10 +156,11 @@
<!-- <a class="btn_calc" href="javascript:;">审核通过</a>-->
<!-- <a class="btn_calc examine_a" href="{:U('my_game_ch')}">审核中</a>-->
<!-- </div>-->
<form class="marg_top20" action="{:U($myGame,array('row'=>I('get.row')))}" method="post"
enctype="multipart/form-data">
<!-- <form class="marg_top20" action="{:U($myGame,array('row'=>I('get.row')))}" method="post"-->
<!-- enctype="multipart/form-data">-->
<div class="form-group normal_space fr">
<input type="submit" class="submit zwm_submit" value="查询">
<input type="submit" class="submit" id='submit' url="{:U($myGame,array('model'=>$model['name'],'type'=>$type),false)}"
value="查询">
</div>
<div class="form-group normal_space fr">
<select id="game_id" name="game_id" class="reselect select_gallery" style="min-width:200px;width: 175px;">
@ -196,7 +197,7 @@
<div class="form-group normal_space fr" style="display: none;">
<input id="promote_role" name="promote_role">
</div>
</form>
<!-- </form>-->
</div>
<div class="trunk-list zwm_trunklist">
@ -1031,5 +1032,21 @@
clipboard.on('error', function(e) {
// console.log(e);
});
$('#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>

@ -135,7 +135,7 @@
</block>
<block name="body">
<div class="page-list normal_list apply-index-list">
<div class="page-list normal_list apply-index-list jssearch">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>游戏管理></span><span>分成比例</span></div>
@ -150,8 +150,8 @@
<if condition="isset($dataList)">
<div class="trunk-search clearfix">
<div class="tab marg_top20" style="clear:both;display: flex;"></div>
<form action="{:U('index',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data"
class="marg_top20" style="float: left;">
<!-- <form action="{:U('index',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data"-->
<!-- class="marg_top20" style="float: left;">-->
<div class="form-group normal_space fl">
<select id="relation_game_id" name="relation_game_id" class="reselect select_gallery" style="min-width:200px;width: 175px;">
<option value="">请选择游戏</option>
@ -202,9 +202,10 @@
</div>
<div class="form-group normal_space fl">
<input type="submit" class="submit" value="查询">
<input type="submit" class="submit" id='submit' url="{:U('index','model='.$model['name'],false)}"
value="查询">
</div>
</form>
<!-- </form>-->
</div>
<div class="trunk-list">
<div class="div_bgtab">
@ -314,6 +315,22 @@
$('.btn-security-close').on('click', function () {
window.location.href = "{:U('Promote/index')}";
});
$('#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>

@ -107,7 +107,7 @@
</block>
<block name="body">
<div class="page-list normal_list apply-index-list">
<div class="page-list normal_list apply-index-list jssearch">
<div style="position: absolute;margin: .6% 2% 0 2%;margin-top: -30px;color: #6a7082;">
<span class="back-btn" style="cursor: pointer;"><i class="iconfont iconreply"></i> 返回</span>
</div>
@ -119,10 +119,11 @@
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<form action="{:U('PromoteCoin/coinRecord',array('game_id'=>I('get.game_id')))}" method="post" enctype="multipart/form-data"
class="marg_top20">
<!-- <form action="{:U('PromoteCoin/coinRecord',array('game_id'=>I('get.game_id')))}" method="post" enctype="multipart/form-data"-->
<!-- class="marg_top20">-->
<div class="form-group normal_space fr">
<input type="submit" class="submit" value="查询">
<input type="submit" class="submit" id='submit' url="{:U('PromoteCoin/coinRecord',array('model'=>$model['name'],'game_id'=>I('get.game_id')),false)}"
value="查询">
</div>
<div class="form-group normal_space fr">
<label>充值时间:</label>
@ -161,7 +162,7 @@
</volist>
</select>
</div>
</form>
<!-- </form>-->
</div>
<div class="trunk-list">
<div class="div_bgtab">
@ -204,7 +205,7 @@
</table>
</div>
<div class="pagenation clearfix">
<a class="sch-btn" href="{:U('Export/expUser',array_merge(array('id'=>8,'xlsname'=>'会长福利_平台币入账记录'),I('post.')))}" >导出</a>
<!-- <a class="sch-btn" href="{:U('Export/expUser',array_merge(array('id'=>8,'xlsname'=>'会长福利_平台币入账记录'),I('post.')))}" >导出</a>-->
{$_page}
</div>
</div>
@ -254,6 +255,28 @@
$('.back-btn').on('click', function () {
history.back(-1);
});
$('#submit').click(function () {
var sdate = $('#start_time').val();
var edate = $('#end_time').val();
if (Date.parse(sdate) > Date.parse(edate)) {
layer.msg('开始时间必须小于等于结束时间');
return false;
}
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>

@ -103,7 +103,7 @@
</block>
<block name="body">
<div class="page-list normal_list apply-index-list">
<div class="page-list normal_list apply-index-list jssearch">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>平台币管理></span><span>我的平台币</span></div>
@ -112,10 +112,11 @@
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<form action="{:U('myCoin')}" method="post" enctype="multipart/form-data"
class="marg_top20">
<!-- <form action="{:U('myCoin')}" method="post" enctype="multipart/form-data"-->
<!-- class="marg_top20">-->
<div class="form-group normal_space fr">
<input type="submit" class="submit" value="查询">
<input type="submit" class="submit" id='submit' url="{:U('myCoin','model='.$model['name'],false)}"
value="查询">
</div>
<div class="form-group normal_space fr">
<label>状态:</label>
@ -151,7 +152,7 @@
</volist>
</select>
</div>
</form>
<!-- </form>-->
</div>
<div class="trunk-list">
<div class="div_bgtab">
@ -191,7 +192,7 @@
</table>
</div>
<div class="pagenation clearfix">
<a class="sch-btn" href="{:U('Export/expUser',array_merge(array('id'=>8,'xlsname'=>'会长福利_平台币入账记录'),I('post.')))}" >导出</a>
<!-- <a class="sch-btn" href="{:U('Export/expUser',array_merge(array('id'=>8,'xlsname'=>'会长福利_平台币入账记录'),I('post.')))}" >导出</a>-->
{$_page}
</div>
</div>
@ -206,6 +207,22 @@
$(document).ready(function () {
$(".select_gallery").select2();
$('#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>

@ -71,7 +71,12 @@
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>游戏管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<!-- <a href="{:U('Apply/app_index')}" class="<if condition='CONTROLLER_NAME eq Apply and ACTION_NAME eq app_index '>active</if> ">APP列表</a>-->
<a href="{:U('Apply/index')}" class="<if condition='CONTROLLER_NAME eq Apply and (ACTION_NAME eq index or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">专服管理</a>
<a href="{:U('Apply/gameSpecialList')}" class="<if condition='CONTROLLER_NAME eq Apply and (ACTION_NAME eq gameSpecialList or ACTION_NAME eq specialMyGameList ) '>active</if> ">专服管理</a>
<a href="{:U('Apply/gameList')}" class="<if condition='CONTROLLER_NAME eq Apply and (ACTION_NAME eq gameList or ACTION_NAME eq myGameList ) '>active</if> ">混服管理</a>
<if condition="getParentPromoteId(PID) eq 0">
<a href="{:U('GameDivide/index')}" class="<if condition='CONTROLLER_NAME eq GameDivide and (ACTION_NAME eq index ) '>active</if> ">分成比例</a>
<a href="{:U('Promote/setChildGamePermission')}" class="<if condition='CONTROLLER_NAME eq Promote and (ACTION_NAME eq setChildGamePermission ) '>active</if> ">设置</a>
</if>
<a href="{:U('Apply/feature')}" class="<if condition='CONTROLLER_NAME eq Apply and (ACTION_NAME eq feature or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">资料专区</a>
</div>

@ -23,7 +23,8 @@
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<form action="{:U('Query/achievement',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data">
<form action="{:U('Query/achievement',['row'=>I('get.row')])}" method="post" enctype="multipart/form-data">
<input type="hidden" name="parent_id" value="{:I('parent_id', 0)}">
<div class="form-group normal_space">
<select id="game-select" name="game_id" class="reselect select_gallery" style="width: 220px;" >
<option value="0">请选择游戏</option>
@ -73,7 +74,7 @@
</if>
<div class="form-group normal_space fr">
<label>起止时间:</label>
<input type="text" class="txt range-date" name="time" placeholder="起止时间" value="{:I('time')}" >
<input type="text" class="txt range-date" name="time" placeholder="起止时间" value="{:I('time', date('Y-m-d'))}" >
</div>
<div class="form-group">
<input type="submit" class="submit normal_space" value="查询">

@ -189,7 +189,7 @@
<th>付费率</th>
<th>新增付费额</th>
<th>累计付费用户</th>
<th>1日留存</th>
<!-- <th>1日留存</th> -->
<th>ARPU</th>
<th>ARPPU</th>
<if condition='empty(I("game_id")) == true'>
@ -203,7 +203,7 @@
<tr name="rows" class="<eq name='mod' value='1'>odd</eq>">
<td>{$vo.day}</td>
<if condition='empty(I("game_id")) != true'>
<th>{:I("game_name")}</th>
<th>{$searchGameName}</th>
<else/>
<td>{$vo.payGameCount}</th>
</if>
@ -218,7 +218,7 @@
<td>{$vo.payRate}</td>
<td>{$vo.newPayAmount}</td>
<td>{$vo.historyPayCount}</td>
<td>{$vo.ratentionOneDay}</td>
<!-- <td>{$vo.ratentionOneDay}</td> -->
<td>{$vo.arpu}</td>
<td>{$vo.arppu}</td>
<if condition='empty(I("game_id")) == true'>

@ -89,7 +89,12 @@
<div class="form-group normal_space fl">
<select id="promote_id" name="promote_id" class="reselect select_gallery" style="min-width:130px;">
<option value="0">推广员账号</option>
<volist name=":getAllPromoteListByType(3)" id="vo">
<notempty name="teamLeaderData">
<volist name="teamLeaderData" id="vo">
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>
</notempty>
<volist name=":getAllPromoteListByType(3,false,empty(I('team_leader_id'))?PID:I('team_leader_id'))" id="vo">
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>
</select>
@ -447,6 +452,36 @@
setValue('server_id', {$Think.request.server_id |default = '""'});
setValue('row', '{:I("get.row",10)}');
$('#team_leader_id').change(function () {
var promoteId = parseInt($(this).val());
var promoteValue = $(this).find("option:selected").text();
$.ajax({
url: "{:U('getChildPromoteList')}",
type: "post",
data: {promote_id:promoteId},
dataType: 'json',
success: function (data) {
var html = "<option value='' selected>推广员账号</option>";
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
if (data.status == 1) {
var promoteData = data.data;
if (promoteData.length > 0) {
for (var i in promoteData) {
html += "<option value='" + promoteData[i]['id'] + "'>" + promoteData[i]['account'] + "(" + promoteData[i]['real_name'] + ")</option>";
}
}
}
$("#promote_id").empty();
$('#promote_id').html(html);
$("#promote_id").select2();
}
});
});
$('#own').on('click', function () {
var ownId = $('#own_id').val();
var checkBox = $(this).children('i');

@ -52,7 +52,7 @@
right: 10px;
}
</style>
<div class="page-search normal_list query-recharge-search">
<div class="page-search normal_list query-recharge-search jssearch">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>数据管理></span><span>订单查询</span></div>
@ -63,8 +63,35 @@
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<form action="{:U('Query/recharge',['version'=>I(" request.version
",1),'row'=>I("get.row")])}" method="post" enctype="multipart/form-data" class="normal_form">
<!-- <form action="{:U('Query/recharge',['version'=>I(" request.version-->
<!-- ",1),'row'=>I("get.row")])}" method="post" enctype="multipart/form-data" class="normal_form">-->
<if condition="$thisParentPromoteId eq 0">
<div class="form-group normal_space fl">
<select id="team_leader_id" name="team_leader_id" class="reselect select_gallery" style="min-width:130px;">
<option value="0">组长账号</option>
<volist name=":getAllPromoteListByType(2)" id="vo">
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>
</select>
</div>
</if>
<eq name="pID|isMinPromote" value="0">
<div class="form-group normal_space fl">
<select id="promote_id" name="promote_id" class="reselect select_gallery" style="min-width:130px;">
<option value="0">推广员账号</option>
<notempty name="teamLeaderData">
<volist name="teamLeaderData" id="vo">
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>
</notempty>
<volist name=":getAllPromoteListByType(3,false,empty(I('team_leader_id'))?PID:I('team_leader_id'))" id="vo">
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>
</select>
</div>
</eq>
<div class="form-group normal_space fl">
<select id="relation_game_id" name="relation_game_id" class="reselect select_gallery">
<option value="">请选择游戏</option>
@ -102,28 +129,6 @@
value="{:I('user_account')}">
</div>
<if condition="$thisParentPromoteId eq 0">
<div class="form-group normal_space fl">
<select id="team_leader_id" name="team_leader_id" class="reselect select_gallery" style="min-width:130px;">
<option value="0">组长账号</option>
<volist name=":getAllPromoteListByType(2)" id="vo">
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>
</select>
</div>
</if>
<eq name="pID|isMinPromote" value="0">
<div class="form-group normal_space fl">
<select id="promote_id" name="promote_id" class="reselect select_gallery" style="min-width:130px;">
<option value="0">推广员账号</option>
<volist name=":getAllPromoteListByType(3)" id="vo">
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>
</select>
</div>
</eq>
<div class="form-group normal_space fl">
<label class="form-title select-title" style="position: relative;">起止时间:</label>
<div class="select-time">
@ -142,7 +147,7 @@
<div class="form-group normal_space fl">
<select id="pay_way" name="pay_way" class="reselect select_gallery" style="min-width:130px;">
<option value="">支付方式</option>
<option value="-2">支付方式</option>
<foreach name="payWayData" item="vo" key="k">
<if condition="$k eq I('pay_way',-2)">
<option value="{$k}" selected>{$vo}</option>
@ -154,7 +159,8 @@
</div>
<div class="form-group normal_space fl">
<input type="submit" class="submit" id='submit' value="查询">
<input type="submit" class="submit" id='submit' url="{:U('Query/recharge','model='.$model['name'],false)}"
value="查询">
</div>
<div class="form-group normal_space fl" style="margin-left: 60px;">
@ -164,7 +170,7 @@
</label>
</div>
<!-- <input type="hidden" name="version" value="{:I('version',1)}"> -->
</form>
<!-- </form>-->
</div>
</div>
<div class="page-list apply-app_apply-list query-recharge-list">
@ -272,6 +278,36 @@
endDate: date
});
$('#team_leader_id').change(function () {
var promoteId = parseInt($(this).val());
var promoteValue = $(this).find("option:selected").text();
$.ajax({
url: "{:U('getChildPromoteList')}",
type: "post",
data: {promote_id:promoteId},
dataType: 'json',
success: function (data) {
var html = "<option value='' selected>推广员账号</option>";
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
if (data.status == 1) {
var promoteData = data.data;
if (promoteData.length > 0) {
for (var i in promoteData) {
html += "<option value='" + promoteData[i]['id'] + "'>" + promoteData[i]['account'] + "(" + promoteData[i]['real_name'] + ")</option>";
}
}
}
$("#promote_id").empty();
$('#promote_id').html(html);
$("#promote_id").select2();
}
});
});
$('#own').on('click',function () {
var ownId = $('#own_id').val();
var checkBox = $(this).children('i');
@ -342,16 +378,25 @@
$('#submit').click(function () {
var sdate = $('#sdate').val();
var edate = $('#edate').val();
// if(sdate =='' || edate==''){
// layer.msg('请完整时间搜索框');
// return false;
// }
if (Date.parse(sdate) > Date.parse(edate)) {
layer.msg('开始时间必须小于等于结束时间');
return false;
}
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;
});
$(".select_gallery").select2();
});
</script>

@ -24,7 +24,7 @@
</block>
<block name="body">
<div class="page-search normal_list query-register-search">
<div class="page-search normal_list query-register-search jssearch">
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>数据管理></span><span>注册明细</span></div>
@ -35,28 +35,33 @@
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<form action="{:U('Query/register',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data">
<if condition="$thisParentPromoteId eq 0">
<div class="form-group normal_space fl">
<select id="team_leader_id" name="team_leader_id" class="reselect select_gallery" style="min-width:130px;">
<option value="0">组长账号</option>
<volist name=":getAllPromoteListByType(2)" id="vo">
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>
</select>
</div>
</if>
<!-- <form action="{:U('Query/register',array('row'=>I('get.row')))}" method="post" enctype="multipart/form-data">-->
<if condition="$thisParentPromoteId eq 0">
<div class="form-group normal_space fl">
<select id="team_leader_id" name="team_leader_id" class="reselect select_gallery" style="min-width:130px;">
<option value="0">组长账号</option>
<volist name=":getAllPromoteListByType(2)" id="vo">
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>
</select>
</div>
</if>
<eq name="pID|isMinPromote" value="0">
<div class="form-group normal_space fl">
<select id="promote_id" name="promote_id" class="reselect select_gallery" style="min-width:130px;">
<option value="0">推广员账号</option>
<volist name=":getAllPromoteListByType(3)" id="vo">
<eq name="pID|isMinPromote" value="0">
<div class="form-group normal_space fl">
<select id="promote_id" name="promote_id" class="reselect select_gallery" style="min-width:130px;">
<option value="0">推广员账号</option>
<notempty name="teamLeaderData">
<volist name="teamLeaderData" id="vo">
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>
</select>
</div>
</eq>
</notempty>
<volist name=":getAllPromoteListByType(3,false,empty(I('team_leader_id'))?PID:I('team_leader_id'))" id="vo">
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>
</select>
</div>
</eq>
<div class="form-group fl">
<input type="text" name="account" class="txt normal_txt" placeholder="请输入玩家账号"
@ -80,7 +85,8 @@
</div>
<div class="form-group normal_space fl">
<input type="submit" class="submit" id='submit' value="查询">
<input type="submit" class="submit" id='submit' url="{:U('Query/register','model='.$model['name'],false)}"
value="查询">
</div>
<div class="form-group normal_space fl" style="margin-left: 60px;">
@ -89,7 +95,7 @@
<input type="hidden" name="own_id" id="own_id" value="{:empty(I('own_id'))?0:I('own_id')}" />
</label>
</div>
</form>
<!-- </form>-->
</div>
</div>
<div class="page-list query-register-list">
@ -177,6 +183,36 @@
endDate: date
});
$('#team_leader_id').change(function () {
var promoteId = parseInt($(this).val());
var promoteValue = $(this).find("option:selected").text();
$.ajax({
url: "{:U('getChildPromoteList')}",
type: "post",
data: {promote_id:promoteId},
dataType: 'json',
success: function (data) {
var html = "<option value='' selected>推广员账号</option>";
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
if (data.status == 1) {
var promoteData = data.data;
if (promoteData.length > 0) {
for (var i in promoteData) {
html += "<option value='" + promoteData[i]['id'] + "'>" + promoteData[i]['account'] + "(" + promoteData[i]['real_name'] + ")</option>";
}
}
}
$("#promote_id").empty();
$('#promote_id').html(html);
$("#promote_id").select2();
}
});
});
$('#own').on('click',function () {
var ownId = $('#own_id').val();
var checkBox = $(this).children('i');
@ -204,14 +240,26 @@
});
$(".select_gallery").select2();
$('.submit').click(function () {
$('#submit').click(function () {
var sdate = $('#sdate').val();
var edate = $('#edate').val();
if (Date.parse(sdate) > Date.parse(edate)) {
layer.msg('开始时间必须小于等于结束时间');
return false;
}
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>

@ -79,7 +79,12 @@
<div class="form-group normal_space fl">
<select id="promote_id" name="promote_id" class="reselect select_gallery" style="min-width:130px;">
<option value="0">推广员账号</option>
<volist name=":getAllPromoteListByType(3)" id="vo">
<notempty name="teamLeaderData">
<volist name="teamLeaderData" id="vo">
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>
</notempty>
<volist name=":getAllPromoteListByType(3,false,empty(I('team_leader_id'))?PID:I('team_leader_id'))" id="vo">
<option value="{$vo.id}">{$vo['account']}({$vo['real_name']})</option>
</volist>
</select>
@ -234,6 +239,36 @@
setValue('server_id', {$Think.request.server_id |default = '""'});
setValue('row', '{:I("get.row",10)}');
$('#team_leader_id').change(function () {
var promoteId = parseInt($(this).val());
var promoteValue = $(this).find("option:selected").text();
$.ajax({
url: "{:U('getChildPromoteList')}",
type: "post",
data: {promote_id:promoteId},
dataType: 'json',
success: function (data) {
var html = "<option value='' selected>推广员账号</option>";
html += "<option value='" + promoteId + "'>" + promoteValue + "</option>";
if (data.status == 1) {
var promoteData = data.data;
if (promoteData.length > 0) {
for (var i in promoteData) {
html += "<option value='" + promoteData[i]['id'] + "'>" + promoteData[i]['account'] + "(" + promoteData[i]['real_name'] + ")</option>";
}
}
}
$("#promote_id").empty();
$('#promote_id').html(html);
$("#promote_id").select2();
}
});
});
$('#own').on('click',function () {
var ownId = $('#own_id').val();
var checkBox = $(this).children('i');

@ -7,7 +7,7 @@
</block>
<block name="body">
<div class="page-search normal_list query-register-search" style="font-size: small;">
<div class="page-search normal_list query-register-search jssearch" style="font-size: small;">
<div style="position: absolute;margin: .6% 2% 0 2%;margin-top: -30px;color: #6a7082;">
<span class="back-btn" style="cursor: pointer;"><i class="iconfont iconreply"></i> 返回</span>
</div>
@ -20,7 +20,7 @@
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<form action="{:U('Query/viewRole',array('row'=>I('get.row'),'id'=>I('get.id')))}" method="post" enctype="multipart/form-data">
<!-- <form action="{:U('Query/viewRole',array('row'=>I('get.row'),'id'=>I('get.id')))}" method="post" enctype="multipart/form-data">-->
<div class="form-group normal_space fl">
<select id="relation_game_id" name="relation_game_id" class="reselect select_gallery">
<option value="">请选择游戏</option>
@ -65,9 +65,10 @@
</div>
<div class="form-group normal_space fl">
<input type="submit" class="submit" id='submit' value="查询">
<input type="submit" class="submit" id='submit' url="{:U('Query/viewRole',array('model'=>$model['name'],'id'=>I('get.id')),false)}"
value="查询">
</div>
</form>
<!-- </form>-->
</div>
</div>
<div class="page-list query-register-list">
@ -95,7 +96,7 @@
<tr class="num2">
<td>{$vo.user_account}</td>
<td>{$vo.game_name}</td>
<td>Phone</td>
<td>--</td>
<td>{:getSDKTypeName($vo['sdk_version'])}</td>
<td>{$vo.play_time|date='Y-m-d H:i:s',###}</td>
<td>{$vo.server_name}</td>
@ -203,18 +204,25 @@
});
$(".select_gallery").select2();
$('.submit').click(function () {
$('#submit').click(function () {
var sdate = $('#sdate').val();
var edate = $('#edate').val();
// if(sdate =='' || edate==''){
// layer.msg('请完整时间搜索框');
// return false;
// }
if (Date.parse(sdate) > Date.parse(edate)) {
layer.msg('开始时间必须小于等于结束时间');
return false;
}
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;
});
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,2 @@
/** layui-v2.5.5 MIT License By https://www.layui.com */
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 277 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save