|
|
|
@ -58,7 +58,6 @@ class BaseController extends HomeController
|
|
|
|
|
$this->assign("grand_id", $loginer['grand_id']);
|
|
|
|
|
$this->assign('canViewUserRecharge', $this->canViewUserRecharge);
|
|
|
|
|
|
|
|
|
|
$this->assign("menus", $this->getMenus($loginer,$this->isOpenQuery,$this->canViewUserRecharge));
|
|
|
|
|
|
|
|
|
|
$result = M('site_apply', 'tab_')->where("promote_id=$pid")->getField('status');
|
|
|
|
|
if ($result['status'] == 1) {
|
|
|
|
@ -434,165 +433,4 @@ class BaseController extends HomeController
|
|
|
|
|
->select();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function promote_is_active_class($promoteType)
|
|
|
|
|
{
|
|
|
|
|
return is_active_class(
|
|
|
|
|
['Promote'],
|
|
|
|
|
['children', 'addPromote', 'edit_chlid'],
|
|
|
|
|
function() use($promoteType) {
|
|
|
|
|
return $_GET["promote_type"] == $promoteType;
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 全部菜单
|
|
|
|
|
* @return array[]
|
|
|
|
|
*/
|
|
|
|
|
function getMenus($loginer,$isOpenQuery,$canViewUserRecharge)
|
|
|
|
|
{
|
|
|
|
|
$menus =[
|
|
|
|
|
[
|
|
|
|
|
'name' => '管理中心',
|
|
|
|
|
'class'=>'prev_icon icon_guanli',
|
|
|
|
|
'children'=>[
|
|
|
|
|
['name' => '部门长管理', 'url' => U('Promote/children', ['promote_type' => 0]), 'class'=>$this->promote_is_active_class(0),'perms'=>[
|
|
|
|
|
'level'=>[1]
|
|
|
|
|
]],
|
|
|
|
|
['name' => '组长管理', 'url' => U('Promote/children', ['promote_type' => 1]), 'class'=>$this->promote_is_active_class(1),'perms' => [
|
|
|
|
|
'level'=>[1,2,]
|
|
|
|
|
]],
|
|
|
|
|
['name' => '推广员管理', 'url' => U('Promote/children', ['promote_type' => 2]), 'class'=>$this->promote_is_active_class(2),'perms' => [
|
|
|
|
|
'level'=>[1,2,3]
|
|
|
|
|
]]
|
|
|
|
|
],
|
|
|
|
|
'perms' => [
|
|
|
|
|
'level'=>[1,2,3],
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'name' => '数据管理',
|
|
|
|
|
'class'=>'prev_icon icon_shujvi',
|
|
|
|
|
'children'=>[
|
|
|
|
|
['name' => '每日概况', 'url' => U('Query/dailySummary'), 'class'=>is_active_class(['Query'], ['dailySummary']),],
|
|
|
|
|
['name' => '数据汇总', 'url' => U('Query/summary'), 'class'=>is_active_class(['Query'], ['summary']),],
|
|
|
|
|
['name' => '订单查询', 'url' => U('Query/recharge'), 'class'=>is_active_class(['Query'], ['recharge', 'viewSpendDetailed']),'perms' => [
|
|
|
|
|
'view-recharge'=>true
|
|
|
|
|
]],
|
|
|
|
|
['name' => '注册明细', 'url' => U('Query/register'), 'class'=>is_active_class(['Query'], ['register', 'viewRole']),],
|
|
|
|
|
['name' => 'ARPU统计', 'url' => U('Query/arpu'), 'class'=>is_active_class(['Query'], ['arpu']),'perms' => [
|
|
|
|
|
'view-recharge'=>true
|
|
|
|
|
]],
|
|
|
|
|
['name' => '角色查询', 'url' => U('Query/userRoles'), 'class'=>is_active_class(['Query'], ['userRoles']),],
|
|
|
|
|
['name' => '充值玩家', 'url' => U('Query/userRecharges'), 'class'=>is_active_class(['Query'], ['userRecharges']),'perms' => [
|
|
|
|
|
'view-recharge'=>true
|
|
|
|
|
]],
|
|
|
|
|
['name' => '团队/推广员业绩', 'url' => U('Query/achievement'), 'class'=>is_active_class(['Query'], ['achievement']),],
|
|
|
|
|
['name' => 'IOS下载数统计', 'url' => U('Query/iosDownLoadData'), 'class'=>is_active_class(['Query'], ['iosDownLoadData']),],
|
|
|
|
|
['name' => '用户留存率', 'url' => U('Query/userretention'), 'class'=>is_active_class(['Query'], ['userretention']),],
|
|
|
|
|
['name' => '游戏分区数据汇总', 'url' => U('Query/gameData'), 'class'=>is_active_class(['Query'], ['gameData']),],
|
|
|
|
|
],
|
|
|
|
|
'perms' => [
|
|
|
|
|
'OpenQuery'=>$this->isOpenQuery,
|
|
|
|
|
]
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'name' => '财务管理',
|
|
|
|
|
'class'=>'prev_icon icon_caiwu',
|
|
|
|
|
'children'=>[
|
|
|
|
|
['name' => '结算中心', 'url' => U('Finance/index'), 'class'=>is_active_class(['Finance'], ['index']),],
|
|
|
|
|
['name' => '结算明细', 'url' => U('Finance/settlementDtl'), 'class'=>is_active_class(['Finance'], ['settlementDtl']),],
|
|
|
|
|
['name' => '提现记录', 'url' => U('Finance/withdrawRecord'), 'class'=>is_active_class(['Finance'], ['withdrawRecord', 'withdrawDtl', 'settlementOrder']),],////
|
|
|
|
|
['name' => '公司结算', 'url' => U('Withdraw/index'), 'class'=>is_active_class(['Withdraw'], ['index', 'withdrawDetail', 'withdrawOrderDetail']),'perms' => [
|
|
|
|
|
'withdraw_show'=> 1
|
|
|
|
|
]]//
|
|
|
|
|
],
|
|
|
|
|
'perms' => [
|
|
|
|
|
'view-recharge'=>true, 'level'=>1
|
|
|
|
|
]
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'name' => '游戏管理',
|
|
|
|
|
'class'=>'prev_icon icon_fenbao',
|
|
|
|
|
'children'=>[
|
|
|
|
|
['name' => '专服管理', 'url' => U('Game/index'), 'class'=>is_active_class(['Game'], ['index']),],
|
|
|
|
|
['name' => '混服管理', 'url' => U('Game/mix'), 'class'=>is_active_class(['Game'], ['mix']),],
|
|
|
|
|
['name' => '分成比例', 'url' => U('GameDivide/index'), 'class'=>is_active_class(['GameDivide'], ['index']),],
|
|
|
|
|
['name' => '设置', 'url' => U('Promote/setChildGamePermission'), 'class'=>is_active_class(['Promote'], ['setChildGamePermission']),],/////
|
|
|
|
|
['name' => '资料专区', 'url' => U('Apply/feature'), 'class'=>is_active_class(['Apply'], ['feature']),]
|
|
|
|
|
]
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'name' => '安全管理',
|
|
|
|
|
'class'=>'prev_icon icon_fenbao',
|
|
|
|
|
'children'=>[
|
|
|
|
|
['name' => '短信登录设置', 'url' => U('Safe/bindTel'), 'class'=>is_active_class(['Safe'], ['bindTel']),],
|
|
|
|
|
['name' => '下载日志管理', 'url' => U('Download/listsIndex'), 'class'=>is_active_class(['Download'], ['listsIndex']),],
|
|
|
|
|
['name' => '修改登录密码', 'url' => U('Safe/modifyloginpassword'), 'class'=>is_active_class(['Safe'], ['modifyloginpassword']),],
|
|
|
|
|
['name' => '设置安全密码', 'url' => U('Safe/setSafeIndex'), 'class'=>is_active_class(['Safe'], ['setSafeIndex']),],
|
|
|
|
|
['name' => '用户基本信息', 'url' => U('Safe/modifyBaseInfo'), 'class'=>is_active_class(['Safe'], ['modifyBaseInfo']),],
|
|
|
|
|
['name' => '操作日志', 'url' => U('Safe/promoteLogs'), 'class'=>is_active_class(['Safe'], ['promoteLogs']),],
|
|
|
|
|
]
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'name' => '测试资源',
|
|
|
|
|
'class'=>'prev_icon icon_fenbao',
|
|
|
|
|
'children'=>[
|
|
|
|
|
['name' => '测试资源申请', 'url' => U('TestingResource/index'), 'class'=>is_active_class(['TestingResource'], ['index']),],
|
|
|
|
|
['name' => '测试资源申请记录', 'url' => U('TestingResource/batches'), 'class'=>is_active_class(['TestingResource'], ['batches']),],
|
|
|
|
|
]
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'name' => '评级管理',
|
|
|
|
|
'class'=>'prev_icon icon_fenbao',
|
|
|
|
|
'children'=>[
|
|
|
|
|
['name' => '评级设定', 'url' => U('PromoteGrade/settings'), 'class'=>is_active_class(['PromoteGrade'], ['settings', 'setting']),],
|
|
|
|
|
['name' => '>团队评级', 'url' => U('PromoteGrade/index'), 'class'=>is_active_class(['PromoteGrade'], ['index']),],
|
|
|
|
|
]
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'name' => '平台币管理',
|
|
|
|
|
'class'=>'prev_icon icon_fuli',
|
|
|
|
|
'children'=>[
|
|
|
|
|
['name' => '我的平台币', 'url' => U('PromoteCoin/myCoin'), 'class'=>is_active_class(['PromoteCoin'], ['myCoin', 'coinRecord', 'coinRecordDesc']),],
|
|
|
|
|
['name' => '平台币转移', 'url' => U('PromoteCoin/transferLogs'), 'class'=>is_active_class(['PromoteCoin'], ['shift', 'transferLogs']),],
|
|
|
|
|
['name' => '平台币充值', 'url' => U('CoinOrder/order_list'), 'class'=>is_active_class(['CoinOrder'], ['order_list', 'order_add', 'order_detail']),],
|
|
|
|
|
]
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'name' => '玩家管理',
|
|
|
|
|
'class'=>'prev_icon icon_fuli',
|
|
|
|
|
'children'=>[
|
|
|
|
|
['name' => '行为日志', 'url' => U('TestingResource/index'), 'class'=>is_active_class(['TestingResource'], ['index']),],
|
|
|
|
|
]
|
|
|
|
|
],
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
// if ($loginer['level'] >= 4){
|
|
|
|
|
// unset($menus[0]);
|
|
|
|
|
// }
|
|
|
|
|
// if ($loginer['level'] == 2){
|
|
|
|
|
// unset($menus[0]['children'][0]);
|
|
|
|
|
// }
|
|
|
|
|
// if ($loginer['level'] == 3){
|
|
|
|
|
// unset($menus[0]['children'][0]);
|
|
|
|
|
// unset($menus[0]['children'][1]);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
foreach ($menus as $menu =>$v){
|
|
|
|
|
if (isset($v['perms']))
|
|
|
|
|
foreach ($v['children'] as $m){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$permHandles = [
|
|
|
|
|
'level' => function($level, $levels) {
|
|
|
|
|
return in_array($level, $levels);
|
|
|
|
|
},
|
|
|
|
|
'view-recharge' => function ($canViewRecharge) {
|
|
|
|
|
reutrn $canViewRecharge;
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|