Merge branch 'release-1.0.0' into dev

master
ELF 5 years ago
commit ad67717292

@ -7208,7 +7208,7 @@ class ExportController extends Controller
$map['_string'] .= " pay_time < {$timeend}";
}
$map['pay_status'] = 1;
$map['pay_game_status'] = 1;
if (!empty(I("game_id"))) {
$map['game_id'] = I("game_id");
}
@ -7224,6 +7224,7 @@ class ExportController extends Controller
$order = "pay_time DESC";
$xlsData = D('spend')->getSpendData($map,$field,$group,$order);
// dd(D("spend")->_sql());
foreach($xlsData as $key => $value) {
$xlsData[$key]['pay_way'] = getPayType($value['pay_way']);
}

@ -640,7 +640,7 @@ class PlatformController extends ThinkController
if (isset($_REQUEST['game_name'])) {
$map['s.game_name'] = $_REQUEST['game_name'];
if (isset($_REQUEST['server_id'])) {
$map['s.server_name'] = $_REQUEST['server_id'];
$map['s.server_id'] = $_REQUEST['server_id'];
unset($_REQUEST['server_id']);
}
}
@ -1002,6 +1002,21 @@ class PlatformController extends ThinkController
$this->display();
}
public function getSpendServer(){
if(isset($_REQUEST['game_name'])){
$game = M('Game','tab_')->field('id')->where(['game_name'=>$_REQUEST['game_name']])->find();
$game_id = $game['id'];
}
if(isset($_REQUEST['game_id'])){
$game_id = $_REQUEST['game_id'];
}
$map['game_id'] = $game_id;
$map['server_name'] = array('neq','');
$data = M('server','tab_')->field('server_name,server_id')->where($map)->group('server_name')->select();
$this->AjaxReturn($data);
}
public function uc_deposit($p = 1)
{
if (isset($_REQUEST['timestart']) && isset($_REQUEST['timeend'])) {

@ -262,13 +262,9 @@ class ServerNoticeController extends ThinkController {
$game_map = [];
if ($game_name) {
$game_map['relation_game_name'] = $game_name;
}else {
$this->AjaxReturn([]);
}
if ($sdk_version) {
$map['server_version'] = $game_map['sdk_version'] = $sdk_version;
}else {
$this->AjaxReturn([]);
}
$game = M("Game", 'tab_')->where($game_map)->getField('id', true);

@ -353,15 +353,17 @@
// endDate:date
})
$("#game_id").change(function(){
console.log($("#game_id option:selected").attr('game-id'));
$.ajax({
url:"{:U('Ajax/getSpendServer')}",
url:"{:U('getSpendServer')}",
type:"post",
data:{game_id:$("#game_id option:selected").attr('game-id')},
dataType:'json',
success:function(data){
console.log(data)
str = "<option value=''>请选择区服</option>";
for (var i in data){
str += "<option value='"+data[i].server_name+"'>"+data[i].server_name+"</option>"
str += "<option value='"+data[i].server_id+"'>"+data[i].server_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);
@ -370,18 +372,20 @@
}
})
});
var game_id = "{:I('game_name')}";
var game_name = "{:I('game_name')}";
var game_server = "{:I('server_id')}";
if(game_id){
if(game_name){
console.log({game_name:game_name})
$.ajax({
url:"{:U('Ajax/getSpendServer')}",
url:"{:U('getSpendServer')}",
type:"post",
data:{game_id:game_id,type:2},
data:{game_name:game_name},
dataType:'json',
success:function(data){
console.log(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>"
str += "<option value='"+data[i].server_id+"' "+(game_server && data[i].server_id == game_server?'selected':'')+">"+data[i].server_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);

Loading…
Cancel
Save