数据权限

master
liuweiwen 5 years ago
parent 124cc21e49
commit 4cb88be352

@ -249,8 +249,8 @@ class DepositController extends ThinkController {
$page = set_pagination($count,$row); $page = set_pagination($count,$row);
if($page) {$this->assign('_page', $page);} if($page) {$this->assign('_page', $page);}
$show_data_power = (is_administrator()|| session('user_auth')['show_data']);
$this->assign("is_admin",is_administrator()); $this->assign('show_data_power', $show_data_power);
$this->assign('list_data', $data); $this->assign('list_data', $data);
$this->meta_title = '平台币充值列表'; $this->meta_title = '平台币充值列表';
$this->display();die(); $this->display();die();

@ -1190,7 +1190,8 @@ class MemberController extends ThinkController
$this->assign('user_count',$count[0]['count']); $this->assign('user_count',$count[0]['count']);
$this->assign("is_admin",is_administrator()); $this->assign("is_admin",is_administrator());
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Member/login_record', 'status' => 1])->find()); $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Member/login_record', 'status' => 1])->find());
$show_data_power = (is_administrator()|| session('user_auth')['show_data']);
$this->assign('show_data_power', $show_data_power);
parent::lists("UserLoginRecord", $p, $extend['map']); parent::lists("UserLoginRecord", $p, $extend['map']);
} }

@ -97,7 +97,8 @@ class MendController extends ThinkController {
$page = set_pagination($count,$row); $page = set_pagination($count,$row);
if($page) {$this->assign('_page', $page);} if($page) {$this->assign('_page', $page);}
$show_data_power = (is_administrator()|| session('user_auth')['show_data']);
$this->assign('show_data_power', $show_data_power);
$this->display(); $this->display();
// parent::lists("Mend",$p,$map); // parent::lists("Mend",$p,$map);
} }

@ -425,6 +425,8 @@ class PromoteController extends ThinkController
$companys = M('promote_company', 'tab_')->where(['status' => 1])->select(); $companys = M('promote_company', 'tab_')->where(['status' => 1])->select();
$this->assign("is_admin",is_administrator()); $this->assign("is_admin",is_administrator());
$show_data_power = (is_administrator()|| session('user_auth')['show_data']);
$this->assign('show_data_power', $show_data_power);
$this->assign('companys', $companys); $this->assign('companys', $companys);
$this->display(); $this->display();
} }

@ -675,7 +675,8 @@ class UserController extends AdminController
$this->m_title = '角色查询'; $this->m_title = '角色查询';
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'User/rolelist', 'status' => 1])->find()); $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'User/rolelist', 'status' => 1])->find());
$this->assign("is_admin",is_administrator()); $this->assign("is_admin",is_administrator());
$show_data_power = (is_administrator()|| session('user_auth')['show_data']);
$this->assign('show_data_power', $show_data_power);
$this->display(); $this->display();
} }

@ -138,7 +138,7 @@
<if condition="$data['promote_account'] eq '自然注册'"> <if condition="$data['promote_account'] eq '自然注册'">
官方渠道 官方渠道
<else/> <else/>
<if condition="$is_admin eq true "> <if condition="$show_data_power eq true ">
{$data.promote_account} {$data.promote_account}
<else /> <else />
{$data.promote_account|encryptStr} {$data.promote_account|encryptStr}

@ -144,12 +144,11 @@
<tr> <tr>
<td><input class="ids" type="checkbox" value="{$data['id']}" name="ids"></td> <td><input class="ids" type="checkbox" value="{$data['id']}" name="ids"></td>
<td> <td>
<!-- <if condition="$is_admin eq true "> <if condition="$show_data_power eq true ">
{$data.user_account} {$data.user_account}
<else /> <else />
{$data.user_account|encryptStr} {$data.user_account|encryptStr}
</if>--> </if>
{$data.user_account}
</td> </td>
<?php $gamename=trim(get_game_name($data['game_id'],'id'));?> <?php $gamename=trim(get_game_name($data['game_id'],'id'));?>
<td><notempty name="gamename">{$gamename}<else /><eq name="data.type" value="2">APP登录<else/>官网登录</eq></notempty></td> <td><notempty name="gamename">{$gamename}<else /><eq name="data.type" value="2">APP登录<else/>官网登录</eq></notempty></td>

@ -68,12 +68,11 @@
<volist name="list_data" id="data"> <volist name="list_data" id="data">
<tr> <tr>
<td> <td>
<!-- <if condition="$is_admin eq true "> <if condition="$show_data_power eq true ">
{$data.account} {$data.account}
<else /> <else />
{$data.account|encryptStr} {$data.account|encryptStr}
</if>--> </if>
{$data.account}
</td> </td>
<td>{$data.register_time|date='Y-m-d H:i:s',###}</td> <td>{$data.register_time|date='Y-m-d H:i:s',###}</td>
<td>{$data.login_time|date='Y-m-d H:i:s',###}</td> <td>{$data.login_time|date='Y-m-d H:i:s',###}</td>
@ -82,20 +81,18 @@
<td>{$data.login_time|date='Y-m-d H:i:s',###}</td> <td>{$data.login_time|date='Y-m-d H:i:s',###}</td>
<td> <td>
<if condition="get_parent_promoteto($data['promote_id']) neq '' "> <if condition="get_parent_promoteto($data['promote_id']) neq '' ">
<!-- <if condition="$is_admin eq true "> <if condition="$show_data_power eq true ">
{$data['promote_account']|encryptStr}{:encryptStr(get_parent_promoteto($data['promote_id']))} {$data['promote_account']|encryptStr}{:encryptStr(get_parent_promoteto($data['promote_id']))}
<else /> <else />
{$data['promote_account']|encryptStr}{:encryptStr(get_parent_promoteto($data['promote_id']))} {$data['promote_account']|encryptStr}{:encryptStr(get_parent_promoteto($data['promote_id']))}
</if>--> </if>
{$data['promote_account']|encryptStr}{:encryptStr(get_parent_promoteto($data['promote_id']))}
<else/> <else/>
{:get_promote_name($data['promote_id'])} <if condition="$show_data_power eq true ">
<!-- <if condition="$is_admin eq true ">
{:get_promote_name($data['promote_id'])} {:get_promote_name($data['promote_id'])}
<else /> <else />
{:encryptStr(get_promote_name($data['promote_id']))} {:encryptStr(get_promote_name($data['promote_id']))}
</if>--> </if>
</if></td> </if></td>
<td> <td>

@ -87,10 +87,29 @@
<volist name="list_data" id="data"> <volist name="list_data" id="data">
<tr> <tr>
<td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td> <td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
<td>{$data['user_account']}</td> <td>
<td>{$data['promote_account']}</td> <if condition="$show_data_power eq true ">
{$data['user_account']}
<else />
{$data['user_account']|encryptStr}
</if>
</td>
<td>
<if condition="$show_data_power eq true ">
{$data['promote_account']}
<else />
{$data['promote_account']|encryptStr}
</if>
</td>
<td>{$data['pay_amount']}</td> <td>{$data['pay_amount']}</td>
<td>{$data['promote_account_to']}</td> <td>
<if condition="$show_data_power eq true ">
{$data['promote_account_to']}
<else />
{$data['promote_account_to']|encryptStr}
</if>
</td>
<td class="js-pop" style="max-width: 400px;padding: 0 20px;"> <td class="js-pop" style="max-width: 400px;padding: 0 20px;">
<a href="javascript:" title="点击查看" class="remarkView" info="{$data['remark']}">{$data['remark']}</a> <a href="javascript:" title="点击查看" class="remarkView" info="{$data['remark']}">{$data['remark']}</a>
</td> </td>
@ -129,7 +148,13 @@
{@each list_data as item,index} {@each list_data as item,index}
<tr> <tr>
<td><input class="ids" type="checkbox" value="${item['id']}" name="ids[]"></td> <td><input class="ids" type="checkbox" value="${item['id']}" name="ids[]"></td>
<td>${item['user_account']}</td> <td>
<if condition="$show_data_power eq true ">
{$data['user_account']}
<else />
{$data['user_account']|encryptStr}
</if>
</td>
<td>${item['promote_account']}</td> <td>${item['promote_account']}</td>
<td>${item['pay_amount']}</td> <td>${item['pay_amount']}</td>
<td>${item['promote_account_to']}</td> <td>${item['promote_account_to']}</td>

@ -84,7 +84,7 @@
<tr> <tr>
<td class="l">真实姓名:</td> <td class="l">真实姓名:</td>
<td class="r"> <td class="r">
<if condition="$is_admin eq true "> <if condition="$show_data_power eq true ">
<input type="text" class="txt" name="real_name" value="{$data['real_name']}" disabled="disabled" style="background:#CCCCCC"> <input type="text" class="txt" name="real_name" value="{$data['real_name']}" disabled="disabled" style="background:#CCCCCC">
<else /> <else />
<input type="text" class="txt" name="real_name" value="{$data['real_name']|encryptRealName}" disabled="disabled" style="background:#CCCCCC"> <input type="text" class="txt" name="real_name" value="{$data['real_name']|encryptRealName}" disabled="disabled" style="background:#CCCCCC">
@ -94,7 +94,7 @@
<tr> <tr>
<td class="l">手机号码:</td> <td class="l">手机号码:</td>
<td class="r"> <td class="r">
<if condition="$is_admin eq true "> <if condition="$show_data_power eq true ">
<input type="text" class="txt" name="mobile_phone" value="{$data['mobile_phone']}" disabled="disabled" style="background:#CCCCCC"> <input type="text" class="txt" name="mobile_phone" value="{$data['mobile_phone']}" disabled="disabled" style="background:#CCCCCC">
<else /> <else />
<input type="text" class="txt" name="mobile_phone" value="{$data['mobile_phone']|encryptStr}" disabled="disabled" style="background:#CCCCCC"> <input type="text" class="txt" name="mobile_phone" value="{$data['mobile_phone']|encryptStr}" disabled="disabled" style="background:#CCCCCC">

@ -128,14 +128,20 @@
<volist name="list_data" id="data"> <volist name="list_data" id="data">
<tr> <tr>
<td>{$data['promote_account']}</td>
<td> <td>
<!-- <if condition="$is_admin eq true "> <if condition="$show_data_power eq true ">
{$data['promote_account']}
<else />
{$data['promote_account']|encryptStr}
</if>
</td>
<td>
<if condition="$show_data_power eq true ">
{$data['user_account']} {$data['user_account']}
<else /> <else />
{$data['user_account']|encryptStr} {$data['user_account']|encryptStr}
</if>--> </if>
{$data['user_account']}
</td> </td>
<td>{$data['game_name']}</td> <td>{$data['game_name']}</td>
<td>{$data['server_name']}</td> <td>{$data['server_name']}</td>

@ -135,12 +135,11 @@
<tr> <tr>
<td>{$data.create_time|date='Y-m-d H:i:s',###}</td> <td>{$data.create_time|date='Y-m-d H:i:s',###}</td>
<td> <td>
<!-- <if condition="$is_admin eq true "> <if condition="$show_data_power eq true ">
{$data.user_account} {$data.user_account}
<else /> <else />
{$data.user_account|encryptStr} {$data.user_account|encryptStr}
</if>--> </if>
{$data.user_account}
</td> </td>
<?php $gamename = trim($data['game_name']); <?php $gamename = trim($data['game_name']);
@ -153,12 +152,11 @@
<td><notempty name="rolename">{$rolename}<else /></notempty></td> <td><notempty name="rolename">{$rolename}<else /></notempty></td>
<td>{$data.role_level}</td> <td>{$data.role_level}</td>
<td> <td>
<!-- <if condition="$is_admin eq true "> <if condition="$show_data_power eq true ">
{$data.promote_account} {$data.promote_account}
<else /> <else />
{$data.promote_account|encryptStr} {$data.promote_account|encryptStr}
</if>--> </if>
{$data.promote_account}
</td> </td>
<td><?= date('Y-m-d H:i:s', $data['play_time']) ?></td> <td><?= date('Y-m-d H:i:s', $data['play_time']) ?></td>
<td>{$data.play_ip}</td> <td>{$data.play_ip}</td>

Loading…
Cancel
Save