更新前端静态网页获取方式,放弃使用后端获取api

This commit is contained in:
2025-09-09 10:47:51 +08:00
parent 6889ca37e5
commit 44a4f1bae1
25558 changed files with 2463152 additions and 153 deletions

332
frontend/src/styles/global.css Executable file
View File

@@ -0,0 +1,332 @@
/* 全局组件样式 */
/* 容器样式 */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 16px;
}
.mobile-container {
padding: 0 12px;
}
/* 卡片样式 */
.card {
background: rgba(255, 255, 255, 0.95);
border-radius: 16px;
box-shadow: 0 8px 32px rgba(168, 230, 207, 0.3);
overflow: hidden;
transition: all 0.3s ease;
backdrop-filter: blur(10px);
border: 1px solid rgba(168, 230, 207, 0.2);
}
.card:hover {
transform: translateY(-6px);
box-shadow: 0 12px 40px rgba(168, 230, 207, 0.4);
}
.card-header {
padding: 20px;
border-bottom: 1px solid #e5e7eb;
}
.card-body {
padding: 20px;
}
.card-footer {
padding: 16px 20px;
background: #f9fafb;
border-top: 1px solid #e5e7eb;
}
/* 按钮样式 */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 12px 24px;
border-radius: 8px;
font-weight: 500;
font-size: 14px;
transition: all 0.2s ease;
cursor: pointer;
border: none;
text-decoration: none;
min-height: 44px;
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.btn-primary:hover {
background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
transform: translateY(-1px);
}
.btn-secondary {
background: #f3f4f6;
color: #374151;
}
.btn-secondary:hover {
background: #e5e7eb;
}
.btn-success {
background: #10b981;
color: white;
}
.btn-success:hover {
background: #059669;
}
.btn-danger {
background: #ef4444;
color: white;
}
.btn-danger:hover {
background: #dc2626;
}
.btn-sm {
padding: 8px 16px;
font-size: 12px;
min-height: 36px;
}
.btn-lg {
padding: 16px 32px;
font-size: 16px;
min-height: 52px;
}
.btn-full {
width: 100%;
}
.btn-disabled {
opacity: 0.6;
cursor: not-allowed;
pointer-events: none;
}
/* 输入框样式 */
.input {
width: 100%;
padding: 12px 16px;
border: 2px solid #e5e7eb;
border-radius: 8px;
font-size: 14px;
transition: all 0.2s ease;
min-height: 44px;
}
.input:focus {
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.input-error {
border-color: #ef4444;
}
.input-error:focus {
border-color: #ef4444;
box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
/* 加载动画 */
.loading {
display: flex;
align-items: center;
justify-content: center;
padding: 40px;
}
.spinner {
width: 40px;
height: 40px;
border: 4px solid #f3f4f6;
border-top: 4px solid #667eea;
border-radius: 50%;
animation: spin 1s linear infinite;
}
.spinner-sm {
width: 20px;
height: 20px;
border-width: 2px;
}
/* 标签样式 */
.tag {
display: inline-block;
padding: 4px 12px;
background: #f3f4f6;
color: #374151;
border-radius: 16px;
font-size: 12px;
font-weight: 500;
}
.tag-primary {
background: rgba(102, 126, 234, 0.1);
color: #667eea;
}
.tag-success {
background: rgba(16, 185, 129, 0.1);
color: #10b981;
}
.tag-warning {
background: rgba(245, 158, 11, 0.1);
color: #f59e0b;
}
.tag-danger {
background: rgba(239, 68, 68, 0.1);
color: #ef4444;
}
/* 徽章样式 */
.badge {
display: inline-flex;
align-items: center;
justify-content: center;
min-width: 20px;
height: 20px;
padding: 0 6px;
background: #ef4444;
color: white;
border-radius: 10px;
font-size: 11px;
font-weight: 600;
line-height: 1;
}
/* 分割线 */
.divider {
height: 1px;
background: #e5e7eb;
margin: 16px 0;
}
/* 空状态 */
.empty-state {
text-align: center;
padding: 60px 20px;
color: #6b7280;
}
.empty-state-icon {
font-size: 48px;
margin-bottom: 16px;
opacity: 0.5;
}
.empty-state-title {
font-size: 18px;
font-weight: 600;
margin-bottom: 8px;
color: #374151;
}
.empty-state-description {
font-size: 14px;
line-height: 1.5;
}
/* 错误状态 */
.error-state {
text-align: center;
padding: 40px 20px;
color: #ef4444;
}
.error-state-icon {
font-size: 36px;
margin-bottom: 12px;
}
.error-state-title {
font-size: 16px;
font-weight: 600;
margin-bottom: 8px;
}
.error-state-description {
font-size: 14px;
color: #6b7280;
margin-bottom: 16px;
}
/* 网格布局 */
.grid {
display: grid;
gap: 16px;
}
.grid-1 {
grid-template-columns: 1fr;
}
.grid-2 {
grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
grid-template-columns: repeat(3, 1fr);
}
.grid-4 {
grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 768px) {
.grid-2,
.grid-3,
.grid-4 {
grid-template-columns: 1fr;
}
.mobile-grid-2 {
grid-template-columns: repeat(2, 1fr);
}
}
/* 间距工具 */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.pt-1 { padding-top: 4px; }
.pt-2 { padding-top: 8px; }
.pt-3 { padding-top: 12px; }
.pt-4 { padding-top: 16px; }
.pt-5 { padding-top: 20px; }
.pt-6 { padding-top: 24px; }
.pb-1 { padding-bottom: 4px; }
.pb-2 { padding-bottom: 8px; }
.pb-3 { padding-bottom: 12px; }
.pb-4 { padding-bottom: 16px; }
.pb-5 { padding-bottom: 20px; }
.pb-6 { padding-bottom: 24px; }

219
frontend/src/styles/index.css Executable file
View File

@@ -0,0 +1,219 @@
/* 全局样式重置 */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
font-size: 16px;
-webkit-text-size-adjust: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
line-height: 1.6;
color: #333;
background: #f5f7fa;
overflow-x: hidden;
}
/* 移动端适配 */
@media (max-width: 768px) {
html {
font-size: 14px;
}
}
/* 链接样式 */
a {
color: inherit;
text-decoration: none;
}
/* 按钮重置 */
button {
border: none;
background: none;
cursor: pointer;
font-family: inherit;
}
/* 输入框重置 */
input, textarea {
border: none;
outline: none;
font-family: inherit;
}
/* 列表重置 */
ul, ol {
list-style: none;
}
/* 图片响应式 */
img {
max-width: 100%;
height: auto;
}
/* 滚动条样式 */
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
background: #c1c1c1;
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: #a8a8a8;
}
/* 公共动画 */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes pulse {
0%, 100% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
/* 公共工具类 */
.fade-in {
animation: fadeIn 0.6s ease-out;
}
.pulse {
animation: pulse 2s infinite;
}
.spin {
animation: spin 1s linear infinite;
}
.text-center {
text-align: center;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.flex {
display: flex;
}
.flex-center {
display: flex;
align-items: center;
justify-content: center;
}
.flex-between {
display: flex;
align-items: center;
justify-content: space-between;
}
.flex-column {
display: flex;
flex-direction: column;
}
.hidden {
display: none;
}
.visible {
display: block;
}
/* 响应式工具类 */
.mobile-only {
display: block;
}
.desktop-only {
display: none;
}
@media (min-width: 769px) {
.mobile-only {
display: none;
}
.desktop-only {
display: block;
}
}
/* 阴影效果 */
.shadow-sm {
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.shadow-md {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.shadow-lg {
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}
/* 圆角 */
.rounded-sm {
border-radius: 4px;
}
.rounded-md {
border-radius: 8px;
}
.rounded-lg {
border-radius: 12px;
}
.rounded-xl {
border-radius: 16px;
}
.rounded-full {
border-radius: 50%;
}