From 24d47089dd78f6addd6f157b67847a612b462d5f Mon Sep 17 00:00:00 2001 From: zhanglingsheng Date: Mon, 16 Dec 2019 19:20:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E9=A2=84=E5=85=85=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/AjaxController.class.php | 11 +++++++ Application/Admin/View/BehaviorLog/index.html | 33 ++++++++++++++++--- 2 files changed, 40 insertions(+), 4 deletions(-) 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')}",