修改用户列表重复搜索区服不存在bug

master
chenzhi 5 years ago
parent 46aa23514e
commit c251867ba6

@ -119,7 +119,7 @@
<select id="game_name" name="game_name" class="select_gallery" > <select id="game_name" name="game_name" class="select_gallery" >
<option value="">游戏名称</option> <option value="">游戏名称</option>
<volist name=":getAllGame()" id="vo"> <volist name=":getAllGame()" id="vo">
<option value="{$vo.game_name}" <?php echo $vo.relation_game_name == I('game_name') ? 'selected':''; ?> >{$vo.game_name}</option> <option value="{$vo.game_name}" <if condition="$vo.game_name eq I('game_name')">selected</if> >{$vo.game_name}</option>
</volist> </volist>
</select> </select>
</div> </div>
@ -475,12 +475,14 @@ $(function(){
}) })
var game_server = "{:I('server_name')}"; var game_server = "{:I('server_name')}";
$("#game_type").change(function(){ $("#game_type").change(function(){
console.log({sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()})
$.ajax({ $.ajax({
url:"{:U('Ajax/getGmeServer')}", url:"{:U('Ajax/getGmeServer')}",
type:"post", type:"post",
data:{sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()}, data:{sdk_version:$("#game_type option:selected").val(), game_name:$("#game_name option:selected").val()},
dataType:'json', dataType:'json',
success:function(data){ success:function(data){
console.log(data)
str = "<option value=''>请选择区服</option>"; str = "<option value=''>请选择区服</option>";
for (var i in data){ 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_name+"' "+(game_server && data[i].server_name == game_server?'selected':'')+">"+data[i].server_name+"</option>"

Loading…
Cancel
Save