diff --git a/Application/Admin/Controller/AjaxController.class.php b/Application/Admin/Controller/AjaxController.class.php index 4604dce71..4dbe626e8 100644 --- a/Application/Admin/Controller/AjaxController.class.php +++ b/Application/Admin/Controller/AjaxController.class.php @@ -96,6 +96,17 @@ class AjaxController extends ThinkController{ $this->AjaxReturn($data); } + public function getGameVersion($game_name="") + { + if ($game_name) { + $map['relation_game_name'] = $game_name; + }else { + $this->AjaxReturn([]); + } + $data = M('Game','tab_')->field('sdk_version')->where($map)->select(); + $this->AjaxReturn($data); + } + /** * 获取游戏折扣 * @param $game_id diff --git a/Application/Admin/View/BehaviorLog/index.html b/Application/Admin/View/BehaviorLog/index.html index 97b53ae2f..5ef1b52a3 100644 --- a/Application/Admin/View/BehaviorLog/index.html +++ b/Application/Admin/View/BehaviorLog/index.html @@ -68,8 +68,6 @@
@@ -217,7 +215,14 @@ layer.msg('时间间隔不能超过31天,请重新选择日期'); return false; } - + var game_name = $("#game_name").val(); + var sdk_version = $("#sdk_version").val(); + var server_name = $("#server_name").val(); + console.log(server_name) + if(game_name != '' && server_name == '') { + layer.msg('请选择区服'); + return false; + } var url = $(this).attr('url'); var query = $('.jssearch').find('input').serialize(); query += "&" + $('.jssearch').find('select').serialize(); @@ -430,7 +435,27 @@ }); $("#promote_level").change(); - var game_server = "{:I('server_name')}"; + + var game_server = "{:I('game_version')}"; + var sdk_version = "{:I('sdk_version')}"; + $("#game_name").change(function(){ + $.ajax({ + url:"{:U('Ajax/getGameVersion')}", + type:"post", + data:{game_name:$("#game_name option:selected").val()}, + dataType:'json', + success:function(data){ + str = ""; + for (var i in data){ + var version_name = data[i].sdk_version == "1" ? '安卓' : '苹果' + str += "" + } + $("#sdk_version").empty(); + $("#sdk_version").append(str); + $("#sdk_version").select2(); + } + }) + }); $("#sdk_version").change(function(){ $.ajax({ url:"{:U('Ajax/getGmeServer')}",