修改bug

master
ELF 5 years ago
parent 89b243930d
commit 71feea26fb

@ -1757,7 +1757,7 @@ class ApplyController extends BaseController
$gameId = I('game_id', 0); $gameId = I('game_id', 0);
$promote = $this->getLoginPromote(); $promote = $this->getLoginPromote();
$apply = M('apply', 'tab_')->where(['promote_id' => $promote['id'], 'game_id' => $gameId])->find(); $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) { if ($apply == null) {
$this->ajaxReturn([ $this->ajaxReturn([
'status' => 0, 'status' => 0,
@ -1794,7 +1794,7 @@ class ApplyController extends BaseController
$gameId = I('game_id', 0); $gameId = I('game_id', 0);
$promote = $this->getLoginPromote(); $promote = $this->getLoginPromote();
$apply = M('apply', 'tab_')->where(['promote_id' => $promote['id'], 'game_id' => $gameId])->find(); $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) { if ($apply == null) {
$this->ajaxReturn([ $this->ajaxReturn([
'status' => 1, 'status' => 1,

@ -35,6 +35,8 @@ class DownloadController extends Controller {
$map = []; $map = [];
$map['status'] = 1; $map['status'] = 1;
$map['enable_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']; $columns = ['game_id', 'promote_id', 'promote_account', 'pack_url', 'plist_url', 'status', 'enable_status'];
$apply = M('apply','tab_')->field($columns)->where($map)->find(); $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(); $game = M('game','tab_')->field(['id', 'game_name', 'sdk_version'])->where(['id' => $apply['game_id']])->find();

@ -160,6 +160,7 @@ class HomeController extends Controller
$map = ['id' => intval($data['game_id'])]; $map = ['id' => intval($data['game_id'])];
$game = M('game', 'tab_')->field($columns)->where($map)->find(); $game = M('game', 'tab_')->field($columns)->where($map)->find();
if ($game['sdk_version'] == 1 && $isIOS) { if ($game['sdk_version'] == 1 && $isIOS) {
$map['relation_game_id'] = $game['relation_game_id']; $map['relation_game_id'] = $game['relation_game_id'];
$map['sdk_version'] = 2; $map['sdk_version'] = 2;
@ -170,8 +171,8 @@ class HomeController extends Controller
$game = M('game', 'tab_')->field($columns)->where($map)->find(); $game = M('game', 'tab_')->field($columns)->where($map)->find();
} }
$apply = M('apply', 'tab_')->field(['game_id', 'enable_status', 'promote_id']) $apply = M('apply', 'tab_')->field(['game_id', 'enable_status', 'promote_id'])
->where(['promote_id' => $data['promote_id'], 'game_id' => $game['id']]) ->where(['promote_id' => $data['promote_id'], 'game_id' => $game['id']])
->find(); ->find();
$game['icon'] = get_cover($game['icon'], 'path'); $game['icon'] = get_cover($game['icon'], 'path');
$imageIds = explode(',', $game['flooring_page_imgs']) ?? []; $imageIds = explode(',', $game['flooring_page_imgs']) ?? [];
@ -183,7 +184,7 @@ class HomeController extends Controller
$downloadUrl = ''; $downloadUrl = '';
if ($isIOS13) { 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'], '.'); $downloadUrl = 'itms-services://?action=download-manifest&url=' . Request::getHost() . ltrim($gameSource['org_plist_url'], '.');
} else { } else {
$applyService = new ApplyService(); $applyService = new ApplyService();

Loading…
Cancel
Save