|
|
|
@ -103,6 +103,7 @@ class PackageController extends Controller
|
|
|
|
|
|
|
|
|
|
M('user_action_log', 'tab_')->data($log)->add();
|
|
|
|
|
|
|
|
|
|
$downloadDomain = $applyService->getDownloadDomain();
|
|
|
|
|
if (Request::isIOS() || Request::isIPadOS()) {
|
|
|
|
|
$packageDownloadLogService = new PackageDownloadLogService();
|
|
|
|
|
$packageDownloadLogService->add([
|
|
|
|
@ -114,7 +115,7 @@ class PackageController extends Controller
|
|
|
|
|
|
|
|
|
|
$plistUrl = substr($packageUrl, 1, strlen($packageUrl));
|
|
|
|
|
header("HTTP/1.1 303 See Other");
|
|
|
|
|
header("Location: "."itms-services://?action=download-manifest&url=" . C('DOMAIN_DOWNLOAD') . '/' . ltrim($plistUrl, '/'));
|
|
|
|
|
header("Location: "."itms-services://?action=download-manifest&url=" . $downloadDomain . '/' . ltrim($plistUrl, '/'));
|
|
|
|
|
} else {
|
|
|
|
|
$this->gotoPkgUrl($packageUrl);
|
|
|
|
|
}
|
|
|
|
@ -122,6 +123,8 @@ class PackageController extends Controller
|
|
|
|
|
|
|
|
|
|
private function gotoPkgUrl($packageUrl)
|
|
|
|
|
{
|
|
|
|
|
$applyService = new ApplyService();
|
|
|
|
|
$downloadDomain = $applyService->getDownloadDomain();
|
|
|
|
|
if (preg_match("/http/", $packageUrl)) {
|
|
|
|
|
$url = str_replace('-internal', '', $packageUrl);
|
|
|
|
|
echo "<script>window.location.href='$url';</script>";
|
|
|
|
@ -136,7 +139,7 @@ class PackageController extends Controller
|
|
|
|
|
if (!file_exists($packageUrl)) {
|
|
|
|
|
$this->error('文件不存在哦,亲!');
|
|
|
|
|
}else{
|
|
|
|
|
redirect(C('DOMAIN_DOWNLOAD') . ltrim($packageUrl, '.'));
|
|
|
|
|
redirect($downloadDomain . ltrim($packageUrl, '.'));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|