新增后台管理系统(答辩用

This commit is contained in:
2026-06-24 05:07:32 +08:00
parent 2251f31524
commit 1f209e6761
98 changed files with 25099 additions and 0 deletions
+802
View File
@@ -0,0 +1,802 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Soybean 风格 · 后台管理示范</title>
<!-- Font Awesome 图标库 (免费版本) -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" />
<style>
/* ===== 全局重置 & 字体 ===== */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
background: #f6f8fc;
color: #1e293b;
display: flex;
min-height: 100vh;
}
/* ===== 侧边栏 (Soybean 风格) ===== */
.sidebar {
width: 260px;
background: #ffffff;
border-right: 1px solid #e9edf4;
display: flex;
flex-direction: column;
padding: 24px 16px;
position: fixed;
top: 0;
left: 0;
bottom: 0;
z-index: 100;
transition: all 0.2s;
box-shadow: 0 0 0 1px rgba(0,0,0,0.02);
}
/* Logo / 品牌区 */
.brand {
display: flex;
align-items: center;
gap: 10px;
padding: 0 8px 28px 8px;
border-bottom: 1px solid #f0f3f8;
margin-bottom: 20px;
}
.brand-icon {
width: 36px;
height: 36px;
background: linear-gradient(145deg, #4f7cff, #3b5fd9);
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 20px;
font-weight: 600;
box-shadow: 0 6px 12px rgba(79, 124, 255, 0.25);
}
.brand-text {
font-size: 20px;
font-weight: 600;
letter-spacing: -0.3px;
color: #0b1a33;
}
.brand-text span {
color: #4f7cff;
}
/* 导航菜单 */
.nav {
flex: 1;
display: flex;
flex-direction: column;
gap: 4px;
}
.nav-label {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #8b9ab0;
padding: 16px 12px 6px 12px;
}
.nav-item {
display: flex;
align-items: center;
gap: 14px;
padding: 10px 14px;
border-radius: 12px;
color: #3e4e62;
font-weight: 500;
font-size: 14px;
transition: all 0.15s;
cursor: default;
text-decoration: none;
position: relative;
}
.nav-item i {
width: 20px;
font-size: 16px;
color: #5b6f88;
transition: color 0.15s;
}
.nav-item:hover {
background: #f0f5ff;
color: #1e293b;
}
.nav-item:hover i {
color: #4f7cff;
}
.nav-item.active {
background: #eef3ff;
color: #1e293b;
font-weight: 600;
box-shadow: inset 3px 0 0 #4f7cff;
}
.nav-item.active i {
color: #4f7cff;
}
.nav-item .badge {
margin-left: auto;
background: #4f7cff;
color: white;
font-size: 11px;
font-weight: 600;
padding: 2px 10px;
border-radius: 20px;
}
.nav-item .badge.green {
background: #10b981;
}
/* 底部用户卡片 */
.user-card {
margin-top: 20px;
padding: 16px 14px;
background: #fafcff;
border-radius: 16px;
border: 1px solid #eef2f8;
display: flex;
align-items: center;
gap: 14px;
}
.user-avatar {
width: 44px;
height: 44px;
background: linear-gradient(135deg, #d9e2f0, #c8d3e6);
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
font-size: 18px;
color: #1e2f44;
}
.user-info {
flex: 1;
}
.user-info .name {
font-weight: 600;
font-size: 14px;
}
.user-info .role {
font-size: 12px;
color: #7a8b9f;
}
/* ===== 主内容 ===== */
.main {
margin-left: 260px;
flex: 1;
padding: 28px 36px 36px 36px;
min-height: 100vh;
background: #f6f8fc;
}
/* 头部 */
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32px;
flex-wrap: wrap;
gap: 16px;
}
.header-title h1 {
font-size: 26px;
font-weight: 600;
letter-spacing: -0.4px;
color: #0b1a33;
}
.header-title p {
color: #6b7d94;
font-size: 14px;
margin-top: 4px;
}
.header-actions {
display: flex;
align-items: center;
gap: 12px;
}
.header-actions .search-box {
background: white;
padding: 8px 16px;
border-radius: 40px;
border: 1px solid #e2e8f0;
display: flex;
align-items: center;
gap: 10px;
transition: 0.15s;
}
.header-actions .search-box i {
color: #8b9ab0;
}
.header-actions .search-box input {
border: none;
outline: none;
font-size: 14px;
background: transparent;
width: 170px;
}
.header-actions .search-box:focus-within {
border-color: #4f7cff;
box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.15);
}
.btn {
padding: 9px 20px;
border-radius: 40px;
border: none;
background: white;
font-weight: 500;
font-size: 13px;
color: #1e293b;
border: 1px solid #e2e8f0;
display: inline-flex;
align-items: center;
gap: 8px;
cursor: default;
transition: 0.15s;
background: #ffffff;
}
.btn-primary {
background: #4f7cff;
border: 1px solid #4f7cff;
color: white;
box-shadow: 0 4px 10px rgba(79, 124, 255, 0.25);
}
.btn-primary i {
color: white;
}
.btn-primary:hover {
background: #3f6ae0;
border-color: #3f6ae0;
}
.btn-outline {
background: transparent;
border: 1px solid #e2e8f0;
}
/* 统计卡片网格 */
.stats-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20px;
margin-bottom: 28px;
}
.stat-card {
background: white;
padding: 20px 22px;
border-radius: 20px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
border: 1px solid #edf2f9;
transition: 0.15s;
}
.stat-card:hover {
border-color: #d0dcec;
box-shadow: 0 8px 18px rgba(0, 0, 0, 0.03);
}
.stat-card .label {
font-size: 13px;
font-weight: 500;
color: #6b7d94;
letter-spacing: 0.2px;
}
.stat-card .value {
font-size: 28px;
font-weight: 700;
color: #0b1a33;
margin: 8px 0 4px;
}
.stat-card .change {
font-size: 13px;
display: flex;
align-items: center;
gap: 6px;
color: #10b981;
}
.stat-card .change.down {
color: #ef4444;
}
.stat-card .change i {
font-size: 13px;
}
/* 图表 & 表格卡片混合区域 */
.content-grid {
display: grid;
grid-template-columns: 1.6fr 1fr;
gap: 24px;
margin-bottom: 28px;
}
.card {
background: white;
border-radius: 20px;
border: 1px solid #edf2f9;
padding: 22px 24px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.card-header h3 {
font-weight: 600;
font-size: 16px;
color: #0b1a33;
}
.card-header a {
color: #4f7cff;
font-size: 13px;
font-weight: 500;
text-decoration: none;
}
.chart-placeholder {
width: 100%;
height: 140px;
background: #f7faff;
border-radius: 16px;
display: flex;
align-items: flex-end;
justify-content: space-around;
padding: 12px 6px 0 6px;
margin-top: 4px;
}
.bar {
width: 28px;
background: #4f7cff;
border-radius: 8px 8px 4px 4px;
height: calc(30% + 20% * var(--h, 0.5));
transition: 0.2s;
min-height: 12px;
}
.bar:nth-child(1) { --h: 0.6; height: 60%; }
.bar:nth-child(2) { --h: 0.9; height: 90%; }
.bar:nth-child(3) { --h: 0.4; height: 40%; }
.bar:nth-child(4) { --h: 0.75; height: 75%; }
.bar:nth-child(5) { --h: 0.5; height: 50%; }
.bar:nth-child(6) { --h: 0.85; height: 85%; }
.bar:nth-child(7) { --h: 0.65; height: 65%; }
.bar:nth-child(8) { --h: 0.45; height: 45%; }
.bar.alt {
background: #d9e3f8;
}
.bar.alt:nth-child(2) { --h: 0.7; height: 70%; }
.bar.alt:nth-child(5) { --h: 0.55; height: 55%; }
/* 待办 / 活动列表 */
.activity-list {
display: flex;
flex-direction: column;
gap: 14px;
}
.activity-item {
display: flex;
align-items: center;
gap: 14px;
padding: 6px 0;
border-bottom: 1px solid #f1f5fa;
}
.activity-item:last-child {
border-bottom: none;
}
.activity-dot {
width: 10px;
height: 10px;
border-radius: 10px;
background: #4f7cff;
flex-shrink: 0;
}
.activity-dot.green { background: #10b981; }
.activity-dot.orange { background: #f59e0b; }
.activity-dot.pink { background: #ec4899; }
.activity-content {
flex: 1;
}
.activity-content .title {
font-weight: 500;
font-size: 14px;
}
.activity-content .time {
font-size: 12px;
color: #7b8da3;
}
/* 表格区域 (全宽) */
.table-wrapper {
background: white;
border-radius: 20px;
border: 1px solid #edf2f9;
padding: 20px 24px 8px 24px;
margin-top: 8px;
}
.table-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.table-header h3 {
font-weight: 600;
font-size: 16px;
}
table {
width: 100%;
border-collapse: collapse;
font-size: 14px;
}
th {
text-align: left;
padding: 12px 8px 12px 0;
font-weight: 600;
color: #4e627c;
border-bottom: 1px solid #eef2f8;
}
td {
padding: 14px 8px 14px 0;
border-bottom: 1px solid #f1f5fa;
color: #1e2f44;
}
tr:last-child td {
border-bottom: none;
}
.status-badge {
background: #e6f0ff;
color: #4f7cff;
padding: 4px 12px;
border-radius: 40px;
font-size: 12px;
font-weight: 500;
display: inline-block;
}
.status-badge.green {
background: #e0f5ec;
color: #0b8b5e;
}
.status-badge.orange {
background: #fff3e0;
color: #b26e00;
}
/* ===== 响应式 ===== */
@media (max-width: 1024px) {
.stats-grid {
grid-template-columns: repeat(2, 1fr);
}
.content-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 768px) {
.sidebar {
width: 72px;
padding: 16px 8px;
}
.brand-text, .nav-label, .nav-item span:not(.badge), .user-info, .badge {
display: none;
}
.nav-item {
justify-content: center;
padding: 12px;
}
.nav-item i {
font-size: 20px;
margin: 0;
}
.user-card {
justify-content: center;
padding: 8px;
}
.user-avatar {
width: 36px;
height: 36px;
font-size: 14px;
}
.main {
margin-left: 72px;
padding: 20px 16px;
}
.header-title h1 {
font-size: 22px;
}
.stats-grid {
grid-template-columns: 1fr 1fr;
gap: 12px;
}
.stat-card {
padding: 16px;
}
.stat-card .value {
font-size: 22px;
}
}
@media (max-width: 480px) {
.stats-grid {
grid-template-columns: 1fr;
}
.header-actions .search-box input {
width: 100px;
}
.btn span {
display: none;
}
}
</style>
</head>
<body>
<!-- ===== 侧边栏 ===== -->
<aside class="sidebar">
<div class="brand">
<div class="brand-icon">S</div>
<div class="brand-text">Soy<span>bean</span></div>
</div>
<nav class="nav">
<div class="nav-label">概览</div>
<a class="nav-item active" href="#">
<i class="fas fa-chart-simple"></i>
<span>仪表盘</span>
</a>
<a class="nav-item" href="#">
<i class="fas fa-chart-pie"></i>
<span>分析</span>
</a>
<div class="nav-label">管理</div>
<a class="nav-item" href="#">
<i class="fas fa-users"></i>
<span>用户</span>
<span class="badge">12</span>
</a>
<a class="nav-item" href="#">
<i class="fas fa-shopping-bag"></i>
<span>订单</span>
<span class="badge green">8</span>
</a>
<a class="nav-item" href="#">
<i class="fas fa-box"></i>
<span>产品</span>
</a>
<a class="nav-item" href="#">
<i class="fas fa-gear"></i>
<span>设置</span>
</a>
</nav>
<div class="user-card">
<div class="user-avatar">JD</div>
<div class="user-info">
<div class="name">John Doe</div>
<div class="role">管理员</div>
</div>
<i class="fas fa-ellipsis-v" style="color:#8b9ab0; cursor:default;"></i>
</div>
</aside>
<!-- ===== 主内容 ===== -->
<main class="main">
<!-- 头部 -->
<header class="header">
<div class="header-title">
<h1>仪表盘</h1>
<p>欢迎回来,这是您的数据概览</p>
</div>
<div class="header-actions">
<div class="search-box">
<i class="fas fa-search"></i>
<input type="text" placeholder="搜索..." />
</div>
<button class="btn btn-primary"><i class="fas fa-plus"></i><span>新建</span></button>
<button class="btn btn-outline"><i class="fas fa-bell"></i></button>
</div>
</header>
<!-- 统计卡片 -->
<section class="stats-grid">
<div class="stat-card">
<div class="label">总用户</div>
<div class="value">12,486</div>
<div class="change"><i class="fas fa-arrow-up"></i> 12.5%</div>
</div>
<div class="stat-card">
<div class="label">总收入</div>
<div class="value">$84,392</div>
<div class="change"><i class="fas fa-arrow-up"></i> 8.2%</div>
</div>
<div class="stat-card">
<div class="label">订单量</div>
<div class="value">3,211</div>
<div class="change down"><i class="fas fa-arrow-down"></i> 2.1%</div>
</div>
<div class="stat-card">
<div class="label">转化率</div>
<div class="value">24.8%</div>
<div class="change"><i class="fas fa-arrow-up"></i> 4.3%</div>
</div>
</section>
<!-- 图表 + 活动 -->
<section class="content-grid">
<div class="card">
<div class="card-header">
<h3><i class="fas fa-chart-line" style="margin-right:8px; color:#4f7cff;"></i> 周趋势</h3>
<a href="#">查看详情</a>
</div>
<div class="chart-placeholder">
<div class="bar"></div>
<div class="bar alt"></div>
<div class="bar"></div>
<div class="bar alt"></div>
<div class="bar"></div>
<div class="bar alt"></div>
<div class="bar"></div>
<div class="bar alt"></div>
</div>
<div style="display:flex; justify-content:space-between; font-size:12px; color:#7b8da3; margin-top:8px; padding:0 4px;">
<span></span><span></span><span></span><span></span><span></span><span></span><span></span>
</div>
</div>
<div class="card">
<div class="card-header">
<h3><i class="fas fa-clock" style="margin-right:8px; color:#4f7cff;"></i> 最近动态</h3>
<a href="#">全部</a>
</div>
<div class="activity-list">
<div class="activity-item">
<span class="activity-dot green"></span>
<div class="activity-content">
<div class="title">新用户注册</div>
<div class="time">15分钟前</div>
</div>
</div>
<div class="activity-item">
<span class="activity-dot orange"></span>
<div class="activity-content">
<div class="title">订单 #10234 已完成</div>
<div class="time">1小时前</div>
</div>
</div>
<div class="activity-item">
<span class="activity-dot pink"></span>
<div class="activity-content">
<div class="title">系统更新 v2.5.0</div>
<div class="time">3小时前</div>
</div>
</div>
<div class="activity-item">
<span class="activity-dot"></span>
<div class="activity-content">
<div class="title">新评论:产品 X</div>
<div class="time">5小时前</div>
</div>
</div>
</div>
</div>
</section>
<!-- 表格 -->
<div class="table-wrapper">
<div class="table-header">
<h3><i class="fas fa-list-ul" style="margin-right:8px; color:#4f7cff;"></i> 最新订单</h3>
<a href="#" style="color:#4f7cff; font-size:13px; font-weight:500; text-decoration:none;">管理订单</a>
</div>
<table>
<thead>
<tr>
<th>订单号</th>
<th>客户</th>
<th>金额</th>
<th>状态</th>
<th>日期</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>#10234</strong></td>
<td>张 伟</td>
<td>$129.00</td>
<td><span class="status-badge green">已完成</span></td>
<td>2026-06-15</td>
</tr>
<tr>
<td><strong>#10233</strong></td>
<td>李 娜</td>
<td>$89.50</td>
<td><span class="status-badge">处理中</span></td>
<td>2026-06-15</td>
</tr>
<tr>
<td><strong>#10232</strong></td>
<td>王 强</td>
<td>$245.00</td>
<td><span class="status-badge orange">待付款</span></td>
<td>2026-06-14</td>
</tr>
<tr>
<td><strong>#10231</strong></td>
<td>陈 丽</td>
<td>$54.90</td>
<td><span class="status-badge green">已完成</span></td>
<td>2026-06-14</td>
</tr>
</tbody>
</table>
<div style="padding:16px 0 8px 0; font-size:13px; color:#7b8da3; text-align:right;">
显示 4 条 / 共 23 条
</div>
</div>
<!-- 底部留白 -->
<div style="height:20px;"></div>
</main>
</body>
</html>