master
ELF 5 years ago
parent ef76ed66e6
commit 2ac122630c

@ -55,13 +55,14 @@ class GameController extends BaseController
$gameIds = $promoteService->getVisibleGameIds($promote); $gameIds = $promoteService->getVisibleGameIds($promote);
if ($baseGameId > 0) { if ($baseGameId > 0) {
$baseGame = M('base_game', 'tab_')->where(['id' => $baseGameId])->find(); $baseGame = M('base_game', 'tab_')->where(['id' => $baseGameId])->find();
$gameIds = []; $searchGameIds = [];
if ($baseGame['android_game_id'] > 0) { if ($baseGame['android_game_id'] > 0) {
$gameIds[] = $baseGame['android_game_id']; $searchGameIds[] = $baseGame['android_game_id'];
} }
if ($baseGame['ios_game_id'] > 0) { if ($baseGame['ios_game_id'] > 0) {
$gameIds[] = $baseGame['ios_game_id']; $searchGameIds[] = $baseGame['ios_game_id'];
} }
$gameIds = array_intersect($searchGameIds, $gameIds);
} }
$conditions = []; $conditions = [];

@ -468,7 +468,15 @@
if (promoteIds.length == 0) { if (promoteIds.length == 0) {
return layer.msg('请选择要添加该游戏的人员') 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', dataType: 'json',
success: function(response) { success: function(response) {
layer.msg(response.msg, {time: 1000}, function() { layer.msg(response.msg, {time: 1000}, function() {
window.location.href = window.location.href window.location.href = window.location.href
}) })
} }
}) })

Loading…
Cancel
Save