From c451921b92725e3256049984133414bffadfaca7 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Tue, 10 Dec 2019 17:07:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=B7=BB=E5=8A=A0IOS?= =?UTF-8?q?=E6=89=93=E5=8C=85=E6=96=B9=E5=BC=8F=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/AutoPackController.class.php | 2 +- Application/Admin/Event/SourceEvent.class.php | 1 - Application/Admin/View/GameSource/add.html | 10 ++++++++++ Application/Admin/View/GameSource/edit.html | 11 ++++++++++- Application/Base/Service/GameSourceService.class.php | 5 +++-- Application/Home/Controller/HomeController.class.php | 6 +++--- 6 files changed, 27 insertions(+), 8 deletions(-) diff --git a/Application/Admin/Controller/AutoPackController.class.php b/Application/Admin/Controller/AutoPackController.class.php index 622619e61..e7da748cd 100644 --- a/Application/Admin/Controller/AutoPackController.class.php +++ b/Application/Admin/Controller/AutoPackController.class.php @@ -319,7 +319,7 @@ class AutoPackController extends Think $launchCountList = M('apply_launch', 'tab_')->field(['apply_id', 'count(*) count'])->where(['apply_id' => ['in', $applyIds]])->group('apply_id')->select(); $launchCountList = index_by_column('apply_id', $launchCountList); - $gameSources = M('game_source', 'tab_')->field(['id', 'file_name', 'source_version', 'file_type', 'bao_name', 'game_id'])->where(['game_id' => ['in', $gameIds]])->select(); + $gameSources = M('game_source', 'tab_')->field(['id', 'file_name', 'source_version', 'file_type', 'bao_name', 'game_id', 'is_new_sdk'])->where(['game_id' => ['in', $gameIds]])->select(); $gameSources = index_by_column('game_id', $gameSources); $gameSourceService = new GameSourceService(); diff --git a/Application/Admin/Event/SourceEvent.class.php b/Application/Admin/Event/SourceEvent.class.php index 8627141d9..64c9862bb 100644 --- a/Application/Admin/Event/SourceEvent.class.php +++ b/Application/Admin/Event/SourceEvent.class.php @@ -96,7 +96,6 @@ class SourceEvent extends Controller } } $data['source_version'] = $game_source['source_version'] + 1; - $version = ''; $packageName = ''; if ($data['file_type'] == 1) { diff --git a/Application/Admin/View/GameSource/add.html b/Application/Admin/View/GameSource/add.html index aeabae76f..1c9c6d83f 100644 --- a/Application/Admin/View/GameSource/add.html +++ b/Application/Admin/View/GameSource/add.html @@ -91,6 +91,14 @@ + + 是否新包 + + + + + + *上传原包 @@ -420,8 +428,10 @@ $("#game_id").change(function(){ $("#game_name").val($("#game_id option:selected").text()); $("#file_type").val(type); if (type == 2){ + $('#is-new-sdk').show(); $('#apply_bz').show(); }else{ + $('#is-new-sdk').hide(); $('#apply_bz').hide(); } //if(type == 1){$('.pack_name_class').show();}else{$('.pack_name_class').hide();} diff --git a/Application/Admin/View/GameSource/edit.html b/Application/Admin/View/GameSource/edit.html index 251a72ceb..9f4d450a8 100644 --- a/Application/Admin/View/GameSource/edit.html +++ b/Application/Admin/View/GameSource/edit.html @@ -78,7 +78,16 @@ - + + + 是否新包 + + + + + + + 上传原包 diff --git a/Application/Base/Service/GameSourceService.class.php b/Application/Base/Service/GameSourceService.class.php index 4b29cf111..595b13c3b 100644 --- a/Application/Base/Service/GameSourceService.class.php +++ b/Application/Base/Service/GameSourceService.class.php @@ -9,7 +9,7 @@ use GuzzleHttp\Client; class GameSourceService { - const IS_FIXED_IOS13 = true; + const IS_FIXED_IOS13 = false; const DEBUG = true; public function __construct() @@ -92,7 +92,8 @@ class GameSourceService { return false; } - if (self::IS_FIXED_IOS13 && $game['sdk_version'] == 2) { + $isNewSdk = (isset($gameSource['is_new_sdk']) && $gameSource['is_new_sdk'] == 1); + if ($isNewSdk && $game['sdk_version'] == 2) { $channelFolder = $this->getChannelConfigFolder($zip, $packData); return $this->packChannelFolder($zip, $channelFolder); } else { diff --git a/Application/Home/Controller/HomeController.class.php b/Application/Home/Controller/HomeController.class.php index 5a0a198ad..d10d69ff0 100644 --- a/Application/Home/Controller/HomeController.class.php +++ b/Application/Home/Controller/HomeController.class.php @@ -198,7 +198,7 @@ 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(); + $gameSource = M('GameSource', 'tab_')->field(['create_time', 'org_plist_url', 'is_new_sdk'])->where(array('game_id' => $game['id']))->find(); $imageIds = explode(',', $game['flooring_page_imgs']) ?? []; $imageUrls = []; @@ -208,9 +208,9 @@ class HomeController extends Controller $game['flooring_page_imgs'] = $imageUrls; $isNewIos = false; - /* if ($gameSource['create_time'] > strtotime(date('2019-11-27 00:00:00'))) { + if ($gameSource['is_new_sdk'] == 1) { $isNewIos = true; - } */ + } $downloadUrl = ''; if (!$isNewIos && $isIOS13) {