master
jbrazz 5 years ago
parent a3d0c81d4b
commit 459b722c1c

@ -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]);
}
}

@ -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);

@ -204,7 +204,13 @@
<span class="notice-text">此处显示该玩家的金币提现记录</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">角色信息</td>
<td class="r">
<span id="role" class="table_click table_btn player_table_btn"><span class="table_click_text">点击查看</span></span>
<span class="notice-text">点击查看该用户游戏角色信息</span>
</td>
</tr>
<tr>
<td class="l noticeinfo">游戏登录记录</td>
<td class="r">
@ -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({

@ -0,0 +1,76 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>游戏角色列表|----软件管理平台</title>
<link href="http://admin.vlcms.com/Public/icon.ico" type="image/x-icon" rel="shortcut icon">
<link rel="stylesheet" type="text/css" href="__CSS__/base.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/common.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/module.css">
<link rel="stylesheet" type="text/css" href="__CSS__/style.css" media="all">
<link rel="stylesheet" type="text/css" href="__CSS__/default_color.css" media="all">
<script type="text/javascript" src="__STATIC__/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="__JS__/jquery.mousewheel.js"></script>
</head>
<style>
html{width:100%;min-width: auto;}
body {
padding: 0px;
}
</style>
<body>
<div id="main" class="main" style="min-height: 342px;width: 97%;">
<!-- 数据列表 -->
<div class="data_list box_mt">
<div class="" s>
<table>
<!-- 表头 -->
<thead>
<tr>
<th>玩家账号</th>
<th>游戏名称</th>
<th>游戏区服</th>
<th>角色ID</th>
<th>角色名</th>
<th>游戏等级</th>
<th>所属推广员</th>
<th>最后登陆时间</th>
<th>最后登陆IP</th>
</tr>
</thead>
<!-- 列表 -->
<tbody>
<volist name="list" id="data">
<tr>
<td>{$data.user_account}</td>
<td>{$data.game_name}</td>
<td>{$data.server_name}</td>
<td>{$data.role_id}</td>
<td>{$data.role_name}</td>
<td>{$data.role_level}</td>
<td>{$data.promote_account}</td>
<td>{$data.play_time|date='Y-m-d H:i:s',###}</td>
<td>{$data.play_ip}</td>
</tr>
</volist>
<!-- <tr class="data_summary">
<td>汇总</td>
<td colspan="8">
当页提现:{:null_to_0(array_sum(array_column($list_data,'coin')))}
今日提现:{$ttotal|default='0.00'}
累计提现:{$total|default='0.00'}
累计手续费:{$poundage|default='0.00'}
</td>
</tr> -->
</tbody>
</table>
</div>
</div>
<div class="page">
{$_page}
</div>
</div>
</body>
</html>

@ -113,11 +113,18 @@
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_id" name="game_id" class="select_gallery" >
<select id="game_type" name="game_type" class="select_gallery" >
<option value="">设备类型</option>
<option value="1">安卓</option>
<option value="2">苹果</option>
</select>
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_name" name="game_name" class="select_gallery" >
<option value="">游戏名称</option>
<volist name=":get_game_list()" id="vo">
<!-- <volist name=":get_game_list(null, $_GET['game_type'])" id="vo">
<option game-id="{$vo.id}" value="{$vo.id}">{$vo.game_name}</option>
</volist>
</volist> -->
</select>
</div>
<div class="input-list search_item input-list-gamenoticestatus">
@ -148,6 +155,10 @@
<!-- <div class="input-list">
<a class="sch-btn" href="{:U('Export/expUser',array_merge(['id'=>3],I('get.')))}">导出</a>
</div> -->
<div class="fl button_list">
<a target-form="ids" onclick="shenhe(0)"><span class="button_icon button_icon5 "></span>批量锁定</a>
<a id="dtnn" target-form="ids" onclick="shenhe(1)"><span class="button_icon button_icon9 "></span>批量开启</a>
</div>
</div>
</div>
@ -159,6 +170,9 @@
<!-- 表头 -->
<thead>
<tr>
<th class="" style="width: 50px;">
<input class="check-all" type="checkbox">
</th>
<th>账号ID</th>
<if condition="I('type') eq 2">
<th>第三方来源</th>
@ -211,6 +225,7 @@
<else/>
<volist name="list_data" id="data">
<tr>
<td ><input class="ids" type="checkbox" value="{$data.id}" name="ids[]"></td>
<td >{$data.id}</td>
<if condition="I('type') eq 2">
<td >{:get_registertype($data['register_type'])}</td>
@ -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 = '<option value="">游戏名称</option>';
// $.each(response.data, function(index, item){
// console.log(item.id);
// str += '<option value="'+item.id+' '+(promote_id && item.id == promote_id?'selected':'')+'">'+item.nickname+'</option>';
// });
data = response.data;
for (var i in data){
str += "<option value='"+data[i].relation_game_name+"' "+(game_name && data[i].relation_game_name == game_name?'selected':'')+">"+data[i].relation_game_name+"</option>"
}
$("#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()
}
});
}

@ -84,7 +84,7 @@
<empty name='show_status'>
<div class="input-list input-list-parent search_label_rehab">
<select id="parent_id" name="parent_id" class="select_gallery" >
<option value="">上线推广员</option>
<option value="">会长信息</option>
<volist name=":get_all_toppromote()" id="vo">
<option parent-id="{$vo.id}" value="{$vo.id}">{$vo.account}</option>
</volist>

@ -55,6 +55,9 @@
<div class="input-list">
<input type="text" name="user_account" class="" value="{:I('user_account')}" placeholder="玩家账号">&nbsp;&nbsp;&nbsp;
</div>
<div class="input-list">
<input type="text" name="role_name" class="" value="{:I('role_name')}" placeholder="角色名称">&nbsp;&nbsp;&nbsp;
</div>
<div class="input-list input-list-game search_label_rehab">
<select id="game_id" name="game_name" class="select_gallery" >
<option value="">游戏名称</option>

@ -868,6 +868,8 @@ function is_check_account($account){
}
if($sdk_type==2){
$map['sdk_version']=1;
} else if ($sdk_type == 3) {
$map['sdk_version']=2;
}
$lists = $game->field('id,game_name,sdk_version,relation_game_name,icon,relation_game_id,game_status,display_site,dow_num')->where($map)->select();
if(empty($lists)){return false;}

@ -88,8 +88,8 @@ class MemberModel extends Model{
'last_login_time' => $user['last_login_time'],
);
session('user_auth', $auth);
session('user_auth_sign', data_auth_sign($auth));
session(['name'=>'user_auth', 'expire'=>60*60], $auth);
session(['name'=>'user_auth_sign', 'expire'=>60*60], data_auth_sign($auth));
}

Loading…
Cancel
Save