Merge branch 'dev' of 47.111.118.107:/srv/git/platform into dev

master
ELF 5 years ago
commit 2c24a9740b

@ -1,120 +1,112 @@
<?php
namespace Admin\Controller;
use User\Api\UserApi as UserApi;
/**
* 后台首页控制器
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
*/
class SpendController extends ThinkController {
const model_name = 'Spend';
public function lists(){
if(isset($_REQUEST['user_account'])){
$map['tab_spend.user_account']=array('like','%'.trim($_REQUEST['user_account']).'%');
unset($_REQUEST['user_account']);
}
if(isset($_REQUEST['spend_ip'])){
$map['tab_spend.spend_ip']=array('like','%'.trim($_REQUEST['spend_ip']).'%');
unset($_REQUEST['spend_ip']);
}
if(isset($_REQUEST['time-start'])&&isset($_REQUEST['time-end'])){
$map['tab_spend.pay_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'])){
$map['tab_spend.pay_time'] = ['GT',strtotime(I('time-start'))];
unset($_REQUEST['time-start']);
}elseif(isset($_REQUEST['time-end'])){
$map['tab_spend.pay_time'] = ['LT',strtotime(I('time-end'))+86399];
unset($_REQUEST['time-end']);
class SpendController extends ThinkController
{
const model_name = 'Spend';
public function lists()
{
$startDate = empty($_REQUEST['time-start']) ? date('Y-m-d', strtotime('-6 day', time())) : $_REQUEST['time-start'];
$endDate = empty($_REQUEST['time-end']) ? date('Y-m-d') : $_REQUEST['time-end'];
$startTime = strtotime($startDate);
$endTime = strtotime($endDate) + 86399;
$map['pay_time'] = array('BETWEEN', array($startTime, $endTime));
unset($_REQUEST['time-start']);
unset($_REQUEST['time-end']);
if (isset($_REQUEST['user_account'])) {
$map['user_account'] = array('like', trim($_REQUEST['user_account']));
unset($_REQUEST['user_account']);
}
if(isset($_REQUEST['start'])&&isset($_REQUEST['end'])){
$map['tab_spend.pay_time'] =array('BETWEEN',array(strtotime($_REQUEST['start']),strtotime($_REQUEST['end'])+24*60*60-1));
unset($_REQUEST['start']);unset($_REQUEST['end']);
}elseif(isset($_REQUEST['start'])){
$map['tab_spend.pay_time'] = ['GT',strtotime(I('start'))];
unset($_REQUEST['start']);
}elseif(isset($_REQUEST['end'])){
$map['tab_spend.pay_time'] = ['LT',strtotime(I('end'))+86399];
unset($_REQUEST['end']);
if (isset($_REQUEST['spend_ip'])) {
$map['spend_ip'] = array('like', trim($_REQUEST['spend_ip']) . '%');
unset($_REQUEST['spend_ip']);
}
if(isset($_REQUEST['game_name'])){
if($_REQUEST['game_name']=='全部'){
if (isset($_REQUEST['game_name'])) {
if ($_REQUEST['game_name'] == '全部') {
unset($_REQUEST['game_name']);
} else {
$map['game_id'] = ['in', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')];
unset($_REQUEST['game_name']);
}else{
$map['tab_spend.game_id']= ['in', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')];
unset($_REQUEST['game_name']);
}
}
if(isset($_REQUEST['server_name'])){
$map['tab_spend.server_name']=$_REQUEST['server_name'];
if (isset($_REQUEST['server_name'])) {
$map['server_name'] = $_REQUEST['server_name'];
unset($_REQUEST['server_name']);
}
if(isset($_REQUEST['pay_order_number'])){
$map['tab_spend.pay_order_number']=array('like','%'.trim($_REQUEST['pay_order_number']).'%');
unset($_REQUEST['pay_order_number']);
if (isset($_REQUEST['pay_order_number'])) {
$map['pay_order_number'] = array('like', trim($_REQUEST['pay_order_number']) . '%');
unset($_REQUEST['pay_order_number']);
}
if(isset($_REQUEST['pay_status'])){
$map['tab_spend.pay_status']=$_REQUEST['pay_status'];
if (isset($_REQUEST['pay_status'])) {
$map['pay_status'] = $_REQUEST['pay_status'];
unset($_REQUEST['pay_status']);
}
if(isset($_REQUEST['pay_way'])){
if($_REQUEST['pay_way']==2){
$map['tab_spend.pay_way']=['in','2,3,4'];
}else{
$map['tab_spend.pay_way']=$_REQUEST['pay_way'];
if (isset($_REQUEST['pay_way'])) {
if ($_REQUEST['pay_way'] == 2) {
$map['pay_way'] = ['in', '2,3,4'];
} else {
$map['pay_way'] = $_REQUEST['pay_way'];
}
unset($_REQUEST['pay_way']);
}
if(isset($_REQUEST['pay_game_status'])){
$map['tab_spend.pay_game_status']=$_REQUEST['pay_game_status'];
if (isset($_REQUEST['pay_game_status'])) {
$map['pay_game_status'] = $_REQUEST['pay_game_status'];
unset($_REQUEST['pay_game_status']);
}
if(isset($_REQUEST['promote_id'])) {
if ($_REQUEST['promote_id'] == 0) {
if (isset($_REQUEST['promote_id'])) {
$promoteId = intval($_REQUEST['promote_id']);
if ($promoteId == 0) {
$map['promote_id'] = 0;
} else {
$map['_complex'] = ['tp.chain'=>['like', "%/{$_REQUEST['promote_id']}/%"], 'tp.id'=>$_REQUEST['promote_id'], '_logic' => 'or'];
$promoteMap['chain'] = ['like', "%/$promoteId/%"];
$promoteIds = M('Promote', 'tab_')->where($promoteMap)->getField('id', true);
$promoteIds[] = $promoteId;
$map['promote_id'] = ['in', $promoteIds];
}
$tab_promote_join = "left join tab_promote as tp on tp.id = tab_spend.promote_id";
//unset($_REQUEST['promote_id']);
} else {
$tab_promote_join = false;
}
if($_REQUEST['data_order']!=''){
$data_order=reset(explode(',',$_REQUEST['data_order']));
$data_order_type=end(explode(',',$_REQUEST['data_order']));
$this->assign('userarpu_order',$data_order);
$this->assign('userarpu_order_type',$data_order_type);
$sort = $data_order==3?'desc':'asc';
$order = $data_order_type.' '.$sort;
if ($_REQUEST['data_order'] != '') {
$data_order = reset(explode(',', $_REQUEST['data_order']));
$data_order_type = end(explode(',', $_REQUEST['data_order']));
$this->assign('userarpu_order', $data_order);
$this->assign('userarpu_order_type', $data_order_type);
$sort = $data_order == 3 ? 'desc' : 'asc';
$order = $data_order_type . ' ' . $sort;
} else {
$order = ' pay_time desc ';
}
$map1=$map;
$map1['pay_status']=1;
$total=null_to_0(D(self::model_name)->where($map1)->join($tab_promote_join)->sum('pay_amount'));
$ttotal=null_to_0(D(self::model_name)->where('pay_time'.total(1))->where(array('pay_status'=>1))->join($tab_promote_join)->sum('pay_amount'));
$ytotal=null_to_0(D(self::model_name)->where('pay_time'.total(5))->where(array('pay_status'=>1))->join($tab_promote_join)->sum('pay_amount'));
$this->assign('total',$total);
$this->assign('ttotal',$ttotal);
$this->assign('ytotal',$ytotal);
if (intval(($endTime + 1) - $startTime) / (24 * 3600) <= 31) {
$map1 = $map;
$map1['pay_status'] = 1;
} else {
$map = '1 = 2';
$map1 = $map;
}
$total = null_to_0(D(self::model_name)->where($map1)->sum('pay_amount'));
$ttotal = null_to_0(D(self::model_name)->where('pay_time' . total(1))->where(array('pay_status' => 1))->sum('pay_amount'));
$ytotal = null_to_0(D(self::model_name)->where('pay_time' . total(5))->where(array('pay_status' => 1))->sum('pay_amount'));
$this->assign('total', $total);
$this->assign('ttotal', $ttotal);
$this->assign('ytotal', $ytotal);
$this->meta_title = $this->m_title = '游戏充值';
$this->assign('commonset',M('Kuaijieicon')->where(['url'=>'Spend/lists','status'=>1])->find());
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Spend/lists', 'status' => 1])->find());
/*parent::lists(self::model_name,$_GET["p"],$map);*/
$data = D(self::model_name)->lists($_GET["p"], $map, $order);
$this->assign('list_data',$data['data']);
$this->assign('_page',$data['page']);
$data = D(self::model_name)->lists($_GET["p"], $map, $order);
$this->assign('startDate', $startDate);
$this->assign('endDate', $endDate);
$this->assign('list_data', $data['data']);
$this->assign('_page', $data['page']);
$this->display();
}
}

@ -1 +1 @@
{"news":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":0},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":0},{"time":"16:00","count":0},{"time":"17:00","count":0},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}],"sum":{"news":0,"active":0,"player":0,"money":0},"active":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":0},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":0},{"time":"16:00","count":0},{"time":"17:00","count":0},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}],"player":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":0},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":0},{"time":"16:00","count":0},{"time":"17:00","count":0},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}],"money":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":0},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":0},{"time":"16:00","count":0},{"time":"17:00","count":0},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}]}
{"news":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":3},{"time":"11:00","count":1},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":2},{"time":"16:00","count":0},{"time":"17:00","count":0},{"time":"18:00","count":1},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}],"sum":{"news":7,"active":17,"player":3,"money":0.080000000000000002},"active":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":4},{"time":"10:00","count":6},{"time":"11:00","count":1},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":4},{"time":"16:00","count":0},{"time":"17:00","count":0},{"time":"18:00","count":2},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}],"player":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":0},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":1},{"time":"16:00","count":2},{"time":"17:00","count":0},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}],"money":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":0},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":"0.04"},{"time":"16:00","count":"0.04"},{"time":"17:00","count":0},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}]}

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

@ -48,11 +48,11 @@
<input type="text" name="pay_order_number" class="" value="{:I('pay_order_number')}" placeholder="支付订单号">
</div>
<div class="input-list">
<input type="text" id="time-start" name="time-start" class="" value="{:I('time-start')}"
<input type="text" readonly id="time-start" name="time-start" class="" value="{$startDate}"
placeholder="充值开始时间"/>
-
<div class="input-append date" id="datetimepicker" style="display:inline-block">
<input type="text" id="time-end" name="time-end" class="" value="{:I('time-end')}"
<input type="text" readonly id="time-end" name="time-end" class="" value="{$endDate}"
placeholder="充值结束时间"/>
<span class="add-on"><i class="icon-th"></i></span>
</div>
@ -67,19 +67,11 @@
<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(null, $_GET['game_type'])" id="vo">
<option game-id="{$vo.id}" value="{$vo.id}">{$vo.game_name}</option>
</volist> -->
<volist name=":get_game_list(null, $_GET['game_type'])" id="vo">-->
<option game-id="{$vo.id}" value="{$vo.id}">{$vo.game_name}</option>
</volist> &ndash;&gt;
</select>
</div>
<!-- <div class="input-list input-list-game search_label_rehab">
<select id="game_id" name="game_name" class="select_gallery" style="width:120px;">
<option value="">游戏名称</option>
<volist name=":get_game_list()" id="vo">
<option game-id="{$vo.id}" value="{$vo.game_name}">{$vo.game_name}</option>
</volist>
</select>
</div> -->
<div class="input-list input-list-server search_label_rehab">
<select id="server_name" name="server_name" class="select_gallery" style="width:120px;">
<option value="">区服名称</option>
@ -229,7 +221,7 @@
<td>汇总</td>
<td colspan="12">
<td colspan="99">
当页充值:{:null_to_0(array_sum(array_column(array_status2value('pay_status','',$list_data),'pay_amount')))}
今日充值:{$ttotal}
昨日充值:{$ytotal}
@ -280,6 +272,17 @@
$(function () {
//搜索功能
$("#search").click(function () {
var sdate = Date.parse($('#time-start').val()) / 1000;
var edate = Date.parse($('#time-end').val()) / 1000;
if (sdate > edate) {
layer.msg('开始时间必须小于等于结束时间');
return false;
}
if ((edate - sdate) > 2592000) {
layer.msg('时间间隔不能超过31天请重新选择日期');
return false;
}
var url = $(this).attr('url');
var query = $('.jssearch').find('input').serialize();
query += "&" + $('.jssearch').find('select').serialize();
@ -318,43 +321,36 @@
$('#time-start').datetimepicker({
format: 'yyyy-mm-dd',
language: "zh-CN",
showMeridian:true,
pickDate:true,
showMeridian:true,
pickDate:true,
minView: 2,
autoclose: true,
pickTime:true,
todayBtn:true,
pickTime:true,
todayBtn:true,
}).on('change',function(ev){
var val = new Date($.trim($(this).val())).getTime();
var end = new Date($.trim($('#time-end').val())).getTime();
if (val>end) {
layer.msg('开始时间大于结束时间!');$(this).val('');
}
return false;
});
$("#time-end").datetimepicker({
format:"yyyy-mm-dd",
language: "zh-CN",
showMeridian:true,
minView:2,
autoclose:true,
todayBtn:true,
}).on('change',function(ev){
var val = new Date($.trim($(this).val())).getTime();
var start = new Date($.trim($('#time-start').val())).getTime();
if (val<start) {
layer.msg('开始时间大于结束时间!');$(this).val('');
}
return false;
});
var val = new Date($.trim($(this).val())).getTime();
var end = new Date($.trim($('#time-end').val())).getTime();
if (val>end) {
layer.msg('开始时间大于结束时间!');$(this).val('');
}
return false;
});
$("#time-end").datetimepicker({
format:"yyyy-mm-dd",
language: "zh-CN",
showMeridian:true,
minView:2,
autoclose:true,
todayBtn:true,
}).on('change',function(ev){
var val = new Date($.trim($(this).val())).getTime();
var start = new Date($.trim($('#time-start').val())).getTime();
if (val<start) {
layer.msg('开始时间大于结束时间!');$(this).val('');
}
return false;
});
$(".budan").click(function () {
url = $(this).attr('href-hhh');
@ -478,127 +474,93 @@
})
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 = '<option value="">请选择推广员</option><option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</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].id+"' "+(promote_id && data[i].id == promote_id?'selected':'')+">"+data[i].nickname+"</option>"
}
$("#promote_id").empty();
$("#promote_id").append(str);
$("#promote_id").select2();
}
})
});
$("#promote_level").change();
// var game_id = "{:I('game_name')}";
// var game_server = "{:I('server_name')}";
// if(game_id){
// $.ajax({
// url:"{:U('Ajax/getSpendServer')}",
// type:"post",
// data:{game_id:game_id,type:2},
// dataType:'json',
// success:function(data){
// str = "<option value=''>请选择区服</option>";
// for (var i in data){
// str += "<option value='"+data[i].server_name+"' "+(game_server && data[i].server_name == game_server?'selected':'')+">"+data[i].server_name+"</option>"
// }
// $("#server_name").empty();
// $("#server_name").append(str);
// $("#server_name").select2();
// }
// })
// }
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_name").change();
}
})
});
$("#game_type").change();
var game_server = "{:I('server_name')}";
$("#game_name").change(function(){
$.ajax({
url:"{:U('Ajax/getGmeServer')}",
type:"post",
data:{sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()},
dataType:'json',
success:function(data){
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_name+"' "+(game_server && data[i].server_name == game_server?'selected':'')+">"+data[i].server_name+"</option>"
}
$("#server_name").empty();
$("#server_name").append(str);
$("#server_name").select2();
}
})
});
/**
* 初始化select2单选默认带搜索功能。
*/
//初始化页面加载
$(document).ready(function () {
//初始化select2单选
initSelect2WithSearch();
});
function initSelect2WithSearch() {
$("#sel_order").select2({
tags: true,
placeholder: '订单状态',
allowClear: false,
minimumResultsForSearch: Infinity, // 永久隐藏搜索框
});
}
function initSelect2WithSearch() {
$("#pay_game_status").select2({
tags: true,
placeholder: '游戏通知状态',
allowClear: false,
minimumResultsForSearch: Infinity, // 永久隐藏搜索框
});
}
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 = '<option value="">请选择推广员</option><option value="0"'+(promote_id && 0 == promote_id?'selected':'')+'>官方渠道</option>';
data = response.data;
for (var i in data){
str += "<option value='"+data[i].id+"' "+(promote_id && data[i].id == promote_id?'selected':'')+">"+data[i].nickname+"</option>"
}
$("#promote_id").empty();
$("#promote_id").append(str);
$("#promote_id").select2();
}
})
});
$("#promote_level").change();
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>';
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_name").change();
}
})
});
$("#game_type").change();
var game_server = "{:I('server_name')}";
$("#game_name").change(function(){
$.ajax({
url:"{:U('Ajax/getGmeServer')}",
type:"post",
data:{sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()},
dataType:'json',
success:function(data){
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_name+"' "+(game_server && data[i].server_name == game_server?'selected':'')+">"+data[i].server_name+"</option>"
}
$("#server_name").empty();
$("#server_name").append(str);
$("#server_name").select2();
}
})
});
/**
* 初始化select2单选默认带搜索功能。
*/
//初始化页面加载
$(document).ready(function () {
//初始化select2单选
initSelect2WithSearch();
});
function initSelect2WithSearch() {
$("#sel_order").select2({
tags: true,
placeholder: '订单状态',
allowClear: false,
minimumResultsForSearch: Infinity, // 永久隐藏搜索框
});
}
function initSelect2WithSearch() {
$("#pay_game_status").select2({
tags: true,
placeholder: '游戏通知状态',
allowClear: false,
minimumResultsForSearch: Infinity, // 永久隐藏搜索框
});
}
</script>
</block>

@ -372,6 +372,19 @@ class PromoteCoinController extends BaseController
$conditions['create_time'] = ['elt', strtotime($endTime. ' 23:59:59')];
}
}
if($sn) {
$conditions['sn'] = $sn;
}
if($account) {
$map1['account'] = ['like','%'.$account.'%'];
$promotesRs = M('promote','tab_')->field('id')->where($map1)->select();
$idArr = "";
foreach ($promotesRs as $key => $value) {
$idArr .= intval($value['id']).',';
}
$idArr1 = rtrim($idArr,',');
$conditions['target_id'] = ['in',$idArr1];
}
$query = M('promote_coin_transfer_log', 'tab_')->where($conditions)->order('create_time desc');
list($logs, $pagination, $count) = $this->paginate($query);

@ -60,8 +60,14 @@ class PromoteController extends BaseController
->select();
$game_list = M("game", "tab_")->field("id,game_name")->order("id desc")->select();
$gg_list = M("document", "sys_")->limit('0,5')->where("category_id=56 and status=1")->order("update_time desc")->select(); //游戏公告
$zx_list = M("document", "sys_")->limit('0,5')->where("category_id=51 and status=1")->order("update_time desc")->select(); //游戏咨询
$gg_list = M("document", "sys_")
->join("left join sys_document_article a on a.id=sys_document.id")
->limit('0,5')->where("category_id=56 and status=1 and a.id is not null")->order("update_time desc")->select(); //游戏公告
$zx_list = M("document", "sys_")
->join("left join sys_document_article a on a.id=sys_document.id")
->limit('0,5')->where("category_id=51 and status=1 and a.id is not null")->order("update_time desc")->select(); //游戏咨询
// echo M("document", "sys_")->_sql();die();
$promote_id = get_pid();
$field = 'id,game_name,server_name,user_account,nickname,promote_account,detail,create_time as update_time';
@ -70,7 +76,7 @@ class PromoteController extends BaseController
$logCount = M('protect_log', 'tab_')->where("promote_id = {$promote_id}")->count();
$readLogCount = M('protect_log_read', 'tab_')->where("promote_id = {$promote_id}")->count();
$gg_data = M("document", "sys_")->where("category_id=56 and status=1")->order("update_time desc")->select();
$gg_data = M("document", "sys_")->join("left join sys_document_article a on a.id=sys_document.id")->where("category_id=56 and status=1 and a.id is not null")->order("update_time desc")->select();
$gg_Count = count($gg_data);
$gg_data = implode(',', array_column($gg_data, 'id'));
@ -82,7 +88,7 @@ class PromoteController extends BaseController
// var_dump($gg_ReadDocument);die();
$zx_data = M("document", "sys_")->where("category_id=51 and status=1")->order("update_time desc")->select();
$zx_data = M("document", "sys_")->join("left join sys_document_article a on a.id=sys_document.id")->where("category_id=51 and status=1 and a.id is not null")->order("update_time desc")->select();
$zx_Count = count($zx_data);
$zx_data = implode(',', array_column($zx_data, 'id'));
$zx_where = "promote_id = {$promote_id} and category_id=51";
@ -528,7 +534,7 @@ class PromoteController extends BaseController
}
$page = $p ? $p : 1; //默认显示第一页数据
if ($type == 51) {
$data_list = M("document", "sys_")->where("category_id=51 and status=1")->order("update_time desc")->page($page, $row)->select(); //游戏咨询
$data_list = M("document", "sys_")->join("left join sys_document_article a on a.id=sys_document.id")->where("category_id=51 and status=1 and a.id is not null")->order("update_time desc")->page($page, $row)->select(); //游戏咨询
$count = M("document", "sys_")->where("category_id=51 and status=1")->count();
} elseif ($type == 50) {
$data_list = null;
@ -543,14 +549,15 @@ class PromoteController extends BaseController
$count = M("protect_log","tab_")->field($field)->count();
}*/ else {
$data_list = M("document", "sys_")->limit('0,50')->where("category_id=56 and status=1")->order("update_time desc")->page($page, $row)->select(); //游戏公告
$data_list = M("document", "sys_")->join("left join sys_document_article a on a.id=sys_document.id")->limit('0,50')->where("category_id=56 and status=1 and a.id is not null")->order("update_time desc")->page($page, $row)->select(); //游戏公告
$count = M("document", "sys_")->where("category_id=56 and status=1")->count();
}
$promote_id = get_pid();
$logCount = M('protect_log', 'tab_')->count();
$logCount = M('protect_log', 'tab_')->where("promote_id = {$promote_id}")->count();
$readLogCount = M('protect_log_read', 'tab_')->where("promote_id = {$promote_id}")->count();
$gg_data = M("document", "sys_")->where("category_id=56 and status=1")->order("update_time desc")->select();
$gg_data = M("document", "sys_")->join("left join sys_document_article a on a.id=sys_document.id")->where("category_id=56 and status=1 and a.id is not null")->order("update_time desc")->select();
// echo M("document", "sys_")->_sql();die();
$gg_Count = count($gg_data);
$gg_data = implode(',', array_column($gg_data, 'id'));
@ -562,7 +569,7 @@ class PromoteController extends BaseController
// var_dump($gg_ReadDocument);die();
$zx_data = M("document", "sys_")->where("category_id=51 and status=1")->order("update_time desc")->select();
$zx_data = M("document", "sys_")->join("left join sys_document_article a on a.id=sys_document.id")->where("category_id=51 and status=1 and a.id is not null")->order("update_time desc")->select();
$zx_Count = count($zx_data);
$zx_data = implode(',', array_column($zx_data, 'id'));
$zx_where = "promote_id = {$promote_id} and category_id=51";

@ -153,6 +153,21 @@ class QueryController extends BaseController
}
$list['user_account'] = substr($list['user_account'], 0, 2) . '******' . substr($list['user_account'], 8);
//订单隐藏算法
$orderLen = strlen($list['order_number']);
$strLen = 4;
$hideChar = '';
if($orderLen <=8) {
$strLen = 2;
}
for($i = 0;$i<$orderLen-$strLen*2;$i++) {
$hideChar .='*';
}
$list['order_number'] = substr($list['order_number'], 0, $strLen) . $hideChar . substr($list['order_number'], $orderLen-$strLen);
}
}

@ -59,7 +59,7 @@ class TestResourceController extends BaseController
$page = set_pagination($count,$row);
if($page) {$this->assign('_page', $page);}
$this->meta_title = '扶持号管理';
$this->meta_title = '测试号管理';
$this->assign('data',$data);
$this->display();

@ -19,7 +19,7 @@
<div class="inner clearfix">
<div class="backDiv">
<a class="backA" href="{:U('Promote/msg_list')}">返回</a>
<a class="backA" href="{:U('Promote/index')}">返回</a>
</div>
<div class="wrap">
<div class="trunk-article clearfix">

@ -30,7 +30,7 @@
<volist name="menu_list" id="menu">
<li>
<a href="{$menu.url}">
<span><img src="https://fileuc.37376.com/180912-80cfe5b6e68941f4bfe4cd697765abb4.png"></span>
<span><img src="{$menu.icon|get_cover='path'}"></span>
<span>{$menu.name}</span>
</a>
</li>

@ -20,7 +20,7 @@
</div>
<div class="trunk-content article">
<div class="trunk-search clearfix">
<form action="{:U('PromoteCoin/record', array('row'=>I('get.row')))}" method="post" class="clearfix">
<form action="{:U('PromoteCoin/transferLogs', array('row'=>I('get.row')))}" method="post" class="clearfix">
<div class="form-group fl normal_space">
<a href="{:U('PromoteCoin/shift')}" class="submit" style="line-height: 36px; text-align: center;">转账</a>
</div>

@ -36,6 +36,7 @@
</div>
<div class="subNavBox">
<a href="{:U('Promote/index')}" class="subNav <if condition='CONTROLLER_NAME eq Promote and ACTION_NAME eq index '>active</if>"> 后台首页 </a>
<?php if ($loginer['level'] < 4) :?>
<div class="subNav jssubNav"><i class="prev_icon icon_guanli"></i><span>管理中心</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<!-- <a href="{:U('Promote/base_info')}" class="<if condition='CONTROLLER_NAME eq Promote and ACTION_NAME eq base_info '>active</if> ">账户信息</a>-->
@ -49,6 +50,7 @@
<a href="{:U('Promote/children', ['promote_type' => 2])}" class="<if condition='CONTROLLER_NAME eq Promote and (ACTION_NAME eq children or ACTION_NAME eq addPromote or ACTION_NAME eq edit_chlid) '>active</if> ">推广员管理</a>
<?php endif;?>
</div>
<?php endif;?>
<?php
$isOpenQuery = true;
?>
@ -93,7 +95,7 @@
<div class="subNav jssubNav"><i class="prev_icon icon_fenbao"></i><span>安全管理</span><i class="arrow_icon"></i></div>
<div class="navContent jsnavContent">
<!-- <a href="{:U('Apply/app_index')}" class="<if condition='CONTROLLER_NAME eq Apply and ACTION_NAME eq app_index '>active</if> ">APP列表</a>-->
<a href="{:U('Download/listsIndex')}" class="<if condition='CONTROLLER_NAME eq Apply and (ACTION_NAME eq index or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">下载日志管理</a>
<a href="{:U('Download/listsIndex')}" class="<if condition='CONTROLLER_NAME eq Download and (ACTION_NAME eq listsIndex or ACTION_NAME eq listsIndex or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">下载日志管理</a>
<a href="{:U('Safe/modifyloginpassword')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq modifyloginpassword or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">修改登录密码</a>
<a href="{:U('Safe/setSafeIndex')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq setSafeIndex or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">设置安全密码</a>
<a href="{:U('Safe/modifyBaseInfo')}" class="<if condition='CONTROLLER_NAME eq Safe and (ACTION_NAME eq modifyBaseInfo or ACTION_NAME eq my_game or ACTION_NAME eq my_game_ch or ACTION_NAME eq child_game ) '>active</if> ">用户基本信息</a>
@ -102,7 +104,7 @@
<div class="navContent jsnavContent">
<a href="{:U('TestResource/index')}" class="<if condition='CONTROLLER_NAME eq TestResource and (ACTION_NAME eq index or ACTION_NAME eq add or ACTION_NAME eq apply ) '>active</if> ">测试资源申请</a>
<a href="{:U('TestResource/lists')}" class="<if condition='CONTROLLER_NAME eq TestResource and ACTION_NAME eq lists '>active</if> ">测试资源申请记录</a>
<a href="{:U('TestResource/supportNumberList')}" class="<if condition='CONTROLLER_NAME eq TestResource and (ACTION_NAME eq supportNumberList or ACTION_NAME eq freezeSupport or ACTION_NAME eq unfreezeSupport or ACTION_NAME eq rechangePassward ) '>active</if> ">扶持号管理</a>
<a href="{:U('TestResource/supportNumberList')}" class="<if condition='CONTROLLER_NAME eq TestResource and (ACTION_NAME eq supportNumberList or ACTION_NAME eq freezeSupport or ACTION_NAME eq unfreezeSupport or ACTION_NAME eq rechangePassward ) '>active</if> ">测试号管理</a>
<a href="{:U('TestResource/protectLogList')}" class="<if condition='CONTROLLER_NAME eq TestResource and ACTION_NAME eq protectLogList '>active</if> ">日志管理</a>
</div>
<!--<eq name="parent_id" value="0">

@ -19,11 +19,11 @@
<div class="trunk-title">
<div class="location">
<div class="location-container">当前位置:<span>测试资源管理></span><span>扶持号管理</span></div>
<div class="location-container">当前位置:<span>测试资源管理></span><span>测试号管理</span></div>
</div>
<img src="__IMG__/20180207/icon_chongzhi.png">
<span class="title_main">扶持号管理</span>
<span class="details">说明:扶持号管理</span>
<span class="title_main">测试号管理</span>
<span class="details">说明:测试号管理</span>
</div>

Loading…
Cancel
Save