diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index afde5599c..8f064b6a8 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -788,13 +788,20 @@ class MemberController extends ThinkController $map['server_name'] = $_REQUEST['server_name']; unset($_REQUEST['server_name']); } + if (isset($_REQUEST['promote_id'])) { + $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); $this->m_title = '登录记录'; + $this->assign('user_count',$count[0]['count']); $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Member/login_record', 'status' => 1])->find()); parent::lists("UserLoginRecord", $p, $extend['map']); diff --git a/Application/Admin/View/Member/login_record.html b/Application/Admin/View/Member/login_record.html index 93fd046e7..8de70f9e1 100644 --- a/Application/Admin/View/Member/login_record.html +++ b/Application/Admin/View/Member/login_record.html @@ -90,6 +90,21 @@
+
+ + - +
+
+ +
@@ -139,6 +154,10 @@ + + 合计 +   登录玩家:{$user_count}人 + @@ -178,6 +197,7 @@ highlight_subnav("{:U('Member/login_record')}"); $(function () { + Think.setValue('{$key}', "{$vo}"); $(".select_gallery").select2(); @@ -276,6 +296,28 @@ $("#game_type").change(); }); $("#game_name").change(); + + var promote_id = "{:I('promote_id')}"; + $("#promote_level").change(function(){ + $.ajax({ + url:"{:U('Ajax/getPromotersByLevel')}", + type:"get", + data:{level:$("#promote_level option:selected").val()}, + dataType:'json', + success:function(response){ + str = ''; + data = response.data; + for (var i in data){ + str += "" + } + $("#promote_id").empty(); + $("#promote_id").append(str); + $("#promote_id").select2(); + } + }) + }); + $("#promote_level").change(); + })