diff --git a/Application/Admin/Controller/AutoPackController.class.php b/Application/Admin/Controller/AutoPackController.class.php index 0989fff49..49738d9ca 100644 --- a/Application/Admin/Controller/AutoPackController.class.php +++ b/Application/Admin/Controller/AutoPackController.class.php @@ -316,7 +316,7 @@ class AutoPackController extends Think $applyIds = array_column($applys, 'id'); $gameIds = array_unique(array_column($applys, 'game_id')); - $games = M('game', 'tab_')->field(['id', 'game_appid'])->where(['id' => ['in', $gameIds]])->select(); + $games = M('game', 'tab_')->field(['id', 'game_appid', 'game_name', 'icon', 'sdk_version'])->where(['id' => ['in', $gameIds]])->select(); $games = index_by_column('id', $games); $launchCountList = $launchModel->field(['apply_id', 'count(*) count'])->where(['apply_id' => ['in', $applyIds]])->group('apply_id')->select(); diff --git a/Application/Base/Service/GameSourceService.class.php b/Application/Base/Service/GameSourceService.class.php index 1a4f94185..8f844413d 100644 --- a/Application/Base/Service/GameSourceService.class.php +++ b/Application/Base/Service/GameSourceService.class.php @@ -165,12 +165,12 @@ class GameSourceService { $orgPlistUrl = ''; if ($game['sdk_version'] == 2) { $params = [ - 'domain' => '', 'packageName' => $gameSource['bao_name'], 'gameId' => $game['id'], + 'gameName' => $game['game_name'], 'promoteId' => 0, 'packageUrl' => $fileUrl, - 'gameIcon' => '', + 'gameIcon' => get_cover($game['icon'], 'path'), 'type' => 'pack' ]; $result = $this->createPlist($params); @@ -258,12 +258,12 @@ class GameSourceService { $plistUrl = ''; if ($apply['sdk_version'] == 2) { $params = [ - 'domain' => '', 'packageName' => $gameSource['bao_name'], 'gameId' => $game['id'], + 'gameName' => $game['game_name'], 'promoteId' => $apply['promote_id'], 'packageUrl' => $packageUrl, - 'gameIcon' => '', + 'gameIcon' => get_cover($game['icon'], 'path'), 'type' => 'pack' ]; $result = $this->createPlist($params); @@ -311,8 +311,8 @@ class GameSourceService { //生成游戏渠道plist文件 public function createPlist($params) { - $domain = $params['domain'] ?? ''; $packageName = $params['packageName'] ?? ''; + $gameName = $params['gameName'] ?? ''; $gameId = $params['gameId'] ?? 0; $promoteId = $params['promoteId'] ?? 0; $packageUrl = $params['packageUrl'] ?? ''; @@ -344,14 +344,14 @@ class GameSourceService { if (preg_match("/http/", $packageUrl)) { $element->nodeValue = $packageUrl; } else { - $element->nodeValue = "https://" . $domain . ltrim($packageUrl, '.'); + $element->nodeValue = C('DOMAIN_DOWNLOAD') . ltrim($packageUrl, '.'); } break; case 'icon': if (preg_match("/http/", $gameIcon)) { $element->nodeValue = $gameIcon; } else { - $element->nodeValue = "https://" . $domain . $gameIcon; + $element->nodeValue = C('DOMAIN_OFFICIAL_PC') . ltrim($gameIcon, '.'); } break; case 'com.dell': @@ -361,7 +361,7 @@ class GameSourceService { $element->nodeValue = false; break; case 'mchdemo': - $element->nodeValue = false; + $element->nodeValue = $gameName; break; } } diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 327f99517..cfe5abec6 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -67,7 +67,7 @@ class DownloadController extends Controller { } else if (Request::isIOS()) { $plistUrl = substr($packageUrl, 1, strlen($packageUrl)); header("HTTP/1.1 303 See Other"); - header("Location: "."itms-services://?action=download-manifest&url=" . "https://" . Request::getHost() . "/" . $plistUrl); + header("Location: "."itms-services://?action=download-manifest&url=" . Request::getHost() . "/" . $plistUrl); } else { $this->gotoPkgUrl($packageUrl); } diff --git a/package.sh b/package.sh index a69ed99b8..2fd8209cf 100644 --- a/package.sh +++ b/package.sh @@ -1 +1 @@ -sh -c "cd /var/www/platform/;php cli.php AutoPack/package;" \ No newline at end of file +sh -c "source /etc/profile;cd /var/www/platform/;php cli.php AutoPack/package;" \ No newline at end of file