diff --git a/Application/Admin/View/User/rolelist.html b/Application/Admin/View/User/rolelist.html index 464efb997..e565a8218 100644 --- a/Application/Admin/View/User/rolelist.html +++ b/Application/Admin/View/User/rolelist.html @@ -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 = ""; - for (var i in data){ - str += "" + 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 = ""; + for (var i in data){ + str += "" + } + $("#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(""); + } + }); $("#game_name").change(function(){