diff --git a/Application/Admin/Controller/AjaxController.class.php b/Application/Admin/Controller/AjaxController.class.php
index ad020d72d..f56cca3b4 100644
--- a/Application/Admin/Controller/AjaxController.class.php
+++ b/Application/Admin/Controller/AjaxController.class.php
@@ -132,4 +132,41 @@ class AjaxController extends ThinkController{
{
$this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>(new PromoteModel)->getPromotersByLevel($level)]);
}
+
+ public function getGameList($type=0, $sdk_type=0)
+ {
+ $game = M("game","tab_");
+
+ if(MODULE_NAME == 'Admin') {
+ $map['game_status'] = array('in','0,1');
+ } else {
+ $map['game_status'] = 1;
+ }
+
+ if(!empty($type)){
+ /*$map['developers'] = $type == 1? array('EQ',0):array('GT',0);*/
+ /* $map['game_status'] = $type == 1? 1:array('in','0,1'); */
+ switch($type) {
+ case 1:
+ $map['developers'] = array('EQ',0);
+ break;
+ case 2:
+ $map['developers'] = array('EGT',0);
+ break;
+ default:
+ $map['developers'] = array('GT',0);
+ }
+ }else{
+ $map['apply_status'] = 1;
+ $map['online_status'] = 1;
+
+ }
+ if (empty($sdk_type)) {
+ $lists = $game->field('id,game_name,sdk_version,relation_game_name,icon,relation_game_id,game_status,display_site,dow_num')->where($map)->group('relation_game_name')->order("id asc")->select();
+ } else {
+ $map['sdk_version'] = $sdk_type;
+ $lists = $game->field('id,game_name,sdk_version,relation_game_name,icon,relation_game_id,game_status,display_site,dow_num')->where($map)->order("id asc")->select();
+ }
+ $this->ajaxReturn(['code'=>1, 'msg'=>'获取成功', 'data'=>$lists]);
+ }
}
\ No newline at end of file
diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php
index 98f059052..9c0d4c44a 100644
--- a/Application/Admin/Controller/MemberController.class.php
+++ b/Application/Admin/Controller/MemberController.class.php
@@ -13,7 +13,6 @@ class MemberController extends ThinkController
*/
public function user_info($p = 0)
{
-
$hav = '';
if ($_REQUEST['promote_id'] != '') {
if($_REQUEST['promote_id']=='UC'){
@@ -109,6 +108,15 @@ class MemberController extends ThinkController
$map['lock_status'] = $_REQUEST['status'];
unset($_REQUEST['status']);
}
+
+ $game_map = "";
+ if (isset($_REQUEST['game_type'])) {
+ $game_map .= " and tab_user_play_info.sdk_version = {$_REQUEST['game_type']}";
+ }
+
+ if (isset($_REQUEST['game_name'])) {
+ $game_map .= " and tab_user_play_info.game_name like '{$_REQUEST['game_name']}%'";
+ }
if (isset($_REQUEST['viplevel'])) {
@@ -164,20 +172,20 @@ class MemberController extends ThinkController
$data = $usermodel->table('('.$sql1.') as a ')->field('a.id,a.device_number,a.age_status,a.account,a.balance,a.gold_coin,a.alipay,a.promote_id,a.register_type,a.promote_account,a.register_time,a.lock_status,a.register_way,a.register_type,a.register_ip,a.login_time,(a.deposit_total+IFNULL(sum(ss.pay_amount),0)) as recharge_total,check_status')
->join('left join tab_spend as ss on ss.user_id=a.id AND ss.pay_status = 1')
- ->join(isset($_REQUEST['game_id']) ? "tab_user_play as up on up.user_id = a.id and up.game_id = {$_REQUEST['game_id']} " : false)
+ ->join($game_map ? "tab_user_play_info on tab_user_play_info.user_id = a.id $game_map" : false)
->page($page, $row)
->having($havs)
->group('a.id')
->order($order)
->select();
-// var_dump($data);die;
+ //var_dump($usermodel->getLastSql());die;
//计数
$sql = M('user', 'tab_')->field('tab_user.id,(IFNULL(sum(b.pay_amount),0) + IFNULL(sum(ss.pay_amount),0)) AS recharge_total')
->join('left join tab_deposit AS b ON tab_user.id = b.user_id AND b.pay_status = 1')
->join('left join tab_spend as ss on ss.user_id=tab_user.id AND ss.pay_status = 1')
- ->join(isset($_REQUEST['game_id']) ? "tab_user_play as up on up.user_id = tab_user.id and up.game_id = {$_REQUEST['game_id']} " : false)
+ ->join($game_map ? "tab_user_play_info on tab_user_play_info.user_id = tab_user.id $game_map" : false)
->where($map)
->group('tab_user.id')
->where($hav)
@@ -336,7 +344,18 @@ class MemberController extends ThinkController
$this->display();
- }
+ }
+
+ public function role_list($p=1, $user_id='', $row=10)
+ {
+ $limit = ($p-1)*$row . ", $row";
+ $list = M("user_play_info", 'tab_')->where(['user_id'=>$user_id])->limit($limit)->order('play_time desc')->select();
+ $count = M("user_play_info", 'tab_')->where(['user_id'=>$user_id])->count();
+ $page = set_pagination($count,$row);
+ if($page) {$this->assign('_page', $page);}
+ $this->assign('list', $list);
+ $this->display();
+ }
/**
* 公用账户
@@ -717,7 +736,7 @@ class MemberController extends ThinkController
*/
public function lock_status($id, $lock_status)
{
- $map['id'] = $id;
+ $map['id'] = ['in', explode(',', $id)];
$res = M('user', 'tab_')->where($map)->setField(['lock_status' => $lock_status]);
if ($res) {
\Think\Log::actionLog('Member/lock_status','Member',$id);
diff --git a/Application/Admin/View/Member/edit.html b/Application/Admin/View/Member/edit.html
index 428a0dd92..5041ccaa3 100644
--- a/Application/Admin/View/Member/edit.html
+++ b/Application/Admin/View/Member/edit.html
@@ -204,7 +204,13 @@
此处显示该玩家的金币提现记录
-
+
+ 角色信息
+
+ 点击查看
+ 点击查看该用户游戏角色信息
+
+
游戏登录记录
@@ -297,6 +303,17 @@
content: [url + 'admin.php?s=/Member/chax/id/' + id + '' , 'no']
});
});
+
+ $("#role").click(function () {
+ layer.open({
+ type: 2,
+ title: "【游戏付费记录】列表",
+ shadeClose: true,
+ shade: 0.8,
+ area: ['70%', '80%'],
+ content: [url + 'admin.php?s=/Member/role_list/user_id/' + id + '' , 'no']
+ });
+ });
$('#tixian').click(function() {
layer.open({
diff --git a/Application/Admin/View/Member/role_list.html b/Application/Admin/View/Member/role_list.html
new file mode 100644
index 000000000..b53c169e1
--- /dev/null
+++ b/Application/Admin/View/Member/role_list.html
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+ 游戏角色列表|----软件管理平台
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 玩家账号
+ 游戏名称
+ 游戏区服
+ 角色ID
+ 角色名
+ 游戏等级
+ 所属推广员
+ 最后登陆时间
+ 最后登陆IP
+
+
+
+
+
+
+ {$data.user_account}
+ {$data.game_name}
+ {$data.server_name}
+ {$data.role_id}
+ {$data.role_name}
+ {$data.role_level}
+ {$data.promote_account}
+ {$data.play_time|date='Y-m-d H:i:s',###}
+ {$data.play_ip}
+
+
+
+
+
+
+
+
+ {$_page}
+
+
+
+
\ No newline at end of file
diff --git a/Application/Admin/View/Member/user_info.html b/Application/Admin/View/Member/user_info.html
index a44d286fe..a23ca712f 100644
--- a/Application/Admin/View/Member/user_info.html
+++ b/Application/Admin/View/Member/user_info.html
@@ -113,11 +113,18 @@
-
+
+ 设备类型
+ 安卓
+ 苹果
+
+
+
+
游戏名称
-
+
@@ -159,6 +170,9 @@
+
+
+
账号ID
第三方来源
@@ -211,6 +225,7 @@
+
{$data.id}
{:get_registertype($data['register_type'])}
@@ -423,22 +438,50 @@ $(function(){
});
$("#promote_level").change();
})
- function shenhe(){
+ var game_name = "{:I('game_name')}";
+ $("#game_type").change(function(){
+ $.ajax({
+ url:"{:U('Ajax/getGameList')}",
+ type:"get",
+ data:{sdk_type:$("#game_type option:selected").val()},
+ dataType:'json',
+ success:function(response){
+ str = '游戏名称 ';
+ // $.each(response.data, function(index, item){
+ // console.log(item.id);
+ // str += ''+item.nickname+' ';
+ // });
+ data = response.data;
+ for (var i in data){
+ str += ""+data[i].relation_game_name+" "
+ }
+ $("#game_name").empty();
+ $("#game_name").append(str);
+ $("#game_name").select2();
+ }
+ })
+ });
+ $("#game_type").change();
+
+ function shenhe(status){
var text = $("input:checkbox[name='ids[]']:checked").map(function(index,elem) {
return $(elem).val();
}).get().join(',');
+ console.log(text);
$.ajax({
cache: true,
type: "POST",
- url:"{:U('Member/age_check')}",
- data:{id:text},// 你的formid
+ url:"{:U('Member/lock_status')}",
+ data:{id:text, lock_status:status},// 你的formid
async: false,
error: function(data) {
layer.alert("服务器故障,请稍后重试!",{icon: 2});
},
success: function(data) {
- var obj = JSON.parse(data);
- layer.alert(obj.info,{icon:obj.status})
+ // var obj = JSON.parse(data);
+ // layer.alert(obj.info,{icon:obj.status})
+ layer.alert(data.info,{icon:data.status})
+ window.location.reload()
}
});
}
diff --git a/Application/Admin/View/Promote/lists.html b/Application/Admin/View/Promote/lists.html
index 533dacbdc..2694f3be2 100644
--- a/Application/Admin/View/Promote/lists.html
+++ b/Application/Admin/View/Promote/lists.html
@@ -84,7 +84,7 @@