数据展示权限

master
liuweiwen 5 years ago
parent 4b480e6f94
commit a1c3ad8fb3

@ -1550,7 +1550,7 @@ function getGameList($partner_id) {
function getAdminData ($uid) {
$adminData = M('auth_group_access')
->field('data_empower_type,data_president')
->field('data_empower_type,data_president,show_data')
->join('left join sys_auth_group on sys_auth_group_access.group_id=sys_auth_group.id')
->where(array('uid'=>$uid))->find();

@ -95,6 +95,7 @@ class AdminController extends Controller {
$this->assign('res1',$res1);
$this->assign('__MENU__', $this->getMenus());
$this->assign('is_admin', IS_ROOT);
}
/**
* 大菜单存在两个及以上的同方法菜单,需要进行多级菜单确认

@ -98,7 +98,8 @@ class ApplyController extends ThinkController
$this -> meta_title = 'APP分包';
$this -> m_title = '游戏盒子APP分包';
$this -> assign('commonset', M('Kuaijieicon') -> where(['url' => 'Apply/app_lists', 'status' => 1]) -> find());
$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();
}
@ -178,7 +179,8 @@ class ApplyController extends ThinkController
$this -> assign('list_data', $listdata);
$this -> m_title = '游戏分包';
$this -> assign('commonset', M('Kuaijieicon') -> where(['url' => 'Apply/and_lists', 'status' => 1]) -> find());
$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();
//parent::order_lists(self::model_name,$_GET["p"],$map);
}

@ -443,9 +443,11 @@ class AuthManagerController extends AdminController{
$auth_group = M('AuthGroup')->where( array('status'=>array('egt','0'),'module'=>'admin','type'=>AuthGroupModel::TYPE_ADMIN) )
->getfield('id,id,title,rules');
// var_dump($auth_group);die();
$empower_type = M('AuthGroup')->field('data_empower_type')->where(array('id'=>$_GET['group_id']))->find();
$empower_type = M('AuthGroup')->field('data_empower_type,show_data')->where(array('id'=>$_GET['group_id']))->find();
// var_dump($empower_type);die();
$this->assign('data_empower_type', $empower_type['data_empower_type']);
$this->assign('show_data', $empower_type['show_data']);
$this->assign('auth_group', $auth_group);
$this->display();
@ -455,6 +457,7 @@ class AuthManagerController extends AdminController{
$mid = I('id');
$gid = I('group_id');
$data_empower_type = I('data_empower_type');
$show_data = I('show_data');
$promoteData = I('promote_data');
// dump(json_decode($promoteData,true));
@ -479,7 +482,11 @@ class AuthManagerController extends AdminController{
$promoteData = '';
}
if ($AuthGroup->where("id = {$gid}")->save(array('data_empower_type'=>$data_empower_type,'data_president'=>$promoteData))) {
if ($AuthGroup->where("id = {$gid}")->save(array(
'data_empower_type'=>$data_empower_type,
'data_president'=>$promoteData,
'show_data'=>$show_data
))) {
$this->success('操作成功',U('AuthManager/index'));
} else {
$this->success('操作成功',U('AuthManager/index'));

@ -36,7 +36,8 @@ class LaunchController extends ThinkController {
$this->assign('list_data',$data['data']);
$this->assign('_page',$data['page']);
$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();
}
@ -177,7 +178,8 @@ class LaunchController extends ThinkController {
$this->m_title = '投放数据';
$this->m_url = 'Launch/data';
$this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Merchandise/lists','status'=>1])->find());
$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();
}

@ -31,7 +31,8 @@ class MendController extends ThinkController {
$map['register_type'] = array('in','(0,1,2,3,4,5,6,7)');
//为数据权限添加
setPowerPromoteIds($map);
$this->assign('is_admin', is_administrator());
$show_data_power = (is_administrator()|| session('user_auth')['show_data']);
$this->assign('show_data_power', $show_data_power);
parent::lists("user",$p,$map);
}
/**

@ -254,7 +254,8 @@ class PromoteCoinController extends ThinkController
$this->assign('_page', $page);
}
$this->assign('list_data', $data);
$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();
}

@ -18,7 +18,8 @@ class PromoteController extends ThinkController
public function lists($p=1)
{
$this->assign('is_admin', is_administrator());
$show_data_power = (is_administrator()|| session('user_auth')['show_data']);
$this->assign('show_data_power', $show_data_power);
switch ($_GET['type']) {
case '':
case 1:
@ -645,7 +646,8 @@ class PromoteController extends ThinkController
$this->m_title = '实时注册';
$this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/ch_reg_list','status'=>1])->find());
$this->assign('is_admin', is_administrator());
$show_data_power = (is_administrator()|| session('user_auth')['show_data']);
$this->assign('show_data_power', $show_data_power);
$user->user_join_v1($model, $_GET['p']);
}
@ -786,7 +788,8 @@ class PromoteController extends ThinkController
$this->m_title = '实时充值';
$this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/spend_list','status'=>1])->find());
$this->assign('is_admin', is_administrator());
$show_data_power = (is_administrator()|| session('user_auth')['show_data']);
$this->assign('show_data_power', $show_data_power);
$user->list_($model, $_GET['p']);
}
@ -862,7 +865,8 @@ class PromoteController extends ThinkController
$this->m_title = '会长代充记录';
$this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/agent_list','status'=>1])->find());
$this->assign('is_admin', is_administrator());
$show_data_power = (is_administrator()|| session('user_auth')['show_data']);
$this->assign('show_data_power', $show_data_power);
parent::order_lists('Agent', $_GET["p"], $map);
}
/**
@ -1263,7 +1267,8 @@ class PromoteController extends ThinkController
}
$companys = M('promote_company', 'tab_')->field('id, company_name')->select();
$admins = M('member')->field('uid,nickname')->select();
$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('list_data', $list_data);
$this->assign('companys', $companys);
$this->assign('admins', $admins);

@ -222,7 +222,8 @@ class PromoteGameRatioController extends ThinkController
$this->assign('promoteList', getPromoteByLevel(1, intval(I('company_id', 0))));
$this->assign('statusList', self::$statusList);
$this->assign('reviewRule', $reviewRule);
$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->meta_title = $metaTitle;
$this->display();
}

@ -38,7 +38,8 @@ class QueryController extends ThinkController
$row = intval(I('row', 10));
$group = I('group', 1);
$this->assign('group', $group);
$this->assign('is_admin', is_administrator());
$show_data_power = (is_administrator()|| session('user_auth')['show_data']);
$this->assign('show_data_power', $show_data_power);
$promoteId = I('promote_id', 0);
if ($group == 1) {
@ -1160,7 +1161,8 @@ class QueryController extends ThinkController
$companys = getPromoteCompanys();
$this->assign('companys', $companys);
$this->assign('reviewTypeList', $reviewTypeList);
$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('list_data', $datas);
$this->display();
}

@ -128,7 +128,8 @@ class SpendController extends ThinkController
$this->assign('endDate', $endDate);
$this->assign('list_data', $data['data']);
$this->assign('_page', $data['page']);
$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();
}

@ -42,7 +42,8 @@ class SupportController extends ThinkController {
if($page) {$this->assign('_page', $page);}
$this->assign('list_data', $list);
$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->meta_title = '资源发放';
$this->display();
}

@ -62,7 +62,8 @@ class TestResourceController extends ThinkController
if($page) {$this->assign('_page', $page);}
$this->meta_title = '扶持号管理';
$this->assign('data',$data);
$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();
}

@ -79,7 +79,8 @@ class MemberModel extends Model {
'username' => $user['nickname'],
'last_login_time' => $user['last_login_time'],
'data_empower_type'=>$adminData['data_empower_type'],
'data_president'=>$adminData['data_president']
'data_president'=>$adminData['data_president'],
'show_data'=>$adminData['show_data'],
);
//登录有效时间改为1小时
$expireTime = 3600;

@ -261,7 +261,7 @@
<tr>
<td style="border-right:1px solid #DDDDDD;text-align:center"><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]" ></td>
<td style="border-right:1px solid #DDDDDD;text-align:center">
<if condition="$is_admin eq true ">
<if condition="$show_data_power eq true ">
{:get_promote_account($data['promote_id'])}
<else />
{:encryptStr(get_promote_account($data['promote_id']))}

@ -58,6 +58,24 @@
<input type="hidden" name="promote_data" id="promote_data" value="[]">
</td>
</tr>
<tr>
<td class="l noticeinfo" style="padding-left: 15px;">数据展示权限:</td>
<td class="r table_radio">
<span class="form_radio table_btn">
<label>
<input type="radio" class="inp_radio" value="1" name="show_data"
<if condition="$show_data==1"> checked </if>> 是
</label>
<label>
<input type="radio" class="inp_radio" value="0" name="show_data"
<if condition="$show_data==0"> checked </if>> 否
</label>
</span>
<span class="notice-text"></span>
</td>
</tr>
</tbody>
</table>
</div>

@ -140,7 +140,7 @@
<td>{$vo.extend}</td>
<td>{:set_show_time($vo['create_time'])}</td>
<td>
<if condition="$is_admin eq true ">
<if condition="$show_data_power eq true ">
{$vo.user_account}
<else />
{$vo.user_account|encryptStr}
@ -149,7 +149,7 @@
<td>{$vo.game_name}</td>
<td>{$vo.server_name}</td>
<td>
<if condition="$is_admin eq true ">
<if condition="$show_data_power eq true ">
{$vo.promote_account}
<else />
{$vo.promote_account|encryptStr}

@ -140,14 +140,14 @@
<tr>
<td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
<td>
<if condition="$is_admin eq true ">
<if condition="$show_data_power eq true ">
{$data.user_account}
<else />
{$data.user_account|encryptStr}
</if>
</td>
<td>
<if condition="$is_admin eq true ">
<if condition="$show_data_power eq true ">
{:get_promote_name($data['promote_id'])}
<else />
{:encryptStr(get_promote_name($data['promote_id']))}

@ -186,9 +186,7 @@
</table>
</div>
<div class="form-item cf">
<button class="submit_btn ajax-post" id="submit" target-form="form-horizontal" style="margin-left:210px;">
保存
</button>
<input class="submit_btn ajax-post" type="button" value="保存" id="submit" target-form="form-horizontal" style="margin-left:210px;">
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="{:U('Partner/lists')}" >
返回
</a>
@ -292,36 +290,12 @@
});
});
$("#submit").on("click",function(){
// var obj = {
// "company_name":["required","推广公司名称不允许为空"],
// "platform_name":["nocheck"],
// "contact_begin":["date","合同开始时间不能为空"],
// "contact_end":["date","合同结束时间不能为空"],
// "fax_ratio":["number","开票税率必须是数字如果无此项请填0"],
// "company_type":["required","公司性质不能为空","select"],
// "is_sign_contact":["required","是否签署合同项不能为空","select"],
// "company_belong":["required","团体归属不能为空","select"],
// "settlement_contact":["required","结算联系人不能为空"],
// "contact_phone":["phone","联系人电话格式不对或不能为空"],
// "address":["required","联系人地址不能为空"],
// "bank_card":["bankid","银行卡格式错误或不能为空"],
// "bank_name":["required","银行名称不能为空"],
// "bank_address":["required","银行开户网点不能为空"],
// "content":["nocheck"],
// "status":["nocheck","","radio"]
// }
var cres = CIC.checkAddInput(obj);
if(!cres){
return false;
}
if (Date.parse(cres.contact_begin) > Date.parse(cres.contact_end)) {
layer.msg('开始时间必须小于等于结束时间');
return false;
}
var cres = $('form').serializeArray();
//验证通过
if(doc.length > 0){
cres.resources = doc;
cres.push({"name":"file_info", "value":JSON.stringify(doc)});
}
console.log(cres)
//添加
$.ajax({
url:"{:U('partner/add')}",
@ -345,11 +319,8 @@
})
var PROMOTE = {
juicerFun(){
console.log(333);
var tpl =$("#doctpl").html();
console.log(tpl);
var html = juicer(tpl, {list:doc});
console.log(html);
$("#docShow").html(html);
PROMOTE.juicerEvent();
},

@ -0,0 +1,84 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title></title>
<link href="http://admin.vlcms.com/Public/icon.ico" type="image/x-icon" rel="shortcut icon">
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/module.css">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
</head>
<style>
html {
min-width:100%;
}
body {
padding: 0px;
}
</style>
<body>
<div id="main" class="main" style="min-height: 342px;margin-top: 20px;padding-left: 50px;">
<table border="0" cellspacing="0" cellpadding="0">
<tr style="padding: 10px;height: 50px;">
<td class="l" style="width: 100px;">文件名称:</td>
<td class="r" style="margin-left: 10px;">
<input type="text" id="filename" name="company_name" value="" placeholder="请输入文件名称">
</td>
</tr>
<tr style="padding: 10px;height: 50px;">
<td class="l">文件选择:</td>
<td >
<input type="file" id="fileinput" name="file">
</td>
</tr>
</table>
<div class="jssearch search_list fl cf">
<div class="input-list">
<div class="sch-btn uploadfile" style="width: 100px;padding: 5px;">确认添加</div>
</div>
</div>
</div>
<script>
$(function(){
$(".uploadfile").on("click",function(){
var formData = new FormData();
var filename = $("#filename").val();
if(filename == ''){
layer.msg("文件名不能为空");
return false;
}
formData.append("file_name", filename);
formData.append("file", document.getElementById("fileinput").files[0]);
var index = layer.load();
$.ajax({
url:"{:U('Partner/saveFile')}",
type:"post",
data:formData,
processData:false,
contentType:false,
success:function(data){
layer.close(index);
if(data.status == 1){
window.parent.addFile(data);
}else{
layer.alert(data.info);
}
},
error:function(e){
}
});
})
});
</script>
</body>
</html>

@ -7,7 +7,6 @@
<script src="__STATIC__/layer/layer.js"></script>
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<link rel="stylesheet" href="__CSS__/promote.css" type="text/css"/>
<style>
.select2-container--default .select2-selection--single {
color: #000;
@ -227,20 +226,18 @@
<td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
<td>{$data.id}</td>
<td>
<!-- <if condition="$is_admin eq true ">
<if condition="$show_data_power eq true ">
{$data.account}
<else />
{$data.account|encryptStr}
</if>-->
{$data.account}
</if>
</td>
<td>
<!-- <if condition="$is_admin eq true ">
<if condition="$show_data_power eq true ">
{$data.mobile_phone}
<else />
{$data.mobile_phone|encryptStr}
</if>-->
{$data.mobile_phone}
</if>
</td>
<td>{$data.balance_coin}</td>
<td>{:sum_promote_total_money($data['id'])}</td>
@ -248,12 +245,11 @@
<td>{:set_show_time($data['last_login_time'])}</td>
<td>{:get_promote_levels($data['id'])}</td>
<td>
<!-- <if condition="$is_admin eq true ">
<if condition="$show_data_power eq true ">
{:getTopPromote($data['id'])['account']}
<else />
{:encryptStr(getTopPromote($data['id'])['account'])}
</if>-->
{:getTopPromote($data['id'])['account']}
</if>
</td>
<td>{$data['company_belong_str']}</td>
<td>{$data['company_relation_str']}</td>
@ -303,9 +299,6 @@
<if condition="session('user_auth.uid') eq 1">
<a class='delete' data-id="{$data.id}">删除</a>
</if>
<if condition="$data['level'] eq 1">
<a href="{:U('certification', array('id' => $data['id']))}" style="cursor: pointer;">资质认证</a>
</if>
</td>
</tr>
</volist>
@ -344,7 +337,7 @@
<td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
<td>{$data.id}</td>
<td>
<if condition="$is_admin eq true ">
<if condition="$show_data_power eq true ">
{:get_promote_account($data.promote_id)}
<else />
{:get_promote_account($data.promote_id)|encryptStr}
@ -447,6 +440,7 @@
</form>
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
</div>
</block>
<block name="script">

Loading…
Cancel
Save