From a1c3ad8fb3b390a7652558afd9a342054fb8f96c Mon Sep 17 00:00:00 2001
From: liuweiwen <529520975@qq.com>
Date: Thu, 13 Feb 2020 18:24:52 +0800
Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=B1=95=E7=A4=BA=E6=9D=83?=
=?UTF-8?q?=E9=99=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Admin/Common/extend.php | 2 +-
.../Controller/AdminController.class.php | 1 +
.../Controller/ApplyController.class.php | 6 +-
.../AuthManagerController.class.php | 11 ++-
.../Controller/LaunchController.class.php | 6 +-
.../Admin/Controller/MendController.class.php | 3 +-
.../PromoteCoinController.class.php | 3 +-
.../Controller/PromoteController.class.php | 15 ++--
.../PromoteGameRatioController.class.php | 3 +-
.../Controller/QueryController.class.php | 6 +-
.../Controller/SpendController.class.php | 3 +-
.../Controller/SupportController.class.php | 3 +-
.../TestResourceController.class.php | 3 +-
Application/Admin/Model/MemberModel.class.php | 3 +-
Application/Admin/View/Apply/and_lists.html | 2 +-
.../Admin/View/AuthManager/dataempower.html | 18 ++++
Application/Admin/View/BehaviorLog/index.html | 4 +-
Application/Admin/View/Mend/lists.html | 4 +-
Application/Admin/View/Partner/add.html | 37 +-------
Application/Admin/View/Partner/addfile.html | 84 +++++++++++++++++++
Application/Admin/View/Promote/lists.html | 22 ++---
21 files changed, 166 insertions(+), 73 deletions(-)
create mode 100644 Application/Admin/View/Partner/addfile.html
diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php
index 147b92662..82637cf84 100644
--- a/Application/Admin/Common/extend.php
+++ b/Application/Admin/Common/extend.php
@@ -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();
diff --git a/Application/Admin/Controller/AdminController.class.php b/Application/Admin/Controller/AdminController.class.php
index d0683c889..af06678f6 100644
--- a/Application/Admin/Controller/AdminController.class.php
+++ b/Application/Admin/Controller/AdminController.class.php
@@ -95,6 +95,7 @@ class AdminController extends Controller {
$this->assign('res1',$res1);
$this->assign('__MENU__', $this->getMenus());
+ $this->assign('is_admin', IS_ROOT);
}
/**
* 大菜单存在两个及以上的同方法菜单,需要进行多级菜单确认
diff --git a/Application/Admin/Controller/ApplyController.class.php b/Application/Admin/Controller/ApplyController.class.php
index 717d5d89e..ac210e0e9 100644
--- a/Application/Admin/Controller/ApplyController.class.php
+++ b/Application/Admin/Controller/ApplyController.class.php
@@ -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);
}
diff --git a/Application/Admin/Controller/AuthManagerController.class.php b/Application/Admin/Controller/AuthManagerController.class.php
index 9420e7c42..2ee93a048 100644
--- a/Application/Admin/Controller/AuthManagerController.class.php
+++ b/Application/Admin/Controller/AuthManagerController.class.php
@@ -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'));
diff --git a/Application/Admin/Controller/LaunchController.class.php b/Application/Admin/Controller/LaunchController.class.php
index 0246ad5de..aea28a43f 100644
--- a/Application/Admin/Controller/LaunchController.class.php
+++ b/Application/Admin/Controller/LaunchController.class.php
@@ -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();
}
diff --git a/Application/Admin/Controller/MendController.class.php b/Application/Admin/Controller/MendController.class.php
index 25dd2846d..0e0477f30 100644
--- a/Application/Admin/Controller/MendController.class.php
+++ b/Application/Admin/Controller/MendController.class.php
@@ -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);
}
/**
diff --git a/Application/Admin/Controller/PromoteCoinController.class.php b/Application/Admin/Controller/PromoteCoinController.class.php
index a704addf2..6fddbcbef 100644
--- a/Application/Admin/Controller/PromoteCoinController.class.php
+++ b/Application/Admin/Controller/PromoteCoinController.class.php
@@ -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();
}
diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php
index 6aada89f3..e38c022ac 100644
--- a/Application/Admin/Controller/PromoteController.class.php
+++ b/Application/Admin/Controller/PromoteController.class.php
@@ -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);
diff --git a/Application/Admin/Controller/PromoteGameRatioController.class.php b/Application/Admin/Controller/PromoteGameRatioController.class.php
index 6255912dd..95406194e 100644
--- a/Application/Admin/Controller/PromoteGameRatioController.class.php
+++ b/Application/Admin/Controller/PromoteGameRatioController.class.php
@@ -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();
}
diff --git a/Application/Admin/Controller/QueryController.class.php b/Application/Admin/Controller/QueryController.class.php
index dbc21fce8..cf5744b8a 100644
--- a/Application/Admin/Controller/QueryController.class.php
+++ b/Application/Admin/Controller/QueryController.class.php
@@ -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();
}
diff --git a/Application/Admin/Controller/SpendController.class.php b/Application/Admin/Controller/SpendController.class.php
index ce71bec6c..0f27e6981 100644
--- a/Application/Admin/Controller/SpendController.class.php
+++ b/Application/Admin/Controller/SpendController.class.php
@@ -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();
}
diff --git a/Application/Admin/Controller/SupportController.class.php b/Application/Admin/Controller/SupportController.class.php
index 73bcc9b55..1a532b57a 100644
--- a/Application/Admin/Controller/SupportController.class.php
+++ b/Application/Admin/Controller/SupportController.class.php
@@ -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();
}
diff --git a/Application/Admin/Controller/TestResourceController.class.php b/Application/Admin/Controller/TestResourceController.class.php
index 806f5d8e8..941c167f3 100644
--- a/Application/Admin/Controller/TestResourceController.class.php
+++ b/Application/Admin/Controller/TestResourceController.class.php
@@ -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();
}
diff --git a/Application/Admin/Model/MemberModel.class.php b/Application/Admin/Model/MemberModel.class.php
index 1a8f744a6..67c3675ef 100644
--- a/Application/Admin/Model/MemberModel.class.php
+++ b/Application/Admin/Model/MemberModel.class.php
@@ -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;
diff --git a/Application/Admin/View/Apply/and_lists.html b/Application/Admin/View/Apply/and_lists.html
index b931fc872..15f2f3dba 100644
--- a/Application/Admin/View/Apply/and_lists.html
+++ b/Application/Admin/View/Apply/and_lists.html
@@ -261,7 +261,7 @@
|
-
+
{:get_promote_account($data['promote_id'])}
{:encryptStr(get_promote_account($data['promote_id']))}
diff --git a/Application/Admin/View/AuthManager/dataempower.html b/Application/Admin/View/AuthManager/dataempower.html
index 2ea3a454c..18fb9bf20 100644
--- a/Application/Admin/View/AuthManager/dataempower.html
+++ b/Application/Admin/View/AuthManager/dataempower.html
@@ -58,6 +58,24 @@
|
+
+
+ 数据展示权限: |
+
+
+
+
+
+
+ |
+
+
diff --git a/Application/Admin/View/BehaviorLog/index.html b/Application/Admin/View/BehaviorLog/index.html
index 577f73f22..e78554575 100644
--- a/Application/Admin/View/BehaviorLog/index.html
+++ b/Application/Admin/View/BehaviorLog/index.html
@@ -140,7 +140,7 @@
{$vo.extend} |
{:set_show_time($vo['create_time'])} |
-
+
{$vo.user_account}
{$vo.user_account|encryptStr}
@@ -149,7 +149,7 @@
{$vo.game_name} |
{$vo.server_name} |
-
+
{$vo.promote_account}
{$vo.promote_account|encryptStr}
diff --git a/Application/Admin/View/Mend/lists.html b/Application/Admin/View/Mend/lists.html
index c88c8263d..c21685421 100644
--- a/Application/Admin/View/Mend/lists.html
+++ b/Application/Admin/View/Mend/lists.html
@@ -140,14 +140,14 @@
|
-
+
{$data.user_account}
{$data.user_account|encryptStr}
|
-
+
{:get_promote_name($data['promote_id'])}
{:encryptStr(get_promote_name($data['promote_id']))}
diff --git a/Application/Admin/View/Partner/add.html b/Application/Admin/View/Partner/add.html
index 0e6310fd4..bcff9ee78 100644
--- a/Application/Admin/View/Partner/add.html
+++ b/Application/Admin/View/Partner/add.html
@@ -186,9 +186,7 @@
-
+
返回
@@ -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();
},
diff --git a/Application/Admin/View/Partner/addfile.html b/Application/Admin/View/Partner/addfile.html
new file mode 100644
index 000000000..04a58ea90
--- /dev/null
+++ b/Application/Admin/View/Partner/addfile.html
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Application/Admin/View/Promote/lists.html b/Application/Admin/View/Promote/lists.html
index 49531a83b..d98c32800 100644
--- a/Application/Admin/View/Promote/lists.html
+++ b/Application/Admin/View/Promote/lists.html
@@ -7,7 +7,6 @@
-
| | |