From 9a2ec81bec5d346c0db2db033e9baffc65dff61b Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Wed, 27 Nov 2019 14:48:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/HomeController.class.php | 11 ++++++++++- Application/Home/View/default/Home/landingPage.html | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Application/Home/Controller/HomeController.class.php b/Application/Home/Controller/HomeController.class.php index 99ec2b916..fb0632022 100644 --- a/Application/Home/Controller/HomeController.class.php +++ b/Application/Home/Controller/HomeController.class.php @@ -181,10 +181,12 @@ class HomeController extends Controller $game = M('game', 'tab_')->field($columns)->where($map)->find(); if ($game['sdk_version'] == 1 && $isIOS) { + $map = []; $map['relation_game_id'] = $game['relation_game_id']; $map['sdk_version'] = 2; $game = M('game', 'tab_')->field($columns)->where($map)->find(); } elseif ($game['sdk_version'] == 2 && $isAndroid) { + $map = []; $map['relation_game_id'] = $game['relation_game_id']; $map['sdk_version'] = 1; $game = M('game', 'tab_')->field($columns)->where($map)->find(); @@ -194,6 +196,8 @@ class HomeController extends Controller ->find(); $game['icon'] = get_cover($game['icon'], 'path'); + $gameSource = M('GameSource', 'tab_')->field(['create_time', 'org_plist_url'])->where(array('game_id' => $game['id']))->find(); + $imageIds = explode(',', $game['flooring_page_imgs']) ?? []; $imageUrls = []; foreach ($imageIds as $imageId) { @@ -203,13 +207,18 @@ class HomeController extends Controller $downloadUrl = ''; if ($isIOS13) { - $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(); $downloadUrl = $applyService->getDownloadUrl($apply); } + $isNewIos = false; + if ($gameSource['create_time'] > strtotime(date('2019-11-27 00:00:00'))) { + $isNewIos = true; + } + + $this->assign('isNewIos', $isNewIos); $this->assign('downloadUrl', $downloadUrl); $this->assign('isIOS13', $isIOS13); $this->assign('isWechat', $isWechat); diff --git a/Application/Home/View/default/Home/landingPage.html b/Application/Home/View/default/Home/landingPage.html index abebc7b7d..1959107db 100644 --- a/Application/Home/View/default/Home/landingPage.html +++ b/Application/Home/View/default/Home/landingPage.html @@ -21,6 +21,7 @@ + @@ -49,7 +50,7 @@ $('.bn-rule').css('z-index','12') return } - if ($('input[name=isIOS13]').val() == 1) { + if ($('input[name=isNewIos]').val() == 1 && $('input[name=isIOS13]').val() == 1) { if (parseInt("{:I('get.status', 0)}") > 0) { location.href = "{:U('iosDown',array('gid'=>$apply['game_id'],'pid'=>$apply['promote_id'],'status'=>1))}" return