|
|
|
|
@@ -1057,7 +1057,7 @@ class Site extends BaseController
|
|
|
|
|
|
|
|
|
|
protected function domainExternalSeoSummaryRoot(): string
|
|
|
|
|
{
|
|
|
|
|
return $this->bootstrapCodeRoot() . '/public/_admin_templates/domain-seo-external/latest';
|
|
|
|
|
return $this->bootstrapCodeRoot() . '/storage/external-seo/latest';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function domainExternalSeoManualImportRoot(): string
|
|
|
|
|
@@ -1067,12 +1067,12 @@ class Site extends BaseController
|
|
|
|
|
|
|
|
|
|
protected function domainExternalSeoSnapshotRunRoot(): string
|
|
|
|
|
{
|
|
|
|
|
return $this->bootstrapCodeRoot() . '/public/_admin_templates/domain-seo-external/snapshot-runs';
|
|
|
|
|
return $this->bootstrapCodeRoot() . '/storage/external-seo/snapshot-runs';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function domainExternalSeoSnapshotValidateRunRoot(): string
|
|
|
|
|
{
|
|
|
|
|
return $this->bootstrapCodeRoot() . '/public/_admin_templates/domain-seo-external/snapshot-validate-runs';
|
|
|
|
|
return $this->bootstrapCodeRoot() . '/storage/external-seo/snapshot-validate-runs';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function domainExternalSeoStorageRoot(): string
|
|
|
|
|
@@ -1122,6 +1122,18 @@ class Site extends BaseController
|
|
|
|
|
return $strPath;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function storageRelativePath(string $strPath): string
|
|
|
|
|
{
|
|
|
|
|
$strStorageRoot = rtrim($this->bootstrapCodeRoot() . '/storage/', '/');
|
|
|
|
|
$strPath = str_replace('\\', '/', $strPath);
|
|
|
|
|
$strStorageRoot = str_replace('\\', '/', $strStorageRoot);
|
|
|
|
|
if (str_starts_with($strPath, $strStorageRoot . '/')) {
|
|
|
|
|
return substr($strPath, strlen($strStorageRoot . '/'));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $strPath;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function bootstrapTemplateKey(?string $strTemplate): string
|
|
|
|
|
{
|
|
|
|
|
$strTemplate = strtolower(trim((string)$strTemplate));
|
|
|
|
|
@@ -2180,8 +2192,8 @@ class Site extends BaseController
|
|
|
|
|
$intLimit
|
|
|
|
|
);
|
|
|
|
|
$arrSummary = DomainExternalSeoSummaryHelper::writeArtifacts($this->domainExternalSeoSummaryRoot(), $arrSummary);
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->publicRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->publicRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->storageRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->storageRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
|
|
|
|
|
return $this->success($arrSummary);
|
|
|
|
|
} catch (\Throwable $Throwable) {
|
|
|
|
|
@@ -2215,8 +2227,8 @@ class Site extends BaseController
|
|
|
|
|
$intLimit
|
|
|
|
|
);
|
|
|
|
|
$arrSummary = DomainExternalSeoTrendHelper::writeArtifacts($this->domainExternalSeoSummaryRoot(), $arrSummary);
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->publicRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->publicRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->storageRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->storageRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
|
|
|
|
|
return $this->success($arrSummary);
|
|
|
|
|
} catch (\Throwable $Throwable) {
|
|
|
|
|
@@ -2334,8 +2346,8 @@ class Site extends BaseController
|
|
|
|
|
'mapped_hosts_count' => (int)($arrResult['mapped_hosts_count'] ?? 0),
|
|
|
|
|
'provider_summary' => $arrProviderSummary,
|
|
|
|
|
'real_summary_status' => (string)($arrRealSummary['status'] ?? ''),
|
|
|
|
|
'summary_json_path' => $this->publicRelativePath((string)($arrRealSummary['summary_json_path'] ?? '')),
|
|
|
|
|
'summary_html_path' => $this->publicRelativePath((string)($arrRealSummary['summary_html_path'] ?? '')),
|
|
|
|
|
'summary_json_path' => $this->storageRelativePath((string)($arrRealSummary['summary_json_path'] ?? '')),
|
|
|
|
|
'summary_html_path' => $this->storageRelativePath((string)($arrRealSummary['summary_html_path'] ?? '')),
|
|
|
|
|
]);
|
|
|
|
|
} catch (\Throwable $Throwable) {
|
|
|
|
|
return $this->error('9999', '上传 Search Console property map 失败:' . $Throwable->getMessage());
|
|
|
|
|
@@ -2348,8 +2360,8 @@ class Site extends BaseController
|
|
|
|
|
$intDays = max(1, min(30, (int)$Request->get('days', 7)));
|
|
|
|
|
$arrSummary = DomainExternalSeoSearchConsoleProviderPlanHelper::buildSummary($this->bootstrapCodeRoot(), $intDays);
|
|
|
|
|
$arrSummary = DomainExternalSeoSearchConsoleProviderPlanHelper::writeArtifacts($this->domainExternalSeoSummaryRoot(), $arrSummary);
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->publicRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->publicRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->storageRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->storageRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
return $this->success($arrSummary);
|
|
|
|
|
} catch (\Throwable $Throwable) {
|
|
|
|
|
return $this->error('9999', '读取 Search Console provider 计划失败:' . $Throwable->getMessage());
|
|
|
|
|
@@ -2362,8 +2374,8 @@ class Site extends BaseController
|
|
|
|
|
$intDays = max(1, min(30, (int)$Request->get('days', 7)));
|
|
|
|
|
$arrSummary = DomainExternalSeoSearchConsoleFetchHelper::buildSummary($this->bootstrapCodeRoot(), $intDays);
|
|
|
|
|
$arrSummary = DomainExternalSeoSearchConsoleFetchHelper::writeArtifacts($this->domainExternalSeoSummaryRoot(), $arrSummary);
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->publicRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->publicRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->storageRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->storageRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
return $this->success($arrSummary);
|
|
|
|
|
} catch (\Throwable $Throwable) {
|
|
|
|
|
return $this->error('9999', '读取 Search Console fetch 摘要失败:' . $Throwable->getMessage());
|
|
|
|
|
@@ -2375,8 +2387,8 @@ class Site extends BaseController
|
|
|
|
|
try {
|
|
|
|
|
$arrSummary = DomainExternalSeoBaiduProviderPlanHelper::buildSummary($this->bootstrapCodeRoot());
|
|
|
|
|
$arrSummary = DomainExternalSeoBaiduProviderPlanHelper::writeArtifacts($this->domainExternalSeoSummaryRoot(), $arrSummary);
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->publicRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->publicRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->storageRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->storageRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
return $this->success($arrSummary);
|
|
|
|
|
} catch (\Throwable $Throwable) {
|
|
|
|
|
return $this->error('9999', '读取百度 provider 计划失败:' . $Throwable->getMessage());
|
|
|
|
|
@@ -2389,8 +2401,8 @@ class Site extends BaseController
|
|
|
|
|
$intLimit = max(1, min(200, (int)$Request->get('limit', 50)));
|
|
|
|
|
$arrSummary = DomainExternalSeoBaiduPushSummaryHelper::buildSummary($this->bootstrapCodeRoot(), $intLimit);
|
|
|
|
|
$arrSummary = DomainExternalSeoBaiduPushSummaryHelper::writeArtifacts($this->domainExternalSeoSummaryRoot(), $arrSummary);
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->publicRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->publicRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->storageRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->storageRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
return $this->success($arrSummary);
|
|
|
|
|
} catch (\Throwable $Throwable) {
|
|
|
|
|
return $this->error('9999', '读取百度推送观察摘要失败:' . $Throwable->getMessage());
|
|
|
|
|
@@ -2439,8 +2451,8 @@ class Site extends BaseController
|
|
|
|
|
$intLimit = max(1, min(300, (int)$Request->get('limit', 100)));
|
|
|
|
|
$arrQueue = DomainExternalSeoBaiduPushAttentionQueueHelper::buildQueue($this->bootstrapCodeRoot(), $intLimit);
|
|
|
|
|
$arrQueue = DomainExternalSeoBaiduPushAttentionQueueHelper::writeArtifacts($this->domainExternalSeoSummaryRoot(), $arrQueue);
|
|
|
|
|
$arrQueue['summary_json_path'] = $this->publicRelativePath((string)($arrQueue['summary_json_path'] ?? ''));
|
|
|
|
|
$arrQueue['summary_html_path'] = $this->publicRelativePath((string)($arrQueue['summary_html_path'] ?? ''));
|
|
|
|
|
$arrQueue['summary_json_path'] = $this->storageRelativePath((string)($arrQueue['summary_json_path'] ?? ''));
|
|
|
|
|
$arrQueue['summary_html_path'] = $this->storageRelativePath((string)($arrQueue['summary_html_path'] ?? ''));
|
|
|
|
|
return $this->success($arrQueue);
|
|
|
|
|
} catch (\Throwable $Throwable) {
|
|
|
|
|
return $this->error('9999', '读取百度推送异常队列失败:' . $Throwable->getMessage());
|
|
|
|
|
@@ -2453,8 +2465,8 @@ class Site extends BaseController
|
|
|
|
|
$intLimit = max(1, min(100, (int)$Request->get('limit', 20)));
|
|
|
|
|
$arrSummary = DomainExternalSeoBaiduPushTrendHelper::buildSummary($this->bootstrapCodeRoot(), $intLimit);
|
|
|
|
|
$arrSummary = DomainExternalSeoBaiduPushTrendHelper::writeArtifacts($this->domainExternalSeoSummaryRoot(), $arrSummary);
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->publicRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->publicRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->storageRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->storageRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
return $this->success($arrSummary);
|
|
|
|
|
} catch (\Throwable $Throwable) {
|
|
|
|
|
return $this->error('9999', '读取百度推送趋势摘要失败:' . $Throwable->getMessage());
|
|
|
|
|
@@ -2467,8 +2479,8 @@ class Site extends BaseController
|
|
|
|
|
$intLimit = max(1, min(100, (int)$Request->get('limit', 20)));
|
|
|
|
|
$arrSummary = DomainExternalSeoBaiduFeedbackSummaryHelper::buildSummary($this->bootstrapCodeRoot(), $intLimit);
|
|
|
|
|
$arrSummary = DomainExternalSeoBaiduFeedbackSummaryHelper::writeArtifacts($this->domainExternalSeoSummaryRoot(), $arrSummary);
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->publicRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->publicRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->storageRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->storageRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
return $this->success($arrSummary);
|
|
|
|
|
} catch (\Throwable $Throwable) {
|
|
|
|
|
return $this->error('9999', '读取百度反馈摘要失败:' . $Throwable->getMessage());
|
|
|
|
|
@@ -2481,8 +2493,8 @@ class Site extends BaseController
|
|
|
|
|
$intLimit = max(1, min(100, (int)$Request->get('limit', 20)));
|
|
|
|
|
$arrSummary = DomainExternalSeoSiteQueryProbeHelper::buildSummary($this->bootstrapCodeRoot(), $intLimit);
|
|
|
|
|
$arrSummary = DomainExternalSeoSiteQueryProbeHelper::writeArtifacts($this->domainExternalSeoSummaryRoot(), $arrSummary);
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->publicRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->publicRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->storageRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->storageRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
return $this->success($arrSummary);
|
|
|
|
|
} catch (\Throwable $Throwable) {
|
|
|
|
|
return $this->error('9999', '读取百度 site: 收录探测失败:' . $Throwable->getMessage());
|
|
|
|
|
@@ -2509,8 +2521,8 @@ class Site extends BaseController
|
|
|
|
|
$intLimit = max(1, min(300, (int)$Request->get('limit', 100)));
|
|
|
|
|
$arrQueue = DomainExternalSeoAizhanKeywordAttentionQueueHelper::buildQueue($this->bootstrapCodeRoot(), $intLimit);
|
|
|
|
|
$arrQueue = DomainExternalSeoAizhanKeywordAttentionQueueHelper::writeArtifacts($this->domainExternalSeoSummaryRoot(), $arrQueue);
|
|
|
|
|
$arrQueue['summary_json_path'] = $this->publicRelativePath((string)($arrQueue['summary_json_path'] ?? ''));
|
|
|
|
|
$arrQueue['summary_html_path'] = $this->publicRelativePath((string)($arrQueue['summary_html_path'] ?? ''));
|
|
|
|
|
$arrQueue['summary_json_path'] = $this->storageRelativePath((string)($arrQueue['summary_json_path'] ?? ''));
|
|
|
|
|
$arrQueue['summary_html_path'] = $this->storageRelativePath((string)($arrQueue['summary_html_path'] ?? ''));
|
|
|
|
|
return $this->success($arrQueue);
|
|
|
|
|
} catch (\Throwable $Throwable) {
|
|
|
|
|
return $this->error('9999', '读取爱站关键词异常队列失败:' . $Throwable->getMessage());
|
|
|
|
|
@@ -2523,8 +2535,8 @@ class Site extends BaseController
|
|
|
|
|
$intLimit = max(1, min(100, (int)$Request->get('limit', 20)));
|
|
|
|
|
$arrSummary = DomainExternalSeoAizhanKeywordTrendHelper::buildSummary($this->bootstrapCodeRoot(), $intLimit);
|
|
|
|
|
$arrSummary = DomainExternalSeoAizhanKeywordTrendHelper::writeArtifacts($this->domainExternalSeoSummaryRoot(), $arrSummary);
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->publicRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->publicRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->storageRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->storageRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
return $this->success($arrSummary);
|
|
|
|
|
} catch (\Throwable $Throwable) {
|
|
|
|
|
return $this->error('9999', '读取爱站关键词趋势摘要失败:' . $Throwable->getMessage());
|
|
|
|
|
@@ -2568,40 +2580,40 @@ class Site extends BaseController
|
|
|
|
|
$arrResult = DomainExternalSeoSnapshotHelper::ingestSnapshots((array)$arrSnapshots, $strSource);
|
|
|
|
|
$strRunRoot = DomainExternalSeoSnapshotRunHelper::createRunRoot($this->domainExternalSeoSnapshotRunRoot(), 'snapshot_push');
|
|
|
|
|
$arrResult = DomainExternalSeoSnapshotRunHelper::writeRunArtifacts(
|
|
|
|
|
$this->bootstrapCodeRoot() . '/public',
|
|
|
|
|
$this->bootstrapCodeRoot() . '/storage',
|
|
|
|
|
$strRunRoot,
|
|
|
|
|
$arrResult,
|
|
|
|
|
(array)$arrSnapshots
|
|
|
|
|
);
|
|
|
|
|
$arrResult['run_root'] = $this->publicRelativePath($strRunRoot);
|
|
|
|
|
$arrResult['summary_json_path'] = $this->publicRelativePath((string)($arrResult['summary_json_path'] ?? ''));
|
|
|
|
|
$arrResult['summary_html_path'] = $this->publicRelativePath((string)($arrResult['summary_html_path'] ?? ''));
|
|
|
|
|
$arrResult['payload_json_path'] = $this->publicRelativePath((string)($arrResult['payload_json_path'] ?? ''));
|
|
|
|
|
$arrResult['run_root'] = $this->storageRelativePath($strRunRoot);
|
|
|
|
|
$arrResult['summary_json_path'] = $this->storageRelativePath((string)($arrResult['summary_json_path'] ?? ''));
|
|
|
|
|
$arrResult['summary_html_path'] = $this->storageRelativePath((string)($arrResult['summary_html_path'] ?? ''));
|
|
|
|
|
$arrResult['payload_json_path'] = $this->storageRelativePath((string)($arrResult['payload_json_path'] ?? ''));
|
|
|
|
|
$arrOverview = DomainExternalSeoCnOverviewHelper::buildOverview(14, 10);
|
|
|
|
|
$arrOverview = DomainExternalSeoCnOverviewHelper::writeArtifacts($this->domainExternalSeoSummaryRoot(), $arrOverview);
|
|
|
|
|
$arrOverview['summary_json_path'] = $this->publicRelativePath((string)($arrOverview['summary_json_path'] ?? ''));
|
|
|
|
|
$arrOverview['summary_html_path'] = $this->publicRelativePath((string)($arrOverview['summary_html_path'] ?? ''));
|
|
|
|
|
$arrOverview['summary_json_path'] = $this->storageRelativePath((string)($arrOverview['summary_json_path'] ?? ''));
|
|
|
|
|
$arrOverview['summary_html_path'] = $this->storageRelativePath((string)($arrOverview['summary_html_path'] ?? ''));
|
|
|
|
|
|
|
|
|
|
$arrSnapshotTrend = DomainExternalSeoSnapshotTrendHelper::buildSummary($this->domainExternalSeoSnapshotRunRoot(), 10);
|
|
|
|
|
$arrSnapshotTrend = DomainExternalSeoSnapshotTrendHelper::writeArtifacts($this->domainExternalSeoSummaryRoot(), $arrSnapshotTrend);
|
|
|
|
|
$arrSnapshotTrend['summary_json_path'] = $this->publicRelativePath((string)($arrSnapshotTrend['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSnapshotTrend['summary_html_path'] = $this->publicRelativePath((string)($arrSnapshotTrend['summary_html_path'] ?? ''));
|
|
|
|
|
$arrSnapshotTrend['summary_json_path'] = $this->storageRelativePath((string)($arrSnapshotTrend['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSnapshotTrend['summary_html_path'] = $this->storageRelativePath((string)($arrSnapshotTrend['summary_html_path'] ?? ''));
|
|
|
|
|
|
|
|
|
|
$arrResult['post_ingest_overview'] = $arrOverview;
|
|
|
|
|
$arrResult['post_ingest_snapshot_trend'] = $arrSnapshotTrend;
|
|
|
|
|
$arrResult = DomainExternalSeoSnapshotRunHelper::writeRunArtifacts(
|
|
|
|
|
$this->bootstrapCodeRoot() . '/public',
|
|
|
|
|
$this->bootstrapCodeRoot() . '/storage',
|
|
|
|
|
$strRunRoot,
|
|
|
|
|
$arrResult,
|
|
|
|
|
(array)$arrSnapshots
|
|
|
|
|
);
|
|
|
|
|
$arrResult['summary_json_path'] = $this->publicRelativePath((string)($arrResult['summary_json_path'] ?? ''));
|
|
|
|
|
$arrResult['summary_html_path'] = $this->publicRelativePath((string)($arrResult['summary_html_path'] ?? ''));
|
|
|
|
|
$arrResult['payload_json_path'] = $this->publicRelativePath((string)($arrResult['payload_json_path'] ?? ''));
|
|
|
|
|
$arrResult['summary_json_path'] = $this->storageRelativePath((string)($arrResult['summary_json_path'] ?? ''));
|
|
|
|
|
$arrResult['summary_html_path'] = $this->storageRelativePath((string)($arrResult['summary_html_path'] ?? ''));
|
|
|
|
|
$arrResult['payload_json_path'] = $this->storageRelativePath((string)($arrResult['payload_json_path'] ?? ''));
|
|
|
|
|
$arrSnapshotTrend = DomainExternalSeoSnapshotTrendHelper::buildSummary($this->domainExternalSeoSnapshotRunRoot(), 10);
|
|
|
|
|
$arrSnapshotTrend = DomainExternalSeoSnapshotTrendHelper::writeArtifacts($this->domainExternalSeoSummaryRoot(), $arrSnapshotTrend);
|
|
|
|
|
$arrSnapshotTrend['summary_json_path'] = $this->publicRelativePath((string)($arrSnapshotTrend['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSnapshotTrend['summary_html_path'] = $this->publicRelativePath((string)($arrSnapshotTrend['summary_html_path'] ?? ''));
|
|
|
|
|
$arrSnapshotTrend['summary_json_path'] = $this->storageRelativePath((string)($arrSnapshotTrend['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSnapshotTrend['summary_html_path'] = $this->storageRelativePath((string)($arrSnapshotTrend['summary_html_path'] ?? ''));
|
|
|
|
|
$arrResult['post_ingest_snapshot_trend'] = $arrSnapshotTrend;
|
|
|
|
|
return $this->success($arrResult);
|
|
|
|
|
} catch (\Throwable $Throwable) {
|
|
|
|
|
@@ -2651,15 +2663,15 @@ class Site extends BaseController
|
|
|
|
|
$arrResult = DomainExternalSeoSnapshotSchemaHelper::validateSnapshots((array)$arrSnapshots);
|
|
|
|
|
$strRunRoot = DomainExternalSeoSnapshotValidateRunHelper::createRunRoot($this->domainExternalSeoSnapshotValidateRunRoot(), 'snapshot_validate');
|
|
|
|
|
$arrResult = DomainExternalSeoSnapshotValidateRunHelper::writeRunArtifacts(
|
|
|
|
|
$this->bootstrapCodeRoot() . '/public',
|
|
|
|
|
$this->bootstrapCodeRoot() . '/storage',
|
|
|
|
|
$strRunRoot,
|
|
|
|
|
$arrResult,
|
|
|
|
|
(array)$arrSnapshots
|
|
|
|
|
);
|
|
|
|
|
$arrResult['run_root'] = $this->publicRelativePath($strRunRoot);
|
|
|
|
|
$arrResult['summary_json_path'] = $this->publicRelativePath((string)($arrResult['summary_json_path'] ?? ''));
|
|
|
|
|
$arrResult['summary_html_path'] = $this->publicRelativePath((string)($arrResult['summary_html_path'] ?? ''));
|
|
|
|
|
$arrResult['payload_json_path'] = $this->publicRelativePath((string)($arrResult['payload_json_path'] ?? ''));
|
|
|
|
|
$arrResult['run_root'] = $this->storageRelativePath($strRunRoot);
|
|
|
|
|
$arrResult['summary_json_path'] = $this->storageRelativePath((string)($arrResult['summary_json_path'] ?? ''));
|
|
|
|
|
$arrResult['summary_html_path'] = $this->storageRelativePath((string)($arrResult['summary_html_path'] ?? ''));
|
|
|
|
|
$arrResult['payload_json_path'] = $this->storageRelativePath((string)($arrResult['payload_json_path'] ?? ''));
|
|
|
|
|
|
|
|
|
|
return $this->success($arrResult);
|
|
|
|
|
} catch (\Throwable $Throwable) {
|
|
|
|
|
@@ -2944,8 +2956,8 @@ class Site extends BaseController
|
|
|
|
|
$intDays = max(1, min(30, (int)$Request->get('days', 7)));
|
|
|
|
|
$arrSummary = DomainExternalSeoRealSummaryHelper::buildSummary($this->bootstrapCodeRoot(), $intDays);
|
|
|
|
|
$arrSummary = DomainExternalSeoRealSummaryHelper::writeArtifacts($this->domainExternalSeoSummaryRoot(), $arrSummary);
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->publicRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->publicRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_json_path'] = $this->storageRelativePath((string)($arrSummary['summary_json_path'] ?? ''));
|
|
|
|
|
$arrSummary['summary_html_path'] = $this->storageRelativePath((string)($arrSummary['summary_html_path'] ?? ''));
|
|
|
|
|
return $this->success($arrSummary);
|
|
|
|
|
} catch (\Throwable $Throwable) {
|
|
|
|
|
return $this->error('9999', '读取真实站外 summary 骨架失败:' . $Throwable->getMessage());
|
|
|
|
|
@@ -3021,8 +3033,8 @@ class Site extends BaseController
|
|
|
|
|
'real_metrics_available' => !empty($arrRealSummary['real_metrics_available']),
|
|
|
|
|
'real_summary_provider' => (string)($arrRealSummary['provider_key'] ?? ''),
|
|
|
|
|
'metrics' => (array)($arrRealSummary['metrics'] ?? []),
|
|
|
|
|
'summary_json_path' => $this->publicRelativePath((string)($arrRealSummary['summary_json_path'] ?? '')),
|
|
|
|
|
'summary_html_path' => $this->publicRelativePath((string)($arrRealSummary['summary_html_path'] ?? '')),
|
|
|
|
|
'summary_json_path' => $this->storageRelativePath((string)($arrRealSummary['summary_json_path'] ?? '')),
|
|
|
|
|
'summary_html_path' => $this->storageRelativePath((string)($arrRealSummary['summary_html_path'] ?? '')),
|
|
|
|
|
]);
|
|
|
|
|
} catch (\Throwable $Throwable) {
|
|
|
|
|
return $this->error('9999', '导入站外手工报表失败:' . $Throwable->getMessage());
|
|
|
|
|
|