From 2ac122630c7bdac3632fc529d06aae684ba1c292 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 23 Mar 2020 17:00:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/GameController.class.php | 7 ++++--- Application/Home/View/default/Game/index.html | 12 ++++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Application/Home/Controller/GameController.class.php b/Application/Home/Controller/GameController.class.php index d837ba1e5..557d1a99c 100644 --- a/Application/Home/Controller/GameController.class.php +++ b/Application/Home/Controller/GameController.class.php @@ -55,13 +55,14 @@ class GameController extends BaseController $gameIds = $promoteService->getVisibleGameIds($promote); if ($baseGameId > 0) { $baseGame = M('base_game', 'tab_')->where(['id' => $baseGameId])->find(); - $gameIds = []; + $searchGameIds = []; if ($baseGame['android_game_id'] > 0) { - $gameIds[] = $baseGame['android_game_id']; + $searchGameIds[] = $baseGame['android_game_id']; } if ($baseGame['ios_game_id'] > 0) { - $gameIds[] = $baseGame['ios_game_id']; + $searchGameIds[] = $baseGame['ios_game_id']; } + $gameIds = array_intersect($searchGameIds, $gameIds); } $conditions = []; diff --git a/Application/Home/View/default/Game/index.html b/Application/Home/View/default/Game/index.html index 98ef747b6..be1bee641 100644 --- a/Application/Home/View/default/Game/index.html +++ b/Application/Home/View/default/Game/index.html @@ -468,7 +468,15 @@ if (promoteIds.length == 0) { return layer.msg('请选择要添加该游戏的人员') } - batchApplyGame(boxGameId, promoteIds) + batchApplyGame(boxGameId, promoteIds, function(response) { + if (response.status == 1) { + layer.msg(response.message, {time: 1000}, function() { + window.location.href = window.location.href + }) + } else { + layer.msg(response.message, {icon: 2, time: 1500}); + } + }) } }) @@ -613,7 +621,7 @@ dataType: 'json', success: function(response) { layer.msg(response.msg, {time: 1000}, function() { - window.location.href = window.location.href + window.location.href = window.location.href }) } })