游戏充值 区服名称改区服id

master
chenzhi 5 years ago
parent 3bf288fa41
commit 0f7134c838

@ -43,9 +43,9 @@ class SpendController extends ThinkController
if (isset($_REQUEST['game_type']) && $_REQUEST['game_type']) {
$map['sdk_version'] = $_REQUEST['game_type'];
}
if (isset($_REQUEST['server_name'])) {
$map['server_name'] = $_REQUEST['server_name'];
unset($_REQUEST['server_name']);
if (isset($_REQUEST['server_id'])) {
$map['server_id'] = $_REQUEST['server_id'];
unset($_REQUEST['server_id']);
}
if (isset($_REQUEST['pay_order_number'])) {
$map['pay_order_number'] = array('like', trim($_REQUEST['pay_order_number']));

@ -76,7 +76,7 @@
</select>
</div>
<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>
</select>
</div>
@ -568,7 +568,7 @@
});
$("#promote_level").change();
var game_server = "{:I('server_name')}";
var game_server = "{:I('server_id')}";
$("#game_type").change(function(){
$.ajax({
url:"{:U('Ajax/getGmeServer')}",
@ -578,11 +578,11 @@
success:function(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_name").empty();
$("#server_name").append(str);
$("#server_name").select2();
$("#server_id").empty();
$("#server_id").append(str);
$("#server_id").select2();
}
})
});

Loading…
Cancel
Save