From d465be89693ed74fa2b13d7b1f8a7977be44712f Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Thu, 19 Dec 2019 20:57:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90=E6=8F=90?= =?UTF-8?q?=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 5 +++++ .../Admin/Controller/AuthManagerController.class.php | 4 +++- Application/Admin/Controller/MemberController.class.php | 1 + Application/Admin/Model/PromoteModel.class.php | 8 ++++++++ Application/Admin/View/AuthManager/dataempower.html | 5 +++++ Application/Admin/View/BehaviorLog/index.html | 4 +++- Application/Admin/View/Member/login_record.html | 4 +++- Application/Admin/View/Member/user_info.html | 5 ++++- Application/Admin/View/RechargeSum/summation.html | 4 +++- Application/Admin/View/Spend/lists.html | 4 +++- Application/Admin/View/User/rolelist.html | 5 ++++- 11 files changed, 42 insertions(+), 7 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 4a057a759..e4832f814 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -1610,6 +1610,11 @@ function getPowerPromoteIds() } } } +// var_dump(in_array('-1',explode(',',$userAuth['data_president'])));die(); + if (in_array('-1',explode(',',$userAuth['data_president']))) { + $promoteIds = $promoteIds .',0'; + } +// var_dump($promoteIds);die(); session('user_auth_promote_ids', $promoteIds); return $promoteIds; } diff --git a/Application/Admin/Controller/AuthManagerController.class.php b/Application/Admin/Controller/AuthManagerController.class.php index 44c5293c7..5ebaa6eee 100644 --- a/Application/Admin/Controller/AuthManagerController.class.php +++ b/Application/Admin/Controller/AuthManagerController.class.php @@ -482,7 +482,7 @@ class AuthManagerController extends AdminController{ if ($AuthGroup->where("id = {$gid}")->save(array('data_empower_type'=>$data_empower_type,'data_president'=>$promoteData))) { $this->success('操作成功',U('AuthManager/index')); } else { - $this->error('操作失败'); + $this->error('操作失败,请改变成员'); } } @@ -491,6 +491,8 @@ class AuthManagerController extends AdminController{ $promoteData = M('promote','tab_')->field('id as value,account as title')->where(array('level'=>1,'chain'=>'/'))->select(); $data_president = M('AuthGroup')->field('data_president')->where(array('id'=>$_REQUEST['group_id']))->find(); + $promoteData = array_merge([0=>['value'=>'-1','title'=>'官方渠道']],$promoteData); + $returnData = array('data_president'=>$data_president['data_president'],'list'=>$promoteData); $this->ajaxReturn(json_encode($returnData)); diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index d6baa0d01..382d775b7 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -88,6 +88,7 @@ class MemberController extends ThinkController $game_map = " and tab_user_play_info.server_name = '{$_REQUEST['server_name']}' "; } $promoteRoot = getPowerPromoteIds(); + // $data_empower_type = session('user_auth')['data_empower_type']; //// var_dump($promoteRoot);die(); // diff --git a/Application/Admin/Model/PromoteModel.class.php b/Application/Admin/Model/PromoteModel.class.php index 5190c4bcc..4256f3f97 100644 --- a/Application/Admin/Model/PromoteModel.class.php +++ b/Application/Admin/Model/PromoteModel.class.php @@ -392,10 +392,18 @@ class PromoteModel extends Model{ $where['level'] = $level; setPowerPromoteIds($where,'id'); + $offcialData = [0=>['id'=>0,'nickname'=>'官方渠道']]; + $result = $this->field("*")->where($where)->select(); foreach ($result as &$item) { $item['nickname'] = $item['account'] . ($item['nickname'] ? "({$item['nickname']})" : ""); } + + if (in_array('0',explode(',',$where['id'][1]))) { + $result = array_merge($offcialData,$result); +// dump($result);die(); + } + return $result; } } \ No newline at end of file diff --git a/Application/Admin/View/AuthManager/dataempower.html b/Application/Admin/View/AuthManager/dataempower.html index 1cf4dc9ad..e5d0efe8b 100644 --- a/Application/Admin/View/AuthManager/dataempower.html +++ b/Application/Admin/View/AuthManager/dataempower.html @@ -120,6 +120,8 @@ if (JSON.parse(data1).data_president) { var data2 = JSON.parse(data1).data_president.split(","); } + // var dataTransfers = transfer.getData('key123'); + // $('#promote_data').val(JSON.stringify(dataTransfers)); //显示搜索框 transfer.render({ elem: '#test4' @@ -134,6 +136,9 @@ $('#promote_data').val(JSON.stringify(dataTransfer)); } }) + + var dataTransfers = transfer.getData('key123'); + $('#promote_data').val(JSON.stringify(dataTransfers)); transfets = transfer; //批量办法定事件 util.event('lay-demoTransferActive', { diff --git a/Application/Admin/View/BehaviorLog/index.html b/Application/Admin/View/BehaviorLog/index.html index ced2a39cd..e97c61afd 100644 --- a/Application/Admin/View/BehaviorLog/index.html +++ b/Application/Admin/View/BehaviorLog/index.html @@ -417,7 +417,9 @@ data:{level:$("#promote_level option:selected").val()}, dataType:'json', success:function(response){ - str = ''; + str = '' + + // '' + + ''; data = response.data; for (var i in data){ str += "" diff --git a/Application/Admin/View/Member/login_record.html b/Application/Admin/View/Member/login_record.html index 77da76991..f5adb2b50 100644 --- a/Application/Admin/View/Member/login_record.html +++ b/Application/Admin/View/Member/login_record.html @@ -306,7 +306,9 @@ data:{level:$("#promote_level option:selected").val()}, dataType:'json', success:function(response){ - str = ''; + str = '' + + // '' + + ''; data = response.data; for (var i in data){ str += "" diff --git a/Application/Admin/View/Member/user_info.html b/Application/Admin/View/Member/user_info.html index 46af4f3f8..e6fdb7bb0 100644 --- a/Application/Admin/View/Member/user_info.html +++ b/Application/Admin/View/Member/user_info.html @@ -456,7 +456,10 @@ $(function(){ data:{level:$("#promote_level option:selected").val()}, dataType:'json', success:function(response){ - str = ''; + str = '' + + // '' + + // '' + + ''; // $.each(response.data, function(index, item){ // console.log(item.id); // str += ''; diff --git a/Application/Admin/View/RechargeSum/summation.html b/Application/Admin/View/RechargeSum/summation.html index 9aec41121..f26c65462 100644 --- a/Application/Admin/View/RechargeSum/summation.html +++ b/Application/Admin/View/RechargeSum/summation.html @@ -300,7 +300,9 @@ $(function(){ data:{level:$("#promote_level option:selected").val()}, dataType:'json', success:function(response){ - str = ''; + str = '' + + // '' + + ''; // $.each(response.data, function(index, item){ // console.log(item.id); // str += ''; diff --git a/Application/Admin/View/Spend/lists.html b/Application/Admin/View/Spend/lists.html index 55acf2fc6..d6d71f5fd 100644 --- a/Application/Admin/View/Spend/lists.html +++ b/Application/Admin/View/Spend/lists.html @@ -491,7 +491,9 @@ data:{level:$("#promote_level option:selected").val()}, dataType:'json', success:function(response){ - str = ''; + str = '' + + // '' + + ''; data = response.data; for (var i in data){ str += "" diff --git a/Application/Admin/View/User/rolelist.html b/Application/Admin/View/User/rolelist.html index abd7077d9..3353001a9 100644 --- a/Application/Admin/View/User/rolelist.html +++ b/Application/Admin/View/User/rolelist.html @@ -303,7 +303,10 @@ $(".select_gallery").select2(); data:{level:$("#promote_level option:selected").val()}, dataType:'json', success:function(response){ - str = ''; + str = '' + + // '' + + // '' + + ''; // $.each(response.data, function(index, item){ // console.log(item.id); // str += '';