|
|
@ -165,12 +165,12 @@ class GameSourceService {
|
|
|
|
$orgPlistUrl = '';
|
|
|
|
$orgPlistUrl = '';
|
|
|
|
if ($game['sdk_version'] == 2) {
|
|
|
|
if ($game['sdk_version'] == 2) {
|
|
|
|
$params = [
|
|
|
|
$params = [
|
|
|
|
'domain' => '',
|
|
|
|
|
|
|
|
'packageName' => $gameSource['bao_name'],
|
|
|
|
'packageName' => $gameSource['bao_name'],
|
|
|
|
'gameId' => $game['id'],
|
|
|
|
'gameId' => $game['id'],
|
|
|
|
|
|
|
|
'gameName' => $game['game_name'],
|
|
|
|
'promoteId' => 0,
|
|
|
|
'promoteId' => 0,
|
|
|
|
'packageUrl' => $fileUrl,
|
|
|
|
'packageUrl' => $fileUrl,
|
|
|
|
'gameIcon' => '',
|
|
|
|
'gameIcon' => get_cover($game['icon'], 'path'),
|
|
|
|
'type' => 'pack'
|
|
|
|
'type' => 'pack'
|
|
|
|
];
|
|
|
|
];
|
|
|
|
$result = $this->createPlist($params);
|
|
|
|
$result = $this->createPlist($params);
|
|
|
@ -258,12 +258,12 @@ class GameSourceService {
|
|
|
|
$plistUrl = '';
|
|
|
|
$plistUrl = '';
|
|
|
|
if ($apply['sdk_version'] == 2) {
|
|
|
|
if ($apply['sdk_version'] == 2) {
|
|
|
|
$params = [
|
|
|
|
$params = [
|
|
|
|
'domain' => '',
|
|
|
|
|
|
|
|
'packageName' => $gameSource['bao_name'],
|
|
|
|
'packageName' => $gameSource['bao_name'],
|
|
|
|
'gameId' => $game['id'],
|
|
|
|
'gameId' => $game['id'],
|
|
|
|
|
|
|
|
'gameName' => $game['game_name'],
|
|
|
|
'promoteId' => $apply['promote_id'],
|
|
|
|
'promoteId' => $apply['promote_id'],
|
|
|
|
'packageUrl' => $packageUrl,
|
|
|
|
'packageUrl' => $packageUrl,
|
|
|
|
'gameIcon' => '',
|
|
|
|
'gameIcon' => get_cover($game['icon'], 'path'),
|
|
|
|
'type' => 'pack'
|
|
|
|
'type' => 'pack'
|
|
|
|
];
|
|
|
|
];
|
|
|
|
$result = $this->createPlist($params);
|
|
|
|
$result = $this->createPlist($params);
|
|
|
@ -311,8 +311,8 @@ class GameSourceService {
|
|
|
|
//生成游戏渠道plist文件
|
|
|
|
//生成游戏渠道plist文件
|
|
|
|
public function createPlist($params)
|
|
|
|
public function createPlist($params)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
$domain = $params['domain'] ?? '';
|
|
|
|
|
|
|
|
$packageName = $params['packageName'] ?? '';
|
|
|
|
$packageName = $params['packageName'] ?? '';
|
|
|
|
|
|
|
|
$gameName = $params['gameName'] ?? '';
|
|
|
|
$gameId = $params['gameId'] ?? 0;
|
|
|
|
$gameId = $params['gameId'] ?? 0;
|
|
|
|
$promoteId = $params['promoteId'] ?? 0;
|
|
|
|
$promoteId = $params['promoteId'] ?? 0;
|
|
|
|
$packageUrl = $params['packageUrl'] ?? '';
|
|
|
|
$packageUrl = $params['packageUrl'] ?? '';
|
|
|
@ -344,14 +344,14 @@ class GameSourceService {
|
|
|
|
if (preg_match("/http/", $packageUrl)) {
|
|
|
|
if (preg_match("/http/", $packageUrl)) {
|
|
|
|
$element->nodeValue = $packageUrl;
|
|
|
|
$element->nodeValue = $packageUrl;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$element->nodeValue = "https://" . $domain . ltrim($packageUrl, '.');
|
|
|
|
$element->nodeValue = C('DOMAIN_DOWNLOAD') . ltrim($packageUrl, '.');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 'icon':
|
|
|
|
case 'icon':
|
|
|
|
if (preg_match("/http/", $gameIcon)) {
|
|
|
|
if (preg_match("/http/", $gameIcon)) {
|
|
|
|
$element->nodeValue = $gameIcon;
|
|
|
|
$element->nodeValue = $gameIcon;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$element->nodeValue = "https://" . $domain . $gameIcon;
|
|
|
|
$element->nodeValue = C('DOMAIN_OFFICIAL_PC') . ltrim($gameIcon, '.');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 'com.dell':
|
|
|
|
case 'com.dell':
|
|
|
@ -361,7 +361,7 @@ class GameSourceService {
|
|
|
|
$element->nodeValue = false;
|
|
|
|
$element->nodeValue = false;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 'mchdemo':
|
|
|
|
case 'mchdemo':
|
|
|
|
$element->nodeValue = false;
|
|
|
|
$element->nodeValue = $gameName;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|