修改分包

master
ELF 5 years ago
parent 09672d13b4
commit 679acf6cf1

@ -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();

@ -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;
}
}

@ -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);
}

@ -1 +1 @@
sh -c "cd /var/www/platform/;php cli.php AutoPack/package;"
sh -c "source /etc/profile;cd /var/www/platform/;php cli.php AutoPack/package;"
Loading…
Cancel
Save