feat: 新增知资札记工具及相关功能

1. 新增知资札记完整站点:包含首页、详情页、管理后台
2. 添加站点图标、鉴权配置与后端API鉴权逻辑
3. 在市场页面新增知资札记入口跳转
4. 新增经典乡村音乐播放列表文件
5. 临时添加养生谚语批量导入脚本
This commit is contained in:
yangxiangyuan
2026-07-19 20:45:41 +08:00
parent 6a043687f5
commit 421a8aa1f7
20 changed files with 3752 additions and 14 deletions
+245
View File
@@ -0,0 +1,245 @@
/* ═══════════════════════════════════════════════════════════
知资札记 - 后台CMS管理样式
主色:#162A46 墨蓝 | 删除红:#D94452
═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
font-family: 'Microsoft YaHei', 'Source Han Sans CN', -apple-system, sans-serif;
color: #333; background: #F5F6FA; line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, select { font-family: inherit; outline: none; }
/* ── 布局 ── */
.za-layout { display: flex; min-height: 100vh; }
/* ── 左侧菜单 ── */
.za-sidebar {
width: 220px; min-width: 220px; background: #162A46; color: #fff;
padding: 20px 0; position: fixed; top: 0; left: 0; bottom: 0;
overflow-y: auto; z-index: 100;
}
.za-sidebar .sb-logo {
font-size: 1.1rem; font-weight: 700; letter-spacing: 2px;
padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.1);
margin-bottom: 12px;
}
.za-sidebar .sb-menu { list-style: none; }
.za-sidebar .sb-menu li a {
display: flex; align-items: center; gap: 8px;
padding: 10px 20px; color: rgba(255,255,255,0.7);
font-size: 0.9rem; transition: all 0.2s;
}
.za-sidebar .sb-menu li a:hover,
.za-sidebar .sb-menu li a.active { color: #fff; background: rgba(255,255,255,0.08); }
.za-sidebar .sb-menu .sub-menu { padding-left: 16px; }
.za-sidebar .sb-menu .sub-menu a { font-size: 0.82rem; padding: 7px 20px; }
/* ── 主内容区 ── */
.za-main { flex: 1; margin-left: 220px; padding: 20px; }
/* ── 顶部操作栏 ── */
.za-toolbar {
background: #fff; border-radius: 8px; padding: 16px;
margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.za-toolbar .search-box {
display: flex; align-items: center; border: 1px solid #E0E4E8;
border-radius: 6px; padding: 6px 12px; flex: 1; min-width: 200px;
}
.za-toolbar .search-box input {
border: none; flex: 1; font-size: 0.85rem; background: transparent;
}
.za-toolbar .search-box button { background: transparent; color: #999; font-size: 0.9rem; }
.za-toolbar select {
border: 1px solid #E0E4E8; border-radius: 6px;
padding: 7px 12px; font-size: 0.85rem; background: #fff;
}
.za-toolbar .btn {
padding: 7px 16px; border-radius: 6px; font-size: 0.85rem;
font-weight: 500; transition: all 0.2s;
}
.za-toolbar .btn-primary { background: #162A46; color: #fff; }
.za-toolbar .btn-primary:hover { background: #1E3A5F; }
.za-toolbar .btn-danger { background: #D94452; color: #fff; }
.za-toolbar .btn-danger:hover { background: #C0392B; }
.za-toolbar .btn-outline { background: #fff; color: #162A46; border: 1px solid #162A46; }
.za-toolbar .btn-outline:hover { background: #F0F4F8; }
.za-toolbar .btn:disabled { opacity: 0.5; cursor: not-allowed; }
/* ── 表格 ── */
.za-table-wrap {
background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
overflow: hidden;
}
.za-table {
width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.za-table thead { background: #F8FAFB; }
.za-table th {
padding: 12px 14px; text-align: left; font-weight: 600;
color: #666; border-bottom: 2px solid #E0E4E8;
white-space: nowrap; font-size: 0.8rem;
}
.za-table td {
padding: 10px 14px; border-bottom: 1px solid #F0F2F5;
vertical-align: middle;
}
.za-table tbody tr:hover { background: #F8FAFB; }
.za-table .cell-title {
max-width: 240px; white-space: nowrap; overflow: hidden;
text-overflow: ellipsis; cursor: default;
}
.za-table .cell-cover {
width: 60px; height: 40px; border-radius: 4px; overflow: hidden;
background: #E8EDF2; display: flex; align-items: center; justify-content: center;
}
.za-table .cell-cover img { width: 100%; height: 100%; object-fit: cover; }
.za-table .cell-cover .text-icon {
width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
background: #162A46; color: #fff; font-size: 0.8rem; font-weight: 700;
}
.za-table .type-badge {
display: inline-block; padding: 2px 8px; border-radius: 10px;
font-size: 0.72rem; font-weight: 500;
}
.za-table .type-badge.text { background: #E8F0FE; color: #1E3A5F; }
.za-table .type-badge.image { background: #E8F5F0; color: #467974; }
.za-table .status-badge {
display: inline-block; padding: 2px 10px; border-radius: 10px;
font-size: 0.72rem; font-weight: 500;
}
.za-table .status-badge.normal { background: #E8F5E9; color: #2E7D32; }
.za-table .status-badge.offline { background: #FFF3E0; color: #E65100; }
.za-table .actions { display: flex; gap: 6px; }
.za-table .actions button {
padding: 4px 10px; border-radius: 4px; font-size: 0.75rem;
transition: all 0.2s;
}
.za-table .actions .act-preview { background: #E8F0FE; color: #1E3A5F; }
.za-table .actions .act-preview:hover { background: #D0E0FC; }
.za-table .actions .act-edit { background: #E8F5F0; color: #467974; }
.za-table .actions .act-edit:hover { background: #D0EBE0; }
.za-table .actions .act-toggle { background: #FFF3E0; color: #E65100; }
.za-table .actions .act-toggle:hover { background: #FFE0B2; }
.za-table .actions .act-delete { background: #FFEBEE; color: #D94452; }
.za-table .actions .act-delete:hover { background: #FFCDD2; }
/* ── 分页 ── */
.za-pagination {
display: flex; align-items: center; justify-content: space-between;
padding: 12px 16px; background: #fff; border-top: 1px solid #F0F2F5;
font-size: 0.85rem; color: #666;
}
.za-pagination .page-btns { display: flex; gap: 4px; align-items: center; }
.za-pagination .page-btns button {
padding: 5px 10px; border-radius: 4px; font-size: 0.8rem;
background: #fff; border: 1px solid #E0E4E8; color: #333;
transition: all 0.2s;
}
.za-pagination .page-btns button:hover:not(:disabled) { background: #F0F4F8; }
.za-pagination .page-btns button.active { background: #162A46; color: #fff; border-color: #162A46; }
.za-pagination .page-btns button:disabled { opacity: 0.4; cursor: not-allowed; }
.za-pagination select { border: 1px solid #E0E4E8; border-radius: 4px; padding: 4px 8px; }
/* ── 弹窗 ── */
.za-modal-overlay {
position: fixed; inset: 0; z-index: 5000;
background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center;
}
.za-modal-overlay.hidden { display: none; }
.za-modal {
background: #fff; border-radius: 12px; padding: 24px;
max-width: 460px; width: 90%; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.za-modal h3 { margin-bottom: 12px; color: #333; font-size: 1.05rem; }
.za-modal .modal-body { font-size: 0.85rem; color: #666; margin-bottom: 20px; line-height: 1.6; }
.za-modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.za-modal .btn {
padding: 8px 20px; border-radius: 6px; font-size: 0.85rem; font-weight: 500;
}
.za-modal .btn-primary { background: #162A46; color: #fff; }
.za-modal .btn-primary:hover { background: #1E3A5F; }
.za-modal .btn-danger { background: #D94452; color: #fff; }
.za-modal .btn-danger:hover { background: #C0392B; }
.za-modal .btn-cancel { background: #F0F2F5; color: #666; }
.za-modal .btn-cancel:hover { background: #E0E4E8; }
/* ── Toast ── */
.za-toast {
position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
z-index: 9999; padding: 10px 24px; border-radius: 8px;
font-size: 0.85rem; color: #fff; opacity: 0;
transition: opacity 0.3s; pointer-events: none;
}
.za-toast.show { opacity: 1; }
.za-toast.info { background: #3B82F6; }
.za-toast.success { background: #10B981; }
.za-toast.error { background: #EF4444; }
/* ── 新增/编辑表单弹窗 ── */
.za-modal.form-modal { max-width: 700px; max-height: 85vh; overflow-y: auto; }
.za-modal .form-group { margin-bottom: 14px; }
.za-modal .form-group label {
display: block; font-size: 0.82rem; font-weight: 600;
color: #555; margin-bottom: 4px;
}
.za-modal .form-group input,
.za-modal .form-group select,
.za-modal .form-group textarea {
width: 100%; padding: 8px 12px; border: 1px solid #E0E4E8;
border-radius: 6px; font-size: 0.85rem; transition: border-color 0.2s;
}
.za-modal .form-group input:focus,
.za-modal .form-group textarea:focus,
.za-modal .form-group select:focus { border-color: #162A46; }
.za-modal .form-group textarea { min-height: 200px; resize: vertical; font-family: inherit; }
.za-modal .form-group .tag-input {
display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
border: 1px solid #E0E4E8; border-radius: 6px; padding: 6px;
min-height: 38px;
}
.za-modal .form-group .tag-input .tag-chip {
display: inline-flex; align-items: center; gap: 4px;
padding: 2px 8px; border-radius: 10px; font-size: 0.75rem;
background: #E8F0FE; color: #1E3A5F;
}
.za-modal .form-group .tag-input .tag-chip .remove-tag {
background: transparent; color: #1E3A5F; font-size: 0.8rem; padding: 0; cursor: pointer;
}
.za-modal .form-group .tag-input input {
border: none; flex: 1; min-width: 80px; padding: 4px; font-size: 0.82rem;
}
/* ── 图片上传预览 ── */
.za-modal .form-group .upload-area { margin-top: 4px; }
.za-modal .form-group .upload-preview {
display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}
.za-modal .form-group .preview-item {
position: relative; width: 80px; height: 80px;
border-radius: 6px; overflow: hidden; border: 1px solid #E0E4E8;
}
.za-modal .form-group .preview-item img {
width: 100%; height: 100%; object-fit: cover;
}
.za-modal .form-group .preview-item .preview-remove {
position: absolute; top: 2px; right: 2px;
width: 18px; height: 18px; border-radius: 50%;
background: rgba(0,0,0,0.5); color: #fff;
font-size: 0.7rem; display: flex; align-items: center; justify-content: center;
padding: 0; line-height: 1;
}
/* ── 响应式 ── */
@media (max-width: 900px) {
.za-sidebar { display: none; }
.za-main { margin-left: 0; }
.za-table { font-size: 0.78rem; }
.za-table th, .za-table td { padding: 8px 8px; }
.za-table .cell-title { max-width: 120px; }
}