From cc6d095a1c3867e15bd45cbce881cbd2bce77b99 Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Sat, 21 Dec 2019 11:56:43 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E9=9D=9E=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=8A=A0=E5=AF=86=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/DepositController.class.php | 42 ++-- Application/Admin/View/Deposit/lists.html | 235 ++++++++++-------- Application/Admin/View/Promote/lists.html | 8 +- 3 files changed, 154 insertions(+), 131 deletions(-) diff --git a/Application/Admin/Controller/DepositController.class.php b/Application/Admin/Controller/DepositController.class.php index 6378c79a0..b386cddb7 100644 --- a/Application/Admin/Controller/DepositController.class.php +++ b/Application/Admin/Controller/DepositController.class.php @@ -8,13 +8,13 @@ use User\Api\UserApi as UserApi; * @author 麦当苗儿 */ class DepositController extends ThinkController { - const model_name = 'Deposit'; + const model_name = 'Deposit'; public function lists(){ - if(isset($_REQUEST['user_account'])){ - $map['user_account']=array('like','%'.trim($_REQUEST['user_account']).'%'); - unset($_REQUEST['user_account']); - } + if(isset($_REQUEST['user_account'])){ + $map['user_account']=array('like','%'.trim($_REQUEST['user_account']).'%'); + unset($_REQUEST['user_account']); + } if(isset($_REQUEST['pay_order_number'])){ $map['pay_order_number']=array('like','%'.trim($_REQUEST['pay_order_number']).'%'); unset($_REQUEST['pay_order_number']); @@ -49,7 +49,7 @@ class DepositController extends ThinkController { unset($_REQUEST['promote_id']); unset($_REQUEST['promote_name']); } - if(isset($_REQUEST['time-start'])&&isset($_REQUEST['time-end'])){ + if(isset($_REQUEST['time-start'])&&isset($_REQUEST['time-end'])){ $map['create_time'] =array('BETWEEN',array(strtotime($_REQUEST['time-start']),strtotime($_REQUEST['time-end'])+24*60*60-1)); unset($_REQUEST['time-start']);unset($_REQUEST['time-end']); }elseif(isset($_REQUEST['time-start'])){ @@ -101,16 +101,16 @@ class DepositController extends ThinkController { $this->assign('ttotal',$ttotal); $this->assign('ytotal',$ytotal); - $this->m_title = '平台币充值'; - $this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Deposit/lists','status'=>1])->find()); - + $this->m_title = '平台币充值'; + $this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Deposit/lists','status'=>1])->find()); - parent::lists(self::model_name,$_GET["p"],$map); + $this->assign("is_admin",is_administrator()); + parent::lists(self::model_name,$_GET["p"],$map); } - public function send_lists(){ + public function send_lists(){ if(IS_POST){ $type = $_REQUEST['type']; $firstpay = A('Send','Event'); @@ -131,8 +131,8 @@ class DepositController extends ThinkController { $this->meta_title ="后台发放(玩家)"; - $this->m_title = '平台币发放(玩家)'; - $this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Deposit/send_lists','status'=>1])->find()); + $this->m_title = '平台币发放(玩家)'; + $this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Deposit/send_lists','status'=>1])->find()); $this->display(); } @@ -183,10 +183,10 @@ class DepositController extends ThinkController { unset($_REQUEST['op_id']); } - if(is_numeric($_REQUEST['status']) && ($_REQUEST['status']==0 || $_REQUEST['status']==1)) { - $map['status'] = $_REQUEST['status']; - unset($_REQUEST['status']); - } + if(is_numeric($_REQUEST['status']) && ($_REQUEST['status']==0 || $_REQUEST['status']==1)) { + $map['status'] = $_REQUEST['status']; + unset($_REQUEST['status']); + } $map1=$map; $map1['status']=1; @@ -209,8 +209,8 @@ class DepositController extends ThinkController { ); $user = A('User','Event'); - $this->m_title = '平台币发放(玩家)'; - $this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Deposit/send_lists','status'=>1])->find()); + $this->m_title = '平台币发放(玩家)'; + $this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Deposit/send_lists','status'=>1])->find()); $user->user_join_($model,$_GET['p']); @@ -222,7 +222,7 @@ class DepositController extends ThinkController { * @param $ids */ public function batch($ids=''){ - if ( empty($ids) ) { + if ( empty($ids) ) { $this->error('请选择要操作的数据!'); } $list=M("provide_user","tab_"); @@ -244,7 +244,7 @@ class DepositController extends ThinkController { } public function delprovide($ids=null){ - if ( empty($ids) ) { + if ( empty($ids) ) { $this->error('请选择要操作的数据!'); } $list=M("provide_user","tab_"); diff --git a/Application/Admin/View/Deposit/lists.html b/Application/Admin/View/Deposit/lists.html index 7fe8954f1..8fc244467 100644 --- a/Application/Admin/View/Deposit/lists.html +++ b/Application/Admin/View/Deposit/lists.html @@ -1,43 +1,43 @@ - - - + + + - + resize: none; + border-width: 1px; + border-style: solid; + border-color: #a7b5bc #ced9df #ced9df #a7b5bc; + box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px; + height:28px;border-radius:3px;font-size:12px; + } + .select2-container--default .select2-selection--single .select2-selection__rendered { + line-height:35px; + line-height:28px; + } + .select2-container--default .select2-selection--single .select2-selection__arrow { + height:26px; + } + .select2-container--default .select2-search--dropdown .select2-search__field { + height:26px;line-height:26px;font-size:12px; + } + .select2-results__option[aria-selected] {font-size:12px;} + + - - + +
-
- +
+
下单未付款
- +
@@ -96,56 +96,73 @@ - 订单号 - 玩家账号 - 所属推广员 - - - 充值平台币 - - - 充值方式 - 充值ip - - - 充值时间 - - - 订单状态 + 订单号 + 玩家账号 + 所属推广员 + + + 充值平台币 + + + 充值方式 + 充值ip + + + 充值时间 + + + 订单状态 - aOh! 暂时还没有内容! - - - - {:$data['pay_order_number']} - {$data.user_account} - 官方渠道{$data.promote_account} - {$data.pay_amount} - {:get_pay_way($data['pay_way'])} - {$data.pay_ip} - {:set_show_time($data['create_time'],'','pay')} - - - {:get_info_status($data['pay_status'],9)} - - {:get_info_status($data['pay_status'],9)} - - - - + aOh! 暂时还没有内容! + + + + {:$data['pay_order_number']} + + + {$data.user_account} + + {$data.user_account|encryptStr} + + + + + 官方渠道 + + + {$data.promote_account} + + {$data.promote_account|encryptStr} + + + + + {$data.pay_amount} + {:get_pay_way($data['pay_way'])} + {$data.pay_ip} + {:set_show_time($data['create_time'],'','pay')} + + + {:get_info_status($data['pay_status'],9)} + + {:get_info_status($data['pay_status'],9)} + + + + - 汇总 - - 当页充值:{:array_sum(array_column(array_status2value('pay_status','',$list_data),'pay_amount'))}; - 今日充值:{$ttotal} ; - 昨日充值:{$ytotal} ; - 累计充值:{$total}元(此处只汇总充值成功的订单) + 汇总 + + 当页充值:{:array_sum(array_column(array_status2value('pay_status','',$list_data),'pay_amount'))}; + 今日充值:{$ttotal} ; + 昨日充值:{$ytotal} ; + 累计充值:{$total}元(此处只汇总充值成功的订单) @@ -153,19 +170,19 @@
- 导出 + 导出 {$_page|default=''}
- - + + @@ -180,10 +197,10 @@ diff --git a/Application/Admin/View/Promote/lists.html b/Application/Admin/View/Promote/lists.html index d0a2938c4..2fb1f517d 100644 --- a/Application/Admin/View/Promote/lists.html +++ b/Application/Admin/View/Promote/lists.html @@ -224,7 +224,13 @@ {:set_show_time($data['create_time'])} {:set_show_time($data['last_login_time'])} {:get_promote_levels($data['id'])} - {:getTopPromote($data['id'])['account']} + + + {:getTopPromote($data['id'])['account']} + + {:encryptStr(getTopPromote($data['id'])['account'])} + + {:get_business_affairs_account($data['ba_id'])} {:get_info_status($data['status'],3)} From 9a2a7df2e6e3ba89e6840ff591e4a8591a588870 Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Sat, 21 Dec 2019 13:25:59 +0800 Subject: [PATCH 02/15] =?UTF-8?q?=E9=9D=9E=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=8A=A0=E5=AF=86=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/UserController.class.php | 1 + Application/Admin/View/User/rolelist.html | 556 +++++++++--------- 2 files changed, 285 insertions(+), 272 deletions(-) diff --git a/Application/Admin/Controller/UserController.class.php b/Application/Admin/Controller/UserController.class.php index 95ecf6de8..c5070cf55 100644 --- a/Application/Admin/Controller/UserController.class.php +++ b/Application/Admin/Controller/UserController.class.php @@ -674,6 +674,7 @@ class UserController extends AdminController $this->m_title = '角色查询'; $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'User/rolelist', 'status' => 1])->find()); + $this->assign("is_admin",is_administrator()); $this->display(); diff --git a/Application/Admin/View/User/rolelist.html b/Application/Admin/View/User/rolelist.html index 3353001a9..b2fe62527 100644 --- a/Application/Admin/View/User/rolelist.html +++ b/Application/Admin/View/User/rolelist.html @@ -1,79 +1,79 @@ - - - - - - + resize: none; + border-width: 1px; + border-style: solid; + border-color: #a7b5bc #ced9df #ced9df #a7b5bc; + box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px; + height:28px;border-radius:3px;font-size:12px; + } + .select2-container--default .select2-selection--single .select2-selection__rendered { + line-height:35px; + line-height:28px; + } + .select2-container--default .select2-selection--single .select2-selection__arrow { + height:26px; + } + .select2-container--default .select2-search--dropdown .select2-search__field { + height:26px;line-height:26px;font-size:12px; + } + .select2-results__option[aria-selected] {font-size:12px;} + .badge { + position: relative; + display: inline-block; + padding: 0 6px; + font-size: 12px; + text-align: center; + background-color: #1E9FFF; + color: #fff; + border-radius: 2px; + height: 18px; + line-height: 18px; + margin-right: 10px; + } + + - - -
+ + +
-
-
- +
+
+
-
+
   
-     -
-
- -
-
- -
+     +
+
+ +
+
+ +
 - 
- - + +
-
+
-
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
创角时间玩家账号游戏名称游戏区服ID游戏区服角色ID角色名游戏等级所属推广员最后登录时间最后登录IP
{$data.create_time|date='Y-m-d H:i:s',###}{$data.user_account} {$gamename}{$data['server_id']}{$servername}{$data['role_id']}{$rolename}{$data.role_level}{$data.promote_account}{$data.play_ip}
aOh! 暂时还没有内容!
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
创角时间玩家账号游戏名称游戏区服ID游戏区服角色ID角色名游戏等级所属推广员最后登录时间最后登录IP
{$data.create_time|date='Y-m-d H:i:s',###} + + {$data.user_account} + + {$data.user_account|encryptStr} + + {$gamename}{$data['server_id']}{$servername}{$data['role_id']}{$rolename}{$data.role_level} + + {$data.promote_account} + + {$data.promote_account|encryptStr} + + {$data.play_ip}
aOh! 暂时还没有内容!
+
- 导出 {$_page}
- - - + + + - + if(C('COLOR_STYLE')=='blue_color') echo ''; @@ -198,159 +210,159 @@ $(".select_gallery").select2(); - + $("#game_name").change(function(){ + $("#game_type").change(); + }); + $("#game_name").change(); + From b3e09ad5dbdf2c51510b17f39f899aaa15009774 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Sat, 21 Dec 2019 14:15:39 +0800 Subject: [PATCH 03/15] =?UTF-8?q?=E6=94=BE=E8=A1=8Cajax,=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E6=97=A0=E6=9D=83=E9=99=90=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/AdminController.class.php | 55 ++++++++++--------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/Application/Admin/Controller/AdminController.class.php b/Application/Admin/Controller/AdminController.class.php index 29e5b8242..15a92dfd5 100644 --- a/Application/Admin/Controller/AdminController.class.php +++ b/Application/Admin/Controller/AdminController.class.php @@ -16,7 +16,6 @@ use Admin\Model\AuthGroupModel; * @author 麦当苗儿 */ class AdminController extends Controller { - /** * 后台控制器初始化 */ @@ -49,36 +48,40 @@ class AdminController extends Controller { if ( false === $access ) { $this->error('403:禁止访问'); }elseif(null === $access ){ - //检测访问权限 - $rule = strtolower(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME); - if ( !$this->checkRule($rule,array('in','1,2')) ){ - - if ($rule == "admin/index/index"){ - //如果首页没有访问权限 自动检测有访问权限的页面然后跳转过去 - $qx = M("Auth_group")->table("__AUTH_GROUP__ as ag") - ->join("__AUTH_GROUP_ACCESS__ as aga on(ag.id=aga.group_id and aga.uid=".UID.")",'right') - ->where("ag.status=1")->limit(1)->select(); - if (empty($qx)){ - //如果没有任何权限 直接登出 - D('Member')->logout(); - session('[destroy]'); + if(CONTROLLER_NAME !== "Ajax"){//ajax放行 + //检测访问权限 + $rule = strtolower(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME); + if ( !$this->checkRule($rule,array('in','1,2')) ){ + + if ($rule == "admin/index/index"){ + //如果首页没有访问权限 自动检测有访问权限的页面然后跳转过去 + $qx = M("Auth_group")->table("__AUTH_GROUP__ as ag") + ->join("__AUTH_GROUP_ACCESS__ as aga on(ag.id=aga.group_id and aga.uid=".UID.")",'right') + ->where("ag.status=1")->limit(1)->select(); + if (empty($qx)){ + //如果没有任何权限 直接登出 + D('Member')->logout(); + session('[destroy]'); + } + $where['id'] = substr($qx[0]['rules'],0,strpos($qx[0]['rules'], ',')); + //$where['id'] = substr($qx[0]['rules'],0,1) + $dz = M("auth_rule")->field('name')->where($where)->find(); + $red = substr($dz['name'],6); + redirect(U("$red")); + }else{ + $this->error('未授权访问!'); } - $where['id'] = substr($qx[0]['rules'],0,1);; - $dz = M("auth_rule")->field('name')->where($where)->find(); - $red = substr($dz['name'],6); - redirect(U("$red")); - }else{ - $this->error('未授权访问!'); - } - }else{ - // 检测分类及内容有关的各项动态权限 - $dynamic = $this->checkDynamic(); - if( false === $dynamic ){ - $this->error('未授权访问!'); + }else{ + // 检测分类及内容有关的各项动态权限 + $dynamic = $this->checkDynamic(); + if( false === $dynamic ){ + $this->error('未授权访问!'); + } } } } + } $map2['uid'] = session("user_auth.uid"); $res = M('auth_group_access','sys_')->field('uid,group_id')->where($map2)->find(); From c6b8f99b6e95682bf02828f861f5cc3e805ffd4d Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Sat, 21 Dec 2019 14:15:44 +0800 Subject: [PATCH 04/15] =?UTF-8?q?=E9=9D=9E=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=8A=A0=E5=AF=86=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/MemberController.class.php | 23 ++++++++- Application/Admin/View/Member/edit.html | 49 ++++++++++++++++--- 2 files changed, 65 insertions(+), 7 deletions(-) diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index aa45e178b..9166e73c7 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -3,6 +3,7 @@ namespace Admin\Controller; use Sdk\Controller\AgeController; +use Think\Log; use User\Api\MemberApi as MemberApi; use Org\WeixinSDK\Weixin; @@ -937,11 +938,31 @@ class MemberController extends ThinkController } } + + public function changeprelname() + { + if (preg_match('/^([\xe4-\xe9][\x80-\xbf]{2}){2,4}$/', $_POST['real_name'])) { + //重复判断 + $map['id'] = $_POST['id']; + $pro = M("User", "tab_") + ->where($map) + ->setField('real_name', $_POST['real_name']); + if ($pro !== false) { + $this->ajaxReturn(array("status" => 1, "msg" => "真实姓名修改成功")); + } else { + $this->ajaxReturn(array("status" => 0, "msg" => "真实姓名修改失败")); + } + } else { + $this->ajaxReturn(array("status" => 0, "msg" => "真实姓名输入错误")); + } + } + + public function changepidcard() { if (preg_match('/^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/', $_POST['idcard'])) { //重复判断 - $where['idcard'] = $_POST['idcard']; + //$where['idcard'] = $_POST['idcard']; /*$user = M('User', 'tab_')->where($where)->field('id,account')->find(); if ($user) { $this->ajaxReturn(array("status" => 0, "msg" => "该身份证号码已被" . $user['account'] . "(" . $user['id'] . ")绑定")); diff --git a/Application/Admin/View/Member/edit.html b/Application/Admin/View/Member/edit.html index 62dd12e68..2bae45352 100644 --- a/Application/Admin/View/Member/edit.html +++ b/Application/Admin/View/Member/edit.html @@ -99,19 +99,21 @@ 未成年 意外数据 - - - 需玩家认证真实姓名和身份证号码 - + 需玩家认证真实姓名和身份证号码 真实姓名 - + - + + + + + + 点击修改 @@ -366,6 +368,41 @@ }); }); + $("#relname").click(function () { + layer.prompt({ + formType: 3, + title: "请输入真实姓名", + value: '' + }, function (real_name) { + var jsid = $('#selfid').val(); + var realName = /^[\u4E00-\u9FA5]{2,4}$/; + if(!realName.test(real_name)){ + layer.msg("真实姓名填写有误"); + return false; + } + $.ajax({ + url: '{:U("changeprelname")}', + type: 'post', + dataType: 'json', + data: {real_name:real_name,id:jsid}, + success: function (data) { + if (data.status > 0) { + layer.msg(data.msg); + setTimeout(function(){ + self.location.reload(true); + },1500); + + } else { + layer.msg(data.msg) + } + }, + error: function () { + alert("服务器故障!"); + } + }); + }); + }); + $("#idcard").click(function () { layer.prompt({ formType: 3, From 1ca183b5470f63237054903a3ffc3b5489ca1fe8 Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Sat, 21 Dec 2019 14:41:20 +0800 Subject: [PATCH 05/15] =?UTF-8?q?=E9=9D=9E=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=8A=A0=E5=AF=86=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BehaviorLogController.class.php | 1 + Application/Admin/View/BehaviorLog/index.html | 154 ++++++++++-------- 2 files changed, 84 insertions(+), 71 deletions(-) diff --git a/Application/Admin/Controller/BehaviorLogController.class.php b/Application/Admin/Controller/BehaviorLogController.class.php index 01a43b416..79fc6c29e 100644 --- a/Application/Admin/Controller/BehaviorLogController.class.php +++ b/Application/Admin/Controller/BehaviorLogController.class.php @@ -78,6 +78,7 @@ class BehaviorLogController extends ThinkController $this->assign('startDate', $startDate); $this->assign('endDate', $endDate); $this->assign('data', $data); + $this->assign("is_admin",is_administrator()); $this->display('index'); } diff --git a/Application/Admin/View/BehaviorLog/index.html b/Application/Admin/View/BehaviorLog/index.html index e97c61afd..39a87c998 100644 --- a/Application/Admin/View/BehaviorLog/index.html +++ b/Application/Admin/View/BehaviorLog/index.html @@ -7,24 +7,24 @@ @@ -37,7 +37,7 @@
- +
@@ -63,14 +63,14 @@ - +
+
- - - 已添加添加至常用设置 -
+ @@ -197,7 +209,7 @@ @@ -418,8 +430,8 @@ dataType:'json', success:function(response){ str = '' + - // '' + - ''; + // '' + + ''; data = response.data; for (var i in data){ str += "" @@ -432,29 +444,29 @@ }); $("#promote_level").change(); - var game_server = "{:I('server_name')}"; - $("#sdk_version").change(function(){ - $.ajax({ - url:"{:U('Ajax/getGmeServer')}", - type:"post", - data:{sdk_version:$("#sdk_version option:selected").val(), game_name:$("#game_name option:selected").val()}, - dataType:'json', - success:function(data){ - str = ""; - for (var i in data){ - str += "" - } - $("#server_name").empty(); - $("#server_name").append(str); - $("#server_name").select2(); + var game_server = "{:I('server_name')}"; + $("#sdk_version").change(function(){ + $.ajax({ + url:"{:U('Ajax/getGmeServer')}", + type:"post", + data:{sdk_version:$("#sdk_version option:selected").val(), game_name:$("#game_name option:selected").val()}, + dataType:'json', + success:function(data){ + str = ""; + for (var i in data){ + str += "" } - }) - }); + $("#server_name").empty(); + $("#server_name").append(str); + $("#server_name").select2(); + } + }) + }); - $("#game_name").change(function(){ - $("#sdk_version").change(); - }); - $("#game_name").change(); + $("#game_name").change(function(){ + $("#sdk_version").change(); + }); + $("#game_name").change(); /** * 初始化select2单选,默认带搜索功能。 From 86dd4a295296c76d91b55abbef1964d615f4e836 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Sat, 21 Dec 2019 15:31:12 +0800 Subject: [PATCH 06/15] =?UTF-8?q?=E3=80=90=E7=94=A8=E6=88=B7=E3=80=91-?= =?UTF-8?q?=E3=80=90=E7=8E=A9=E5=AE=B6=E7=BB=84=E3=80=91-=E3=80=90?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E8=AE=B0=E5=BD=95=E3=80=91-=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E4=BC=9A=E9=95=BF=E5=8F=AA=E6=98=BE=E7=A4=BA=E8=BF=99?= =?UTF-8?q?=E4=B8=AA=E4=BC=9A=E9=95=BF=E7=9A=84=E7=99=BB=E5=BD=95=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=20=E6=94=B9=E4=B8=BA=E5=B1=95=E7=A4=BA=E8=BF=99?= =?UTF-8?q?=E4=B8=AA=E4=BC=9A=E9=95=BF=E5=8F=8A=E5=85=B6=E6=89=80=E5=B1=9E?= =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=91=98=E7=9A=84=E7=99=BB=E5=BD=95=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 34 ++++++++++++++----- .../Controller/MemberController.class.php | 13 +++++-- .../Admin/View/Member/device_bans_list.html | 4 --- 3 files changed, 36 insertions(+), 15 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index e4832f814..e720bc776 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -44,16 +44,11 @@ function get_promote_list_by_id($id=0) { if(is_numeric($id) && $id>=0) { $map['parent_id'] = $id; - $list = $query->where($map)->select(); } elseif(is_array($id)) { $map['parent_id'] = array('in',$id); - $list = $query->where($map)->select(); - } elseif(is_numeric($id) && $id<0){ - $list = $query->where($map)->select(); - } else { - $list = ''; } - return $list; + $list = $query->where($map)->select(); + return $list; } /* @@ -1590,7 +1585,7 @@ function getPowerPromoteIds() if ($myPromote_ids) { if ($userAuth['data_empower_type'] == 2) {//部分会长加上自己创建的会长 - $userAuth['data_president'] .= "," . $myPromote_ids; +// $userAuth['data_president'] .= "," . $myPromote_ids; } elseif ($userAuth['data_empower_type'] == 3) {//自己创建的会长和底下推广员 $userAuth['data_president'] = $myPromote_ids; } @@ -1619,11 +1614,17 @@ function getPowerPromoteIds() return $promoteIds; } +/** + * 为数据权限添加筛选参数 + * @param array $map 查询条件 + * @param string $column 字段名,默认为promote_id + * @return mixed + */ function setPowerPromoteIds(&$map, $column = 'promote_id') { //为数据权限添加 $promoteIds = getPowerPromoteIds(); if (empty($promoteIds)) { - $map[$column] = -1; + $map[$column] = -1;//没权限时将promote_id置为-1 } elseif ($promoteIds != 'all') { if (isset($map[$column])) { if (isset($map['_string'])) {//查询字段中已存在promote_id,不覆盖此条件而处理 @@ -1697,4 +1698,19 @@ function get_admin_listOther() if(empty($list)){return false;} return $list; } + +/** + * 根据会长id底下的推广员id + * @param $promote_id + * @return mixed + */ +function getOffspringByPromoteId($promote_id) { + $promote_ids = M('promote', 'tab_') + ->where(['chain' => ['like', "%/{$promote_id}/%"]]) + ->field('group_concat(id) as promote_ids') + ->find(); + return $promote_ids['promote_ids']; +} + + ?> diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index 9166e73c7..fd6c8a73c 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -1070,17 +1070,26 @@ class MemberController extends ThinkController setPowerPromoteIds($map,'promote_id'); if (isset($_REQUEST['promote_id'])) { - $map['promote_id'] = $_REQUEST['promote_id']; + if (I('promote_level') ==1) { + $promote_ids = getOffspringByPromoteId($_REQUEST['promote_id']); + if (empty($promote_ids)) { + $promote_ids = -1; + } + $map['promote_id'] = ['exp', "in($promote_ids)"]; + } else { + $map['promote_id'] = $_REQUEST['promote_id']; + } unset($_REQUEST['promote_id']); } + // $map['type'] = 1; // $map['login_time'] = ['exp', 'login_time<>0']; $extend = array(); $extend['map'] = $map; $count = M('UserLoginRecord','tab_')->field('user_id')->where($extend['map'])->group('user_id')->select(false); $sql = "select count(user_id) as count from ({$count})t"; + $count = M('UserLoginRecord','tab_')->query($sql); -// var_dump($sql);die(); $this->m_title = '登录记录'; $this->assign('user_count',$count[0]['count']); diff --git a/Application/Admin/View/Member/device_bans_list.html b/Application/Admin/View/Member/device_bans_list.html index 62730c29c..6e4686a3e 100644 --- a/Application/Admin/View/Member/device_bans_list.html +++ b/Application/Admin/View/Member/device_bans_list.html @@ -25,10 +25,6 @@ height:26px;line-height:26px;font-size:12px; } .select2-results__option[aria-selected] {font-size:12px;} - .select2-dropdown { - z-index: 1; - } -
- +
这是内容
@@ -138,7 +138,7 @@ $(function(){ var content = $('#main'); var top_alert = $('#tip'); //$('body').append('
成功
'); - + top_alert.find('.tipclose').on('click', function () { top_alert.removeClass('block').slideUp(200); // content.animate({paddingTop:'-=55'},200); @@ -155,7 +155,7 @@ $(function(){ } }); }) - + $('.new li:eq(1)').click(function(){ $.ajax({ type: 'POST', @@ -204,7 +204,7 @@ $(function(){
功能菜单
- + @@ -315,11 +315,11 @@ $(function(){ $this.next().slideToggle("fast").siblings(".side-sub-menu:visible"). prev("h3").addClass('no').find("i").addClass("icon-fold").end().end().hide(); });*/ - + $("#subnav").on("click", "h3", function(event){ var e = event || window.event; var target = $(e.target); - var $this = $(this); + var $this = $(this); if ($this.index() == target.index()) $this.find(".icon").toggleClass("icon-fold"); else @@ -327,7 +327,7 @@ $(function(){ $this.next().slideToggle("fast").siblings(".side-sub-menu:visible"). prev("h3").find("i").addClass("icon-fold").end().end().hide(); }); - + $("#subnav h3 a").click(function(e){e.stopPropagation()}); From eb6c65522d4e2053eae14b4c89c1dc52ecdd0288 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Sat, 21 Dec 2019 17:20:49 +0800 Subject: [PATCH 13/15] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Promote/lists.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Application/Admin/View/Promote/lists.html b/Application/Admin/View/Promote/lists.html index f81056080..0aa7f9d25 100644 --- a/Application/Admin/View/Promote/lists.html +++ b/Application/Admin/View/Promote/lists.html @@ -607,7 +607,8 @@ jsgameid(); }else{ - alert('请求失败'); + var tip_msg = res.info ? res.info : '操作失败'; + layer.msg(tip_msg); } }); }); From 8bd7ae4fdba8421e7503d2ea4af35603e4feff7b Mon Sep 17 00:00:00 2001 From: chenzhi Date: Sat, 21 Dec 2019 17:29:52 +0800 Subject: [PATCH 14/15] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A1=86=E6=9E=B6?= =?UTF-8?q?=E5=B1=82=E7=BA=A7=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Public/Admin/css/dropdown.css | 2 +- Public/Admin/css/style.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Public/Admin/css/dropdown.css b/Public/Admin/css/dropdown.css index 9c066c6e4..f8c911977 100644 --- a/Public/Admin/css/dropdown.css +++ b/Public/Admin/css/dropdown.css @@ -18,7 +18,7 @@ position: absolute; top: 100%; left: 0; - z-index: 1000; + z-index: 10; display: none; float: left; min-width: 160px; diff --git a/Public/Admin/css/style.css b/Public/Admin/css/style.css index 012a23c18..3771d1f4a 100644 --- a/Public/Admin/css/style.css +++ b/Public/Admin/css/style.css @@ -17,7 +17,7 @@ body{ position: fixed; top: 0; left: 0; - z-index: 1000; + z-index: 9999; width: 100%; /* height: 50px; line-height: 50px; */ From 42542ff6402c0c35784decefac3066f9127b9555 Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Sat, 21 Dec 2019 17:30:38 +0800 Subject: [PATCH 15/15] =?UTF-8?q?=E9=9D=9E=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=8A=A0=E5=AF=86=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Promote/ch_reg_list.html | 7 ++++++- Application/Admin/View/Promote/spend_list.html | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Application/Admin/View/Promote/ch_reg_list.html b/Application/Admin/View/Promote/ch_reg_list.html index 2c0d0a13c..cd71975eb 100644 --- a/Application/Admin/View/Promote/ch_reg_list.html +++ b/Application/Admin/View/Promote/ch_reg_list.html @@ -154,7 +154,12 @@ {$data.register_time|date='Y-m-d H:i:s',###} {$data.register_ip} - {:get_promote_parent_acc($data['promote_id'])} + + {:get_promote_parent_acc($data['promote_id'])} + + {:encryptStr(get_promote_parent_acc($data['promote_id']))} + + {:get_business_affairs_account($data['ba_id'])} diff --git a/Application/Admin/View/Promote/spend_list.html b/Application/Admin/View/Promote/spend_list.html index 4c794ea9f..359ca6d5a 100644 --- a/Application/Admin/View/Promote/spend_list.html +++ b/Application/Admin/View/Promote/spend_list.html @@ -186,7 +186,13 @@ {$data.promote_account|encryptStr}
- {:get_promote_parent_acc($data['promote_id'])} + + + {:get_promote_parent_acc($data['promote_id'])} + + {:encryptStr(get_promote_parent_acc($data['promote_id']))} + + {$data.user_account}