From 23feb76e091886cae97708c46e641814bf398e10 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Tue, 1 Jun 2021 14:50:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=89=E5=AE=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Service/ApplyService.class.php | 6 ++++-- Application/Home/Controller/PackageController.class.php | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Application/Base/Service/ApplyService.class.php b/Application/Base/Service/ApplyService.class.php index 890d1ee0f..aab503d2b 100644 --- a/Application/Base/Service/ApplyService.class.php +++ b/Application/Base/Service/ApplyService.class.php @@ -87,11 +87,13 @@ class ApplyService { return $host . '/index.php?s=/Home/Package/download/code/' . $code; } - public function getLandingPageUrl($apply) + public function getLandingPageUrl($apply, $code = null) { $host = $this->getDownloadDomain(); $host = $host ? $host : Request::getHost(); - $code = $this->encodeApplyCode($apply, self::ENCRYPT_TYPE_LANDING_PAGE); + if (!$code) { + $code = $this->encodeApplyCode($apply, self::ENCRYPT_TYPE_DOWNLOAD); + } return $host . '/index.php?s=/Home/Home/landingPage/code/' . $code; } diff --git a/Application/Home/Controller/PackageController.class.php b/Application/Home/Controller/PackageController.class.php index 933e00014..587fb34fd 100644 --- a/Application/Home/Controller/PackageController.class.php +++ b/Application/Home/Controller/PackageController.class.php @@ -95,7 +95,7 @@ class PackageController extends Controller $packageUrl = $sdkVersion == 1 ? $apply['pack_url'] : $apply['plist_url']; $apply = M('apply', 'tab_')->where(['promote_id' => $promoteId, 'game_id' => $gameId])->find(); - $url = $applyService->getLandingPageUrl($apply); + $url = $applyService->getLandingPageUrl($apply, $code); M('game','tab_')->where(['id' => $game['id']])->setInc('dow_num'); @@ -110,7 +110,7 @@ class PackageController extends Controller M('user_action_log', 'tab_')->data($log)->add(); $downloadDomain = $applyService->getDownloadDomain(); - if (Request::isIOS() || Request::isIPadOS() || $force == 'ios') { + if ($sdkVersion == 2) { $packageDownloadLogService = new PackageDownloadLogService(); $packageDownloadLogService->add([ 'user_id' => 0,