优化登陆记录区服名称为区服id

master
chenzhi 5 years ago
parent 5e08bda6c2
commit 3bf288fa41

@ -1140,9 +1140,9 @@ class MemberController extends ThinkController
$map['user_account'] = array('like', trim($_REQUEST['account']) . '%'); $map['user_account'] = array('like', trim($_REQUEST['account']) . '%');
unset($_REQUEST['account']); unset($_REQUEST['account']);
} }
if (isset($_REQUEST['server_name'])) { if (isset($_REQUEST['server_id'])) {
$map['server_name'] = $_REQUEST['server_name']; $map['server_id'] = $_REQUEST['server_id'];
unset($_REQUEST['server_name']); unset($_REQUEST['server_id']);
} }
// $promoteRoot = getPowerPromoteIds(); // $promoteRoot = getPowerPromoteIds();

@ -83,7 +83,7 @@
</select> </select>
</div> </div>
<div class="input-list input-list-server search_label_rehab"> <div class="input-list input-list-server search_label_rehab">
<select id="server_name" name="server_name" class="select_gallery" style="width:120px;"> <select id="server_id" name="server_id" class="select_gallery" style="width:120px;">
<option value="">区服名称</option> <option value="">区服名称</option>
</select> </select>
</div> </div>
@ -281,7 +281,7 @@
}) })
}); });
var game_server = "{:I('server_name')}"; var game_server = "{:I('server_id')}";
$("#game_type").change(function(){ $("#game_type").change(function(){
$.ajax({ $.ajax({
url:"{:U('Ajax/getGmeServer')}", url:"{:U('Ajax/getGmeServer')}",
@ -291,11 +291,11 @@
success:function(data){ success:function(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_id+"' "+(game_server && data[i].server_id == game_server?'selected':'')+">"+data[i].server_name+"</option>"
} }
$("#server_name").empty(); $("#server_id").empty();
$("#server_name").append(str); $("#server_id").append(str);
$("#server_name").select2(); $("#server_id").select2();
} }
}) })
}); });

Loading…
Cancel
Save