[bug]角色查询 无游戏区服全显示问题

master
chenzhi 5 years ago
parent 3500cce032
commit 2d2f3abf75

@ -281,21 +281,28 @@ $(".select_gallery").select2();
$("#promote_level").change();
var game_id = "{:I('server_id')}";
$("#game_type").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_id+"' "+(game_id && data[i].server_id == game_id?'selected':'')+">"+data[i].server_name+"</option>"
var game_name = $("#game_name option:selected").val();
if(game_name != ''){
$.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_id+"' "+(game_id && data[i].server_id == game_id?'selected':'')+">"+data[i].server_name+"</option>"
}
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
})
})
}else{
$("#server_id").html("");
$("#server_id").append("<option value=''>请选择</option>");
}
});
$("#game_name").change(function(){

Loading…
Cancel
Save