diff --git a/Application/Home/Controller/ApplyController.class.php b/Application/Home/Controller/ApplyController.class.php index 374ae8d03..18b02e1b3 100644 --- a/Application/Home/Controller/ApplyController.class.php +++ b/Application/Home/Controller/ApplyController.class.php @@ -1756,8 +1756,12 @@ class ApplyController extends BaseController public function getDownloadUrl() { $gameId = I('game_id', 0); + $promoteId = I('promote_id', 0); $promote = $this->getLoginPromote(); - $apply = M('apply', 'tab_')->where(['promote_id' => $promote['id'], 'game_id' => $gameId])->find(); + if ($promoteId == 0) { + $promoteId = $promote['id']; + } + $apply = M('apply', 'tab_')->where(['promote_id' => $promoteId, 'game_id' => $gameId])->find(); $game = M('game', 'tab_')->field(['icon'])->where(['id' => $gameId])->find(); if ($apply == null) { $this->ajaxReturn([ @@ -1793,8 +1797,12 @@ class ApplyController extends BaseController public function getLandingPageUrl() { $gameId = I('game_id', 0); + $promoteId = I('promote_id', 0); $promote = $this->getLoginPromote(); - $apply = M('apply', 'tab_')->where(['promote_id' => $promote['id'], 'game_id' => $gameId])->find(); + if ($promoteId == 0) { + $promoteId = $promote['id']; + } + $apply = M('apply', 'tab_')->where(['promote_id' => $promoteId, 'game_id' => $gameId])->find(); $game = M('game', 'tab_')->field(['icon'])->where(['id' => $gameId])->find(); if ($apply == null) { $this->ajaxReturn([ diff --git a/Application/Home/View/default/Apply/my_game.html b/Application/Home/View/default/Apply/my_game.html index 33dff8572..36764e55b 100644 --- a/Application/Home/View/default/Apply/my_game.html +++ b/Application/Home/View/default/Apply/my_game.html @@ -837,6 +837,7 @@ var linkTag = this var gameId = parseInt($(this).attr('data-game-id')) var type = $(this).attr('data-type') + var promoteId = "{:I('promote_id', 0)}"; var url = '' if (type == 'download') { url = "__URL__/getDownloadUrl" @@ -847,7 +848,7 @@ url: url, type: 'post', dataType: "json", - data: {game_id: gameId}, + data: {game_id: gameId, promote_id: promoteId}, success: function (response) { if (response.status == 1) { var qrcodeWidth = 200