refactor: 完全重构 AI 验证页面(参考友链页面)

- 采用友链页面的布局和样式结构

- 使用全局 CSS 变量

- 固定页面布局(隐藏侧边栏)

- PJAX 兼容性处理

- 响应式设计

- 内容验证功能完整实现
This commit is contained in:
2026-01-20 22:45:15 +08:00
parent d40af82a37
commit 10e0f5e8c1

View File

@@ -3,13 +3,10 @@
* AI 内容验证与查询页面 * AI 内容验证与查询页面
* @package Argon * @package Argon
*/ */
$wp_load_path = dirname(dirname(dirname(dirname(__FILE__)))) . '/wp-load.php'; $wp_load_path = dirname(dirname(dirname(dirname(__FILE__)))) . '/wp-load.php';
if (!file_exists($wp_load_path)) $wp_load_path = $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php'; if (!file_exists($wp_load_path)) $wp_load_path = $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php';
require_once($wp_load_path); require_once($wp_load_path);
get_header();
$query_code = isset($_GET['code']) ? sanitize_text_field($_GET['code']) : ''; $query_code = isset($_GET['code']) ? sanitize_text_field($_GET['code']) : '';
$result = null; $result = null;
$error = ''; $error = '';
@@ -42,7 +39,6 @@ if (!empty($query_code)) {
'code' => $query_code 'code' => $query_code
]; ];
// 提供商名称映射
$provider_names = [ $provider_names = [
'openai' => 'OpenAI', 'openai' => 'OpenAI',
'anthropic' => 'Anthropic', 'anthropic' => 'Anthropic',
@@ -57,7 +53,6 @@ if (!empty($query_code)) {
$result['provider_display'] = isset($provider_names[$result['provider']]) ? $provider_names[$result['provider']] : $result['provider']; $result['provider_display'] = isset($provider_names[$result['provider']]) ? $provider_names[$result['provider']] : $result['provider'];
// 检查内容是否被修改
$current_hash = md5($post->post_content . $post->post_title); $current_hash = md5($post->post_content . $post->post_title);
$result['is_modified'] = ($result['summary_hash'] !== $current_hash); $result['is_modified'] = ($result['summary_hash'] !== $current_hash);
} else { } else {
@@ -68,365 +63,268 @@ if (!empty($query_code)) {
} }
} }
} }
get_header();
?> ?>
<style> <div class="page-information-card-container"></div>
.ai-verify-page { <?php get_sidebar(); ?>
max-width: 900px;
margin: 0 auto; <div id="primary" class="content-area">
<style id="ai-verify-page-style">
@media screen and (min-width: 901px) {
body.ai-verify-page #leftbar_part, body.ai-verify-page #leftbar { display: none !important; }
} }
.ai-verify-card { @media screen and (max-width: 900px) {
background: var(--color-foreground); body.ai-verify-page #leftbar {
border-radius: var(--card-radius); display: block;
box-shadow: var(--card-shadow); position: fixed;
padding: 2rem; background: var(--color-foreground);
margin-bottom: 1.5rem; top: 0;
} left: -300px;
.ai-verify-header { height: 100vh;
margin-bottom: 2rem; width: 280px;
padding-bottom: 1.5rem; padding: 0;
border-bottom: 1px solid var(--color-border); overflow-y: auto;
} overflow-x: hidden;
.ai-verify-title { z-index: 1002;
font-size: 1.75rem; box-shadow: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07) !important;
font-weight: 600; transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
color: var(--color-text-deeper); }
margin: 0 0 0.5rem 0; html.leftbar-opened body.ai-verify-page #leftbar { left: 0px; }
} body.ai-verify-page .leftbar-mobile-nav { display: flex; flex-direction: column; min-height: 100%; }
.ai-verify-subtitle { body.ai-verify-page .leftbar-desktop-content { display: none !important; }
font-size: 0.9375rem; body.ai-verify-page .leftbar-mobile-footer {
color: var(--color-text-muted); margin-top: auto;
margin: 0; position: sticky;
line-height: 1.6; bottom: 0;
} background: var(--color-foreground);
.ai-query-form { z-index: 10;
margin-bottom: 2rem; }
}
.ai-query-input {
flex: 1;
min-width: 200px;
padding: 0.625rem 1rem;
border: 1px solid var(--color-border);
border-radius: var(--card-radius);
font-family: 'Consolas', 'Monaco', monospace;
font-size: 1rem;
letter-spacing: 1px;
background: var(--color-foreground);
color: var(--color-text);
transition: all var(--animation-fast) var(--ease-standard);
}
.ai-query-input:focus {
outline: none;
border-color: var(--themecolor);
box-shadow: 0 0 0 3px rgba(var(--themecolor-rgbstr), 0.1);
}
.ai-alert {
padding: 1rem 1.25rem;
border-radius: var(--card-radius);
margin-bottom: 1.5rem;
display: flex;
align-items: flex-start;
gap: 0.75rem;
}
.ai-alert-warning {
background: rgba(255, 193, 7, 0.1);
border: 1px solid rgba(255, 193, 7, 0.3);
color: var(--color-text);
}
.ai-alert-info {
background: rgba(var(--themecolor-rgbstr), 0.08);
border: 1px solid rgba(var(--themecolor-rgbstr), 0.2);
color: var(--color-text);
}
.ai-alert-icon {
flex-shrink: 0;
margin-top: 0.125rem;
}
.ai-section {
margin-bottom: 2rem;
}
.ai-section:last-child {
margin-bottom: 0;
}
.ai-section-title {
font-size: 1.125rem;
font-weight: 600;
color: var(--color-text-deeper);
margin: 0 0 1rem 0;
display: flex;
align-items: center;
gap: 0.5rem;
}
.ai-section-icon {
color: var(--themecolor);
opacity: 0.9;
}
.ai-code-display {
font-family: 'Consolas', 'Monaco', monospace;
font-size: 1.5rem;
letter-spacing: 2px;
color: var(--themecolor);
font-weight: 600;
padding: 1rem;
background: rgba(var(--themecolor-rgbstr), 0.05);
border-radius: var(--card-radius);
text-align: center;
}
.ai-info-grid {
display: grid;
gap: 0.875rem;
}
.ai-info-item {
display: flex;
align-items: baseline;
gap: 0.5rem;
}
.ai-info-label {
color: var(--color-text-muted);
font-size: 0.875rem;
min-width: 80px;
flex-shrink: 0;
}
.ai-info-value {
color: var(--color-text);
flex: 1;
}
.ai-info-value-mono {
font-family: 'Consolas', 'Monaco', monospace;
}
.ai-info-value-link {
color: var(--themecolor);
text-decoration: none;
font-weight: 500;
transition: opacity var(--animation-fast) var(--ease-standard);
}
.ai-info-value-link:hover {
opacity: 0.8;
}
.ai-content-box {
padding: 1.25rem;
background: rgba(var(--themecolor-rgbstr), 0.03);
border: 1px solid rgba(var(--themecolor-rgbstr), 0.1);
border-radius: var(--card-radius);
line-height: 1.7;
color: var(--color-text);
}
.ai-status-badge {
display: inline-flex;
align-items: center;
gap: 0.375rem;
padding: 0.25rem 0.75rem;
border-radius: 999px;
font-size: 0.8125rem;
font-weight: 500;
}
.ai-status-valid {
background: rgba(40, 167, 69, 0.1);
color: #28a745;
border: 1px solid rgba(40, 167, 69, 0.2);
}
.ai-status-modified {
background: rgba(255, 193, 7, 0.1);
color: #ffc107;
border: 1px solid rgba(255, 193, 7, 0.3);
}
.ai-actions {
margin-top: 2rem;
padding-top: 1.5rem;
border-top: 1px solid var(--color-border);
display: flex;
gap: 0.75rem;
flex-wrap: wrap;
}
.ai-help-list {
padding-left: 1.5rem;
margin: 0;
color: var(--color-text-muted);
line-height: 1.8;
}
.ai-help-list li {
margin-bottom: 0.5rem;
} }
body.ai-verify-page #primary { width: 100% !important; max-width: 1000px !important; margin: 0 auto !important; float: none !important; }
body.ai-verify-page #content { margin-top: -50vh !important; }
.ai-verify-header-card { text-align: center; padding: 40px 24px 32px; background: transparent !important; box-shadow: none !important; }
.ai-verify-header-icon { width: 64px; height: 64px; margin: 0 auto 20px; background: var(--themecolor-gradient); border-radius: var(--card-radius); display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; box-shadow: 0 4px 12px rgba(var(--themecolor-rgbstr), 0.2); transition: transform var(--animation-fast) var(--ease-standard); }
.ai-verify-header-icon:hover { transform: translateY(-2px); }
.ai-verify-title { font-size: 24px; font-weight: 600; margin: 0 0 12px; color: var(--color-text-deeper); background: none !important; }
.ai-verify-title::before, .ai-verify-title::after { display: none !important; }
.ai-verify-subtitle { font-size: 14px; color: var(--color-text-muted); margin: 0; line-height: 1.6; }
html.darkmode .ai-verify-subtitle { color: #aaa; }
.ai-verify-card { padding: 24px 28px; margin-bottom: 16px; }
.ai-verify-section-title { font-size: 17px; font-weight: 600; margin: 0 0 16px; color: var(--color-text-deeper); display: flex; align-items: center; gap: 8px; background: none !important; }
.ai-verify-section-title::before, .ai-verify-section-title::after { display: none !important; }
.ai-verify-section-title i { color: var(--themecolor); font-size: 16px; }
.ai-query-form { margin-bottom: 20px; }
.ai-query-form form { display: flex; gap: 12px; flex-wrap: wrap; }
.ai-query-input { flex: 1; min-width: 200px; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: var(--card-radius); font-family: 'Consolas', 'Monaco', monospace; font-size: 15px; letter-spacing: 1px; background: var(--color-foreground); color: var(--color-text); transition: all var(--animation-fast) var(--ease-standard); }
.ai-query-input:focus { outline: none; border-color: var(--themecolor); box-shadow: 0 0 0 3px rgba(var(--themecolor-rgbstr), 0.1); }
.ai-alert { padding: 14px 16px; border-radius: var(--card-radius); margin-bottom: 20px; display: flex; align-items: flex-start; gap: 10px; line-height: 1.6; }
.ai-alert-warning { background: rgba(255, 193, 7, 0.1); border: 1px solid rgba(255, 193, 7, 0.3); color: var(--color-text); }
.ai-alert-info { background: rgba(var(--themecolor-rgbstr), 0.08); border: 1px solid rgba(var(--themecolor-rgbstr), 0.2); color: var(--color-text); }
.ai-alert-icon { flex-shrink: 0; font-size: 16px; margin-top: 2px; }
.ai-code-display { font-family: 'Consolas', 'Monaco', monospace; font-size: 28px; letter-spacing: 3px; color: var(--themecolor); font-weight: 600; padding: 20px; background: rgba(var(--themecolor-rgbstr), 0.05); border-radius: var(--card-radius); text-align: center; margin-bottom: 20px; }
.ai-info-grid { display: grid; gap: 12px; }
.ai-info-item { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--color-border-on-foreground); }
.ai-info-item:last-child { border-bottom: none; }
.ai-info-label { color: var(--color-text-muted); font-size: 14px; min-width: 100px; flex-shrink: 0; }
.ai-info-value { color: var(--color-text); flex: 1; word-break: break-word; }
.ai-info-value-mono { font-family: 'Consolas', 'Monaco', monospace; }
.ai-info-value-link { color: var(--themecolor); text-decoration: none; font-weight: 500; transition: opacity var(--animation-fast) var(--ease-standard); }
.ai-info-value-link:hover { opacity: 0.8; }
.ai-status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 500; }
.ai-status-valid { background: rgba(40, 167, 69, 0.1); color: #28a745; border: 1px solid rgba(40, 167, 69, 0.2); }
.ai-status-modified { background: rgba(255, 193, 7, 0.1); color: #ffc107; border: 1px solid rgba(255, 193, 7, 0.3); }
.ai-content-box { padding: 16px; background: rgba(var(--themecolor-rgbstr), 0.03); border: 1px solid rgba(var(--themecolor-rgbstr), 0.1); border-radius: var(--card-radius); line-height: 1.8; color: var(--color-text); margin-bottom: 20px; }
.ai-actions { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--color-border-on-foreground); display: flex; gap: 10px; flex-wrap: wrap; }
.ai-help-list { padding-left: 20px; margin: 0; color: var(--color-text-muted); line-height: 1.8; }
.ai-help-list li { margin-bottom: 8px; }
@media (max-width: 768px) { @media (max-width: 768px) {
.ai-verify-card { .ai-verify-card { padding: 20px; }
padding: 1.5rem; .ai-verify-header-card { padding: 30px 20px 24px; }
} .ai-code-display { font-size: 22px; letter-spacing: 2px; padding: 16px; }
.ai-verify-title { .ai-info-label { min-width: 80px; font-size: 13px; }
font-size: 1.5rem; .ai-query-form form { flex-direction: column; }
} .ai-query-input { width: 100%; }
.ai-code-display {
font-size: 1.25rem;
letter-spacing: 1.5px;
}
} }
</style> </style>
<div id="primary" class="content-area"> <script data-pjax>
<main id="main" class="site-main"> (function() {
<div class="ai-verify-page"> function cleanupAIVerifyPage() {
<div class="ai-verify-card"> document.body.classList.remove('ai-verify-page');
<div class="ai-verify-header"> var s = document.getElementById('ai-verify-page-style');
<h1 class="ai-verify-title"><?php _e('AI 内容验证与查询', 'argon'); ?></h1> if (s) s.remove();
<p class="ai-verify-subtitle"><?php _e('通过唯一识别码验证 AI 生成内容的真实性、完整性和时效性', 'argon'); ?></p> }
if (!document.getElementById('ai-verify-page-style')) {
document.body.classList.remove('ai-verify-page');
}
document.body.classList.add('ai-verify-page');
if (typeof jQuery !== 'undefined') {
var $ = jQuery;
$(document).off('pjax:start.aiverify pjax:popstate.aiverify');
$(document).on('pjax:start.aiverify', function() {
cleanupAIVerifyPage();
$(document).off('pjax:start.aiverify pjax:popstate.aiverify');
});
$(document).on('pjax:popstate.aiverify', function() {
setTimeout(function() {
if (!document.getElementById('ai-verify-page-style')) {
document.body.classList.remove('ai-verify-page');
}
}, 50);
});
}
})();
</script>
<main id="main" class="site-main" role="main">
<div class="ai-verify-header-card" style="margin-bottom: 16px;">
<div class="ai-verify-header-icon"><i class="fa fa-shield"></i></div>
<h1 class="ai-verify-title"><?php _e('AI 内容验证与查询', 'argon'); ?></h1>
<p class="ai-verify-subtitle"><?php _e('通过唯一识别码验证 AI 生成内容的真实性、完整性和时效性', 'argon'); ?></p>
</div>
<article class="post card shadow-sm bg-white border-0 ai-verify-card">
<h3 class="ai-verify-section-title"><i class="fa fa-search"></i><?php _e('查询验证', 'argon'); ?></h3>
<div class="ai-query-form">
<form method="get" action="">
<input type="text"
name="code"
value="<?php echo esc_attr($query_code); ?>"
placeholder="<?php _e('输入 8 位识别码', 'argon'); ?>"
maxlength="8"
class="ai-query-input"
required>
<button type="submit" class="btn btn-primary" style="padding: 10px 24px; white-space: nowrap;">
<?php _e('查询验证', 'argon'); ?>
</button>
</form>
</div>
<?php if (!empty($error)): ?>
<div class="ai-alert ai-alert-warning">
<span class="ai-alert-icon">⚠</span>
<span><?php echo esc_html($error); ?></span>
</div>
<?php elseif ($result): ?>
<?php if ($result['is_modified']): ?>
<div class="ai-alert ai-alert-warning">
<span class="ai-alert-icon">⚠</span>
<div>
<strong><?php _e('内容已变更', 'argon'); ?></strong><br>
<?php _e('原文内容在 AI 摘要生成后发生了修改,当前摘要可能与最新文章内容不完全一致', 'argon'); ?>
</div> </div>
</div>
<!-- 查询表单 --> <?php else: ?>
<div class="ai-query-form"> <div class="ai-alert ai-alert-info">
<form method="get" action="" style="display: flex; gap: 0.75rem; flex-wrap: wrap;"> <span class="ai-alert-icon">✓</span>
<input type="text" <div>
name="code" <strong><?php _e('验证通过', 'argon'); ?></strong><br>
value="<?php echo esc_attr($query_code); ?>" <?php _e('AI 生成内容与原文保持一致,未检测到内容变更', 'argon'); ?>
placeholder="<?php _e('输入 8 位识别码', 'argon'); ?>"
maxlength="8"
class="ai-query-input"
required>
<button type="submit" class="btn btn-primary" style="padding: 0.625rem 1.5rem; white-space: nowrap;">
<?php _e('查询验证', 'argon'); ?>
</button>
</form>
</div> </div>
</div>
<?php if (!empty($error)): ?> <?php endif; ?>
<!-- 错误信息 -->
<div class="ai-alert ai-alert-warning"> <div class="ai-code-display"><?php echo esc_html($result['code']); ?></div>
<span class="ai-alert-icon">⚠</span>
<span><?php echo esc_html($error); ?></span> <h4 style="font-size: 15px; font-weight: 600; margin: 0 0 12px; color: var(--color-text-deeper);"><?php _e('关联文章', 'argon'); ?></h4>
</div> <div class="ai-info-grid" style="margin-bottom: 24px;">
<?php elseif ($result): ?> <div class="ai-info-item">
<!-- 查询结果 --> <span class="ai-info-label"><?php _e('文章标题', 'argon'); ?></span>
<div class="ai-query-result"> <a href="<?php echo esc_url($result['post_url']); ?>" class="ai-info-value ai-info-value-link">
<!-- 验证状态 --> <?php echo esc_html($result['post_title']); ?>
<?php if ($result['is_modified']): ?> </a>
<div class="ai-alert ai-alert-warning"> </div>
<span class="ai-alert-icon">⚠</span> <div class="ai-info-item">
<div> <span class="ai-info-label"><?php _e('文章 ID', 'argon'); ?></span>
<strong><?php _e('内容已变更', 'argon'); ?></strong><br> <span class="ai-info-value ai-info-value-mono"><?php echo esc_html($result['post_id']); ?></span>
<?php _e('原文内容在 AI 摘要生成后发生了修改,当前摘要可能与最新文章内容不完全一致', 'argon'); ?> </div>
</div> <div class="ai-info-item">
</div> <span class="ai-info-label"><?php _e('发布时间', 'argon'); ?></span>
<?php else: ?> <span class="ai-info-value"><?php echo esc_html($result['post_date']); ?></span>
<div class="ai-alert ai-alert-info"> </div>
<span class="ai-alert-icon">✓</span> <div class="ai-info-item">
<div> <span class="ai-info-label"><?php _e('最后修改', 'argon'); ?></span>
<strong><?php _e('验证通过', 'argon'); ?></strong><br> <span class="ai-info-value"><?php echo esc_html($result['post_modified']); ?></span>
<?php _e('AI 生成内容与原文保持一致,未检测到内容变更', 'argon'); ?> </div>
</div> <div class="ai-info-item">
</div> <span class="ai-info-label"><?php _e('作者', 'argon'); ?></span>
<?php endif; ?> <span class="ai-info-value"><?php echo esc_html($result['post_author']); ?></span>
</div>
<!-- 识别码信息 --> <div class="ai-info-item">
<div class="ai-section"> <span class="ai-info-label"><?php _e('内容状态', 'argon'); ?></span>
<h3 class="ai-section-title"> <span class="ai-info-value">
<span class="ai-section-icon">🔖</span> <?php if ($result['is_modified']): ?>
<?php _e('识别码', 'argon'); ?> <span class="ai-status-badge ai-status-modified"><?php _e('已变更', 'argon'); ?></span>
</h3> <?php else: ?>
<div class="ai-code-display"><?php echo esc_html($result['code']); ?></div> <span class="ai-status-badge ai-status-valid"><?php _e('一致', 'argon'); ?></span>
</div> <?php endif; ?>
</span>
<!-- 关联文章 -->
<div class="ai-section">
<h3 class="ai-section-title">
<span class="ai-section-icon">📄</span>
<?php _e('关联文章', 'argon'); ?>
</h3>
<div class="ai-info-grid">
<div class="ai-info-item">
<span class="ai-info-label"><?php _e('文章标题', 'argon'); ?></span>
<a href="<?php echo esc_url($result['post_url']); ?>" class="ai-info-value ai-info-value-link">
<?php echo esc_html($result['post_title']); ?>
</a>
</div>
<div class="ai-info-item">
<span class="ai-info-label"><?php _e('文章 ID', 'argon'); ?></span>
<span class="ai-info-value ai-info-value-mono"><?php echo esc_html($result['post_id']); ?></span>
</div>
<div class="ai-info-item">
<span class="ai-info-label"><?php _e('发布时间', 'argon'); ?></span>
<span class="ai-info-value"><?php echo esc_html($result['post_date']); ?></span>
</div>
<div class="ai-info-item">
<span class="ai-info-label"><?php _e('最后修改', 'argon'); ?></span>
<span class="ai-info-value"><?php echo esc_html($result['post_modified']); ?></span>
</div>
<div class="ai-info-item">
<span class="ai-info-label"><?php _e('作者', 'argon'); ?></span>
<span class="ai-info-value"><?php echo esc_html($result['post_author']); ?></span>
</div>
<div class="ai-info-item">
<span class="ai-info-label"><?php _e('内容状态', 'argon'); ?></span>
<span class="ai-info-value">
<?php if ($result['is_modified']): ?>
<span class="ai-status-badge ai-status-modified"><?php _e('已变更', 'argon'); ?></span>
<?php else: ?>
<span class="ai-status-badge ai-status-valid"><?php _e('一致', 'argon'); ?></span>
<?php endif; ?>
</span>
</div>
</div>
</div>
<!-- AI 生成内容 -->
<div class="ai-section">
<h3 class="ai-section-title">
<span class="ai-section-icon">📝</span>
<?php _e('AI 生成内容', 'argon'); ?>
</h3>
<div class="ai-content-box">
<?php echo esc_html($result['summary']); ?>
</div>
</div>
<!-- 生成信息 -->
<div class="ai-section">
<h3 class="ai-section-title">
<span class="ai-section-icon">⚙</span>
<?php _e('生成信息', 'argon'); ?>
</h3>
<div class="ai-info-grid">
<div class="ai-info-item">
<span class="ai-info-label"><?php _e('AI 提供商', 'argon'); ?></span>
<span class="ai-info-value"><?php echo esc_html($result['provider_display']); ?></span>
</div>
<div class="ai-info-item">
<span class="ai-info-label"><?php _e('使用模型', 'argon'); ?></span>
<span class="ai-info-value ai-info-value-mono"><?php echo esc_html($result['model']); ?></span>
</div>
<div class="ai-info-item">
<span class="ai-info-label"><?php _e('生成时间', 'argon'); ?></span>
<span class="ai-info-value"><?php echo esc_html(date('Y-m-d H:i:s', $result['generated_time'])); ?></span>
</div>
</div>
</div>
<!-- 操作按钮 -->
<div class="ai-actions">
<a href="<?php echo esc_url($result['post_url']); ?>" class="btn btn-primary">
<?php _e('查看原文', 'argon'); ?>
</a>
<a href="<?php echo esc_url(get_template_directory_uri() . '/ai-summary-query.php'); ?>" class="btn btn-outline-secondary">
<?php _e('查询其他识别码', 'argon'); ?>
</a>
</div>
</div>
<?php elseif (empty($query_code)): ?>
<!-- 使用说明 -->
<div class="ai-section">
<h3 class="ai-section-title">
<span class="ai-section-icon"></span>
<?php _e('功能说明', 'argon'); ?>
</h3>
<ul class="ai-help-list">
<li><?php _e('每个 AI 生成内容都有唯一的 8 位识别码,用于内容溯源和验证', 'argon'); ?></li>
<li><?php _e('识别码显示在文章页面的 AI 摘要底部,点击可直接跳转到本页面', 'argon'); ?></li>
<li><?php _e('通过识别码可以查询 AI 内容的生成信息、关联文章和验证状态', 'argon'); ?></li>
<li><?php _e('系统会自动检测原文是否在 AI 内容生成后发生变更', 'argon'); ?></li>
<li><?php _e('识别码由数字和大写字母组成不包含易混淆字符I、O', 'argon'); ?></li>
</ul>
</div>
<?php endif; ?>
</div> </div>
</div> </div>
</main>
<h4 style="font-size: 15px; font-weight: 600; margin: 0 0 12px; color: var(--color-text-deeper);"><?php _e('AI 生成内容', 'argon'); ?></h4>
<div class="ai-content-box">
<?php echo esc_html($result['summary']); ?>
</div>
<h4 style="font-size: 15px; font-weight: 600; margin: 0 0 12px; color: var(--color-text-deeper);"><?php _e('生成信息', 'argon'); ?></h4>
<div class="ai-info-grid">
<div class="ai-info-item">
<span class="ai-info-label"><?php _e('AI 提供商', 'argon'); ?></span>
<span class="ai-info-value"><?php echo esc_html($result['provider_display']); ?></span>
</div>
<div class="ai-info-item">
<span class="ai-info-label"><?php _e('使用模型', 'argon'); ?></span>
<span class="ai-info-value ai-info-value-mono"><?php echo esc_html($result['model']); ?></span>
</div>
<div class="ai-info-item">
<span class="ai-info-label"><?php _e('生成时间', 'argon'); ?></span>
<span class="ai-info-value"><?php echo esc_html(date('Y-m-d H:i:s', $result['generated_time'])); ?></span>
</div>
</div>
<div class="ai-actions">
<a href="<?php echo esc_url($result['post_url']); ?>" class="btn btn-primary">
<?php _e('查看原文', 'argon'); ?>
</a>
<a href="<?php echo esc_url(get_template_directory_uri() . '/ai-summary-query.php'); ?>" class="btn btn-outline-secondary">
<?php _e('查询其他识别码', 'argon'); ?>
</a>
</div>
<?php elseif (empty($query_code)): ?>
<h4 style="font-size: 15px; font-weight: 600; margin: 0 0 12px; color: var(--color-text-deeper);"><?php _e('功能说明', 'argon'); ?></h4>
<ul class="ai-help-list">
<li><?php _e('每个 AI 生成内容都有唯一的 8 位识别码,用于内容溯源和验证', 'argon'); ?></li>
<li><?php _e('识别码显示在文章页面的 AI 摘要底部,点击可直接跳转到本页面', 'argon'); ?></li>
<li><?php _e('通过识别码可以查询 AI 内容的生成信息、关联文章和验证状态', 'argon'); ?></li>
<li><?php _e('系统会自动检测原文是否在 AI 内容生成后发生变更', 'argon'); ?></li>
<li><?php _e('识别码由数字和大写字母组成不包含易混淆字符I、O', 'argon'); ?></li>
</ul>
<?php endif; ?>
</article>
</main>
</div> </div>
<?php <?php