角色查询、额外额度、测试资源权限修改

master
liyang 4 years ago
parent 8617ad3e91
commit a457750390

@ -574,6 +574,14 @@ class TestingResourceController extends ThinkController
$otherQuota = I('other_quota', 0);
$otherQuotaRemark = I('otherQuotaRemark', '');
M('user_play_info', 'tab_')->where(['id' => $id])->save(['testing_other_quota' => $otherQuota,'testing_other_quota_remark' => $otherQuotaRemark]);
$admin_account = $_SESSION['onethink_admin']['user_auth']['username'];
$otherQuotaRemark = !empty($otherQuotaRemark) ? $otherQuotaRemark : '无';
addOperationLog(array(
"op_type"=>1,
'op_name'=>'修改额外额度记录',
"key"=>'/'.$admin_account.'修改了额外额度'.$otherQuota.',备注信息为'.$otherQuotaRemark.'/',
"url"=>U("TestingResource/index")
));
return $this->ajaxReturn(['status' => 1, 'message' => '设置成功']);
}

@ -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;
}
];
}
}

@ -2002,6 +2002,7 @@ class DownloadController extends BaseController
$serverId = I('server_id', 0);
$isSelf = I('is_self', 0);
$roleName = I('role_name', '');
$roleId = I('role_id', '');
$userAccount = I('user_account', '');
$promoteId = I('promote_id', 0);
$sdkVersion = I('sdk_version', 0);
@ -2036,6 +2037,9 @@ class DownloadController extends BaseController
if ($roleName != '') {
$map['role_name'] = ['like', '%' . $roleName . '%'];
}
if ($roleId != '') {
$map['role_id'] = $roleId;
}
if ($userAccount != '') {
$map['user_account'] = ['like', '%' . $userAccount . '%'];
}
@ -3120,6 +3124,7 @@ public function iosDetailExcelInfo($id,$map) {
array('device_number','设备码'),
array('register_time','注册时间'),
array('register_ip','注册IP'),
array('role_id','角色ID'),
array('login_time','最近登录时间'),
array('login_ip','最近登录IP'),
@ -3144,6 +3149,7 @@ public function iosDetailExcelInfo($id,$map) {
'role.server_name',
'role.sdk_version',
'role.role_name',
'role.role_id',
'role.role_level',
'role.create_time',
'role.play_time',

@ -1352,7 +1352,7 @@ class PromoteController extends BaseController
// if (!preg_match($pattern, $_REQUEST['email'])) {
// $this->error('您输入的电子邮箱地址不合法', U('Promote/edit_chlid', array('id' => $id, 'type' => I('type', 0))));
// };
$_POST['ts_over_apply'] = $_POST['ts_over_manage'];
$user = new PromoteApi();
$res = $user->edit($_POST);
@ -1395,7 +1395,6 @@ class PromoteController extends BaseController
$se['bank_account'] = $_REQUEST['bank_account'];
$se['account_openin'] = $_REQUEST['account_openin'];
$se['bank_area'] = $_REQUEST['s_province'] . ',' . $_REQUEST['s_city'] . ',' . $_REQUEST['s_county'];
$se['ts_over_manage'] = $_REQUEST['ts_over_manage'];
$res = M("promote", "tab_")->where($map)->save($se);
if ($res !== false) {

@ -1705,6 +1705,7 @@ class QueryController extends BaseController
$serverId = I('server_id', 0);
$isSelf = I('is_self', 0);
$roleName = I('role_name', '');
$roleId = I('role_id', '');
$userAccount = I('user_account', '');
$promoteId = I('promote_id', 0);
$sdkVersion = I('sdk_version', 0);
@ -1736,6 +1737,8 @@ class QueryController extends BaseController
}
if ($roleName != '') {
$map['role_name'] = ['like', '%' . $roleName . '%'];
}if ($roleId != '') {
$map['role_id'] = $roleId;
}
if ($userAccount != '') {
$map['user_account'] = ['like', '%' . $userAccount . '%'];
@ -1792,12 +1795,12 @@ class QueryController extends BaseController
'role.server_name',
'role.sdk_version',
'role.role_name',
'role.role_id',
'role.role_level',
'role.create_time',
'role.play_time',
'role.play_ip'
];
$query = M('user_play_info', 'tab_')
->field($columns)
->alias('role')

@ -37,20 +37,7 @@
</div>
<div class="subNavBox">
<a href="{:U('Promote/index')}" class="subNav <?=is_active_class(['Promote'], ['index'])?>"> 后台首页 </a>
<!--
测试遍历输出菜单
-->
<?php foreach ($menus as $menu =>$v):?>
<div class="subNav jssubNav"><i class="<?= $v['class'];?>"></i><span><?= $v['name'];?></span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<?php foreach ($v['children'] as $m):?>
<a href="<?= $m['url'];?>" class="<?= $m['class'];?>"><?= $m['name']?></a>
<?php endforeach;?>
</div>
<?php endforeach;?>
<!--
<?php if ($loginer['ts_over_manage'] == 0) :?>
<?php if ($loginer['level'] < 4) :?>
<div class="subNav jssubNav"><i class="prev_icon icon_guanli"></i><span>管理中心</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
@ -92,13 +79,13 @@
<?php if($canViewUserRecharge):?>
<a href="{:U('Query/arpu')}" class="<?=is_active_class(['Query'], ['arpu'])?>">ARPU统计</a>
<?php endif;?>
&lt;!&ndash; <a href="{:U('Query/retention_analysis')}" class="<?=is_active_class(['Query'], ['retention_analysis'])?>">留存统计</a> &ndash;&gt;
<!-- <a href="{:U('Query/retention_analysis')}" class="<?=is_active_class(['Query'], ['retention_analysis'])?>">留存统计</a> -->
<a href="{:U('Query/userRoles')}" class="<?=is_active_class(['Query'], ['userRoles'])?>">角色查询</a>
<?php if($canViewUserRecharge):?>
<a href="{:U('Query/userRecharges')}" class="<?=is_active_class(['Query'], ['userRecharges'])?>">充值玩家</a>
<?php endif;?>
<a href="{:U('Query/achievement')}" class="<?=is_active_class(['Query'], ['achievement'])?>">团队/推广员业绩</a>
&lt;!&ndash; <a href="{:U('Query/promoteQuota')}" class="<?=is_active_class(['Query'], ['promoteQuota', 'quotaDtl'])?>">推广员指标</a> &ndash;&gt;
<!-- <a href="{:U('Query/promoteQuota')}" class="<?=is_active_class(['Query'], ['promoteQuota', 'quotaDtl'])?>">推广员指标</a> -->
<a href="{:U('Query/iosDownLoadData')}" class="<?=is_active_class(['Query'], ['iosDownLoadData'])?>">IOS下载数统计</a>
<a href="{:U('Query/userretention')}" class="<?=is_active_class(['Query'], ['userretention'])?>">用户留存率</a>
<a href="{:U('Query/gameData')}" class="<?=is_active_class(['Query'], ['gameData'])?>">游戏分区数据汇总</a>
@ -129,7 +116,7 @@
</div>
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>安全管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
&lt;!&ndash;<a href="{:U('Apply/app_index')}" class="<?=is_active_class(['Apply'], ['app_index'])?>">APP列表</a>&ndash;&gt;
<!--<a href="{:U('Apply/app_index')}" class="<?=is_active_class(['Apply'], ['app_index'])?>">APP列表</a>-->
<a href="{:U('Safe/bindTel')}" class="<?=is_active_class(['Safe'], ['bindTel'])?>">短信登陆设置</a>
<a href="{:U('Download/listsIndex')}" class="<?=is_active_class(['Download'], ['listsIndex'])?>">下载日志管理</a>
<a href="{:U('Safe/modifyloginpassword')}" class="<?=is_active_class(['Safe'], ['modifyloginpassword'])?>">修改登录密码</a>
@ -155,16 +142,16 @@
<a href="{:U('PromoteGrade/index')}" class="<?=is_active_class(['PromoteGrade'], ['index'])?>">团队评级</a>
</div>
<?php endif;?>
&lt;!&ndash; <eq name="parent_id" value="0">
<!-- <eq name="parent_id" value="0">
<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('Support/index')}" class="<?=is_active_class(['Support'], ['add', 'apply'])?>">扶持申请</a>
<a href="{:U('Support/lists')}" class="<?=is_active_class(['Support'], ['lists'])?>">扶持记录</a>
<a href="{:U('Support/quota')}" class="<?=is_active_class(['Support'], ['quota'])?>">扶持额度</a>
</div>
</eq> &ndash;&gt;
</eq> -->
&lt;!&ndash;<div class="subNav jssubNav"><i class="prev_icon icon_fuli"></i><span>会长福利</span><i class="arrow_icon"></i></div>&ndash;&gt;
<!--<div class="subNav jssubNav"><i class="prev_icon icon_fuli"></i><span>会长福利</span><i class="arrow_icon"></i></div>-->
<div class="subNav jssubNav"><i class="prev_icon icon_fuli"></i><span>平台币管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<a href="{:U('PromoteCoin/myCoin')}" class="<?=is_active_class(['PromoteCoin'], ['myCoin', 'coinRecord', 'coinRecordDesc'])?>">我的平台币</a>
@ -179,7 +166,16 @@
<div class="navContent jsnavContent">
<a href="{:U('Players/playAction')}" class="<?=is_active_class(['Players'], ['playAction'])?>">行为日志</a>
</div>
<?php endif;?>-->
<?php endif;?>
<?php else:?>
<?php if($loginer['level'] == 1 || $loginer['ts_over_apply'] == 1):?>
<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('TestingResource/index')}" class="<?=is_active_class(['TestingResource'], ['index'])?>">测试资源申请</a>
<a href="{:U('TestingResource/batches')}" class="<?=is_active_class(['TestingResource'], ['batches'])?>">测试资源申请记录</a>
</div>
<?php endif;?>
<?php endif;?>
</div>
</div>
@ -245,9 +241,6 @@
$(this).next(".jsnavContent").slideToggle(300).siblings(".jsnavContent").slideUp(500);
});
});
var ts_over_manage = "<?php echo $loginer['ts_over_manage']?>"
console.log(ts_over_manage);
</script>
<block name="script"></block>
</body>

@ -74,6 +74,9 @@
<label> ~ </label>
<input type="text" class="txt integer-input" name="role_level_end" style="width: 50px" value="{:I('role_level_end')}" >
</div>
<div class="form-group normal_space">
<input type="text" name="role_id" class="txt normal_txt" id="uid" placeholder="请输入角色ID" value="{:I('role_id')}">
</div>
<div class="form-group normal_space">
<input type="hidden" name="last_sort_name" id="last_sort_name" value="{:I('sort_name', '')}">
<input type="hidden" name="sort_name" id="sort_name" value="{:I('sort_name', '')}">
@ -115,6 +118,7 @@
</if>
</th>
<th>注册IP</th>
<th>角色ID</th>
<th class="sort" sort-name="login_time" class="title-cursor-pointer">最近登录时间
<if condition="'login_time' == I('sort_name', '')">
<if condition="1 == $sort">
@ -166,6 +170,7 @@
<td>{$record.device_number}</td>
<td>{$record.register_time}</td>
<td>{$record.register_ip}</td>
<td>{$record.role_id}</td>
<td>{$record.login_time}</td>
<td>{$record.login_ip}</td>

Loading…
Cancel
Save