新增优化历史模块

This commit is contained in:
rjb
2025-10-10 23:39:54 +08:00
parent 1fba655620
commit 960a341117
56 changed files with 13344 additions and 8 deletions

View File

@@ -0,0 +1,583 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>优化历史页面测试</title>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
<style>
/* 优化历史页面样式 - 参考收藏页面设计 */
.history-container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
min-height: 100vh;
}
.history-header {
text-align: center;
color: white;
margin-bottom: 40px;
}
.history-header h1 {
font-size: 2.5rem;
margin-bottom: 10px;
text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
font-family: 'Inter', sans-serif;
font-weight: 700;
}
.history-header p {
font-size: 1.2rem;
opacity: 0.9;
font-family: 'Inter', sans-serif;
}
.history-content {
background: white;
border-radius: 20px;
padding: 40px;
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
/* 搜索和筛选区域 */
.search-filters {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
margin-bottom: 30px;
padding: 20px;
background: #f8f9fa;
border-radius: 15px;
}
.search-filters input,
.search-filters select {
padding: 12px 16px;
border: 2px solid #e1e5e9;
border-radius: 10px;
font-size: 1rem;
transition: all 0.3s ease;
font-family: 'Inter', sans-serif;
}
.search-filters input:focus,
.search-filters select:focus {
outline: none;
border-color: #3B82F6;
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.search-btn {
background: linear-gradient(135deg, #3B82F6, #1E3A8A);
color: white;
border: none;
padding: 12px 24px;
border-radius: 10px;
font-weight: 600;
transition: all 0.3s ease;
cursor: pointer;
}
.search-btn:hover {
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3);
}
/* 历史记录列表 */
.history-list {
display: grid;
gap: 20px;
}
.history-item {
background: #f8f9fa;
border: 2px solid #e1e5e9;
border-radius: 15px;
padding: 25px;
transition: all 0.3s ease;
position: relative;
}
.history-item:hover {
border-color: #3B82F6;
box-shadow: 0 5px 15px rgba(59, 130, 246, 0.1);
transform: translateY(-2px);
}
.history-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 15px;
}
.history-title {
font-size: 1.3rem;
font-weight: 700;
color: #333;
margin-bottom: 5px;
font-family: 'Inter', sans-serif;
}
.history-type {
color: #3B82F6;
font-size: 1rem;
font-weight: 600;
background: rgba(59, 130, 246, 0.1);
padding: 4px 12px;
border-radius: 20px;
}
.history-meta {
display: flex;
gap: 15px;
align-items: center;
margin-bottom: 15px;
flex-wrap: wrap;
}
.history-time {
color: #666;
font-size: 0.9rem;
display: flex;
align-items: center;
gap: 5px;
}
.history-industry {
background: #e3f2fd;
color: #1976d2;
padding: 4px 8px;
border-radius: 12px;
font-size: 0.8rem;
font-weight: 500;
}
.history-profession {
background: #f3e5f5;
color: #7b1fa2;
padding: 4px 8px;
border-radius: 12px;
font-size: 0.8rem;
font-weight: 500;
}
.history-content {
margin-bottom: 15px;
}
.history-original,
.history-optimized {
margin-bottom: 15px;
}
.history-original h4,
.history-optimized h4 {
font-size: 1rem;
font-weight: 600;
color: #333;
margin-bottom: 8px;
display: flex;
align-items: center;
gap: 8px;
}
.history-original h4::before {
content: "📝";
font-size: 1.2rem;
}
.history-optimized h4::before {
content: "✨";
font-size: 1.2rem;
}
.history-original p,
.history-optimized p {
color: #666;
line-height: 1.6;
margin: 0;
background: white;
padding: 12px;
border-radius: 8px;
border-left: 4px solid #e1e5e9;
}
.history-optimized p {
border-left-color: #3B82F6;
background: #f8faff;
}
/* 标签区域 */
.history-tags {
display: flex;
gap: 8px;
margin-bottom: 15px;
flex-wrap: wrap;
}
.tag {
background: linear-gradient(135deg, #6366F1, #8B5CF6);
color: white;
padding: 4px 12px;
border-radius: 20px;
font-size: 0.8rem;
font-weight: 500;
}
/* 评分区域 */
.history-rating {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 15px;
}
.stars {
display: flex;
gap: 2px;
}
.stars i {
color: #ddd;
font-size: 1.1rem;
transition: color 0.2s ease;
}
.stars i.active {
color: #ffc107;
}
/* 操作按钮 */
.history-actions {
display: flex;
gap: 10px;
justify-content: flex-end;
flex-wrap: wrap;
}
.action-btn {
padding: 8px 16px;
border: none;
border-radius: 8px;
font-size: 0.9rem;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 6px;
}
.copy-btn {
background: #10B981;
color: white;
}
.copy-btn:hover {
background: #059669;
transform: translateY(-1px);
}
.favorite-btn {
background: #EF4444;
color: white;
}
.favorite-btn:hover {
background: #DC2626;
transform: translateY(-1px);
}
.favorite-btn.favorited {
background: #F59E0B;
}
.favorite-btn.favorited:hover {
background: #D97706;
}
.delete-btn {
background: #6B7280;
color: white;
}
.delete-btn:hover {
background: #4B5563;
transform: translateY(-1px);
}
/* 统计卡片 */
.stats-cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
margin-bottom: 30px;
}
.stat-card {
background: linear-gradient(135deg, #3B82F6, #1E3A8A);
color: white;
padding: 20px;
border-radius: 15px;
text-align: center;
box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
}
.stat-card h3 {
font-size: 2rem;
margin-bottom: 5px;
font-weight: 700;
}
.stat-card p {
font-size: 0.9rem;
opacity: 0.9;
margin: 0;
}
/* 空状态 */
.no-history {
text-align: center;
padding: 60px 20px;
color: #666;
}
.no-history i {
font-size: 4rem;
color: #ddd;
margin-bottom: 20px;
}
.no-history h3 {
font-size: 1.5rem;
margin-bottom: 10px;
color: #333;
}
.no-history p {
font-size: 1rem;
color: #666;
}
</style>
</head>
<body>
<div class="history-container">
<div class="history-header">
<h1><i class="fas fa-history"></i> 优化历史</h1>
<p>查看和管理您的AI优化历史记录随时回顾精彩内容</p>
</div>
<div class="history-content">
<!-- 统计卡片 -->
<div class="stats-cards">
<div class="stat-card">
<h3>15</h3>
<p>总记录数</p>
</div>
<div class="stat-card">
<h3>3</h3>
<p>今日生成</p>
</div>
<div class="stat-card">
<h3>4.7</h3>
<p>平均评分</p>
</div>
<div class="stat-card">
<h3>75</h3>
<p>节省时间(分钟)</p>
</div>
</div>
<!-- 搜索和筛选 -->
<div class="search-filters">
<input type="text" placeholder="搜索历史记录...">
<select>
<option value="">所有类型</option>
<option value="提示词优化">提示词优化</option>
<option value="产品文案">产品文案</option>
<option value="商务邮件">商务邮件</option>
<option value="技术文档">技术文档</option>
</select>
<select>
<option value="">所有时间</option>
<option value="today">今天</option>
<option value="week">本周</option>
<option value="month">本月</option>
</select>
<select>
<option value="">所有评分</option>
<option value="5">5星</option>
<option value="4">4星</option>
<option value="3">3星</option>
</select>
<button class="search-btn">
<i class="fas fa-search"></i> 搜索
</button>
</div>
<!-- 历史记录列表 -->
<div class="history-list">
<!-- 示例历史记录1 -->
<div class="history-item">
<div class="history-header">
<div class="history-meta">
<span class="history-time">
<i class="fas fa-clock"></i>
2小时前
</span>
<span class="history-type">提示词优化</span>
<span class="history-industry">科技</span>
<span class="history-profession">产品经理</span>
</div>
</div>
<div class="history-content">
<div class="history-original">
<h4>原始输入</h4>
<p>请帮我写一个产品介绍我们的产品是一个AI助手可以帮助用户提高工作效率...</p>
</div>
<div class="history-optimized">
<h4>优化结果</h4>
<p>以下是专业的产品介绍模板:<br><br>【产品概述】<br>产品名称AI智能助手<br>核心功能:智能对话、任务管理、数据分析<br>目标用户:企业用户、个人用户...</p>
</div>
</div>
<div class="history-tags">
<span class="tag">逻辑强化</span>
<span class="tag">场景适配</span>
<span class="tag">结构优化</span>
</div>
<div class="history-rating">
<span>满意度:</span>
<div class="stars">
<i class="fas fa-star active"></i>
<i class="fas fa-star active"></i>
<i class="fas fa-star active"></i>
<i class="fas fa-star active"></i>
<i class="fas fa-star active"></i>
</div>
</div>
<div class="history-actions">
<button class="action-btn copy-btn">
<i class="fas fa-copy"></i> 复制
</button>
<button class="action-btn favorite-btn favorited">
<i class="fas fa-heart"></i> 已收藏
</button>
<button class="action-btn delete-btn">
<i class="fas fa-trash"></i> 删除
</button>
<button class="action-btn" style="background: #3B82F6; color: white;">
<i class="fas fa-eye"></i> 详情
</button>
</div>
</div>
<!-- 示例历史记录2 -->
<div class="history-item">
<div class="history-header">
<div class="history-meta">
<span class="history-time">
<i class="fas fa-clock"></i>
1天前
</span>
<span class="history-type">商务邮件</span>
<span class="history-industry">商务</span>
<span class="history-profession">行政助理</span>
</div>
</div>
<div class="history-content">
<div class="history-original">
<h4>原始输入</h4>
<p>如何写邮件给客户,邀请他们参加我们的产品发布会...</p>
</div>
<div class="history-optimized">
<h4>优化结果</h4>
<p>【专业商务邮件写作指南】<br><br>一、邮件结构<br>1. 主题行:简洁明确,突出要点<br>2. 称呼:根据关系选择正式或非正式<br>3. 正文:逻辑清晰,分段明确...</p>
</div>
</div>
<div class="history-tags">
<span class="tag">逻辑强化</span>
<span class="tag">场景适配</span>
</div>
<div class="history-rating">
<span>满意度:</span>
<div class="stars">
<i class="fas fa-star active"></i>
<i class="fas fa-star active"></i>
<i class="fas fa-star active"></i>
<i class="fas fa-star active"></i>
<i class="far fa-star"></i>
</div>
</div>
<div class="history-actions">
<button class="action-btn copy-btn">
<i class="fas fa-copy"></i> 复制
</button>
<button class="action-btn favorite-btn">
<i class="fas fa-heart"></i> 收藏
</button>
<button class="action-btn delete-btn">
<i class="fas fa-trash"></i> 删除
</button>
<button class="action-btn" style="background: #3B82F6; color: white;">
<i class="fas fa-eye"></i> 详情
</button>
</div>
</div>
<!-- 示例历史记录3 -->
<div class="history-item">
<div class="history-header">
<div class="history-meta">
<span class="history-time">
<i class="fas fa-clock"></i>
3天前
</span>
<span class="history-type">技术文档</span>
<span class="history-industry">IT</span>
<span class="history-profession">后端开发</span>
</div>
</div>
<div class="history-content">
<div class="history-original">
<h4>原始输入</h4>
<p>数据库设计,需要设计一个用户管理系统...</p>
</div>
<div class="history-optimized">
<h4>优化结果</h4>
<p>【数据库设计最佳实践】<br><br>一、需求分析<br>1. 业务需求梳理<br>2. 数据关系分析<br>3. 性能要求评估<br><br>二、表结构设计<br>- 主键设计自增ID或UUID...</p>
</div>
</div>
<div class="history-tags">
<span class="tag">逻辑强化</span>
<span class="tag">结构优化</span>
</div>
<div class="history-actions">
<button class="action-btn copy-btn">
<i class="fas fa-copy"></i> 复制
</button>
<button class="action-btn favorite-btn">
<i class="fas fa-heart"></i> 收藏
</button>
<button class="action-btn delete-btn">
<i class="fas fa-trash"></i> 删除
</button>
<button class="action-btn" style="background: #3B82F6; color: white;">
<i class="fas fa-eye"></i> 详情
</button>
<button class="action-btn" style="background: #F59E0B; color: white;">
<i class="fas fa-star"></i> 评分
</button>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>