diff --git a/Application/Home/Controller/ApplyController.class.php b/Application/Home/Controller/ApplyController.class.php index 9a597e5d7..63f4a07f1 100644 --- a/Application/Home/Controller/ApplyController.class.php +++ b/Application/Home/Controller/ApplyController.class.php @@ -1757,7 +1757,7 @@ class ApplyController extends BaseController $gameId = I('game_id', 0); $promote = $this->getLoginPromote(); $apply = M('apply', 'tab_')->where(['promote_id' => $promote['id'], 'game_id' => $gameId])->find(); - $game = M('game', 'tab_')->field(['icon'])->where(['game_id' => $gameId])->find(); + $game = M('game', 'tab_')->field(['icon'])->where(['id' => $gameId])->find(); if ($apply == null) { $this->ajaxReturn([ 'status' => 0, @@ -1794,7 +1794,7 @@ class ApplyController extends BaseController $gameId = I('game_id', 0); $promote = $this->getLoginPromote(); $apply = M('apply', 'tab_')->where(['promote_id' => $promote['id'], 'game_id' => $gameId])->find(); - $game = M('game', 'tab_')->field(['icon'])->where(['game_id' => $gameId])->find(); + $game = M('game', 'tab_')->field(['icon'])->where(['id' => $gameId])->find(); if ($apply == null) { $this->ajaxReturn([ 'status' => 1, diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 74d178baa..dc69d5d83 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -35,10 +35,12 @@ class DownloadController extends Controller { $map = []; $map['status'] = 1; $map['enable_status'] = 1; + $map['game_id'] = $gameId; + $map['promote_id'] = $promoteId; $columns = ['game_id', 'promote_id', 'promote_account', 'pack_url', 'plist_url', 'status', 'enable_status']; $apply = M('apply','tab_')->field($columns)->where($map)->find(); $game = M('game','tab_')->field(['id', 'game_name', 'sdk_version'])->where(['id' => $apply['game_id']])->find(); - + if (Request::isMobile()) { if (!Request::isAndroid() && $game['sdk_version'] == 1) { $this->redirect("download/downloadError", ['message' => '请使用安卓浏览器下载']); diff --git a/Application/Home/Controller/HomeController.class.php b/Application/Home/Controller/HomeController.class.php index 4a5e0f735..2c0e2155b 100644 --- a/Application/Home/Controller/HomeController.class.php +++ b/Application/Home/Controller/HomeController.class.php @@ -160,6 +160,7 @@ class HomeController extends Controller $map = ['id' => intval($data['game_id'])]; $game = M('game', 'tab_')->field($columns)->where($map)->find(); + if ($game['sdk_version'] == 1 && $isIOS) { $map['relation_game_id'] = $game['relation_game_id']; $map['sdk_version'] = 2; @@ -170,8 +171,8 @@ class HomeController extends Controller $game = M('game', 'tab_')->field($columns)->where($map)->find(); } $apply = M('apply', 'tab_')->field(['game_id', 'enable_status', 'promote_id']) - ->where(['promote_id' => $data['promote_id'], 'game_id' => $game['id']]) - ->find(); + ->where(['promote_id' => $data['promote_id'], 'game_id' => $game['id']]) + ->find(); $game['icon'] = get_cover($game['icon'], 'path'); $imageIds = explode(',', $game['flooring_page_imgs']) ?? []; @@ -183,7 +184,7 @@ class HomeController extends Controller $downloadUrl = ''; if ($isIOS13) { - $gameSource = M('GameSource', 'tab_')->where(array('game_id' => $gameId))->getField('org_plist_url'); + $gameSource = M('GameSource', 'tab_')->where(array('game_id' => $game['id']))->getField('org_plist_url'); $downloadUrl = 'itms-services://?action=download-manifest&url=' . Request::getHost() . ltrim($gameSource['org_plist_url'], '.'); } else { $applyService = new ApplyService();