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