feat: 小程序UI重构为Apple设计系统并添加tabBar

- 全局样式重构为Apple Design System风格
- 添加底部tabBar导航(首页/发布/历史/私信/我的)
- 更紧凑的spacing和更小的字体尺寸
- pill圆角按钮和状态标签
- Action Blue (#0066cc) 单一accent色
- 添加tabBar图标资源

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
刘正航
2026-05-01 12:06:37 +08:00
parent f5b706d892
commit f7fdc635c7
17 changed files with 404 additions and 272 deletions

View File

@@ -1,13 +1,13 @@
{ {
"pages": [ "pages": [
"pages/login/index",
"pages/register/index",
"pages/home/index", "pages/home/index",
"pages/detect/index", "pages/detect/index",
"pages/batch/index",
"pages/history/index", "pages/history/index",
"pages/inbox/index", "pages/inbox/index",
"pages/profile/index", "pages/profile/index",
"pages/login/index",
"pages/register/index",
"pages/batch/index",
"pages/admin-dashboard/index", "pages/admin-dashboard/index",
"pages/admin-review/index", "pages/admin-review/index",
"pages/admin-users/index", "pages/admin-users/index",
@@ -15,11 +15,49 @@
], ],
"window": { "window": {
"navigationBarTitleText": "内容风控平台", "navigationBarTitleText": "内容风控平台",
"navigationBarBackgroundColor": "#0A1A2D", "navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "white", "navigationBarTextStyle": "black",
"backgroundTextStyle": "light", "backgroundTextStyle": "dark",
"backgroundColor": "#EEF3F8" "backgroundColor": "#f5f5f7"
},
"tabBar": {
"color": "#86868b",
"selectedColor": "#0066cc",
"backgroundColor": "#ffffff",
"borderStyle": "white",
"list": [
{
"pagePath": "pages/home/index",
"text": "首页",
"iconPath": "assets/icons/home.png",
"selectedIconPath": "assets/icons/home-active.png"
},
{
"pagePath": "pages/detect/index",
"text": "发布",
"iconPath": "assets/icons/publish.png",
"selectedIconPath": "assets/icons/publish-active.png"
},
{
"pagePath": "pages/history/index",
"text": "历史",
"iconPath": "assets/icons/history.png",
"selectedIconPath": "assets/icons/history-active.png"
},
{
"pagePath": "pages/inbox/index",
"text": "私信",
"iconPath": "assets/icons/inbox.png",
"selectedIconPath": "assets/icons/inbox-active.png"
},
{
"pagePath": "pages/profile/index",
"text": "我的",
"iconPath": "assets/icons/profile.png",
"selectedIconPath": "assets/icons/profile-active.png"
}
]
}, },
"style": "v2", "style": "v2",
"sitemapLocation": "sitemap.json" "sitemapLocation": "sitemap.json"
} }

View File

@@ -1,74 +1,99 @@
/** app.wxss - xAI Brutalist Design System */ /** app.wxss - Apple Design System (Compact) */
page { page {
--bg-dark: #1f2228; /* Background Colors */
--bg-surface: rgba(255, 255, 255, 0.03); --bg-canvas: #ffffff;
--bg-hover: rgba(255, 255, 255, 0.08); --bg-parchment: #f5f5f7;
--bg-pearl: #fafafc;
--bg-nav: #000000;
--text-primary: #ffffff; /* Text Colors */
--text-secondary: rgba(255, 255, 255, 0.7); --text-primary: #1d1d1f;
--text-muted: rgba(255, 255, 255, 0.5); --text-secondary: #86868b;
--text-disabled: rgba(255, 255, 255, 0.3); --text-muted: #cccccc;
--text-dark-surface: #ffffff;
--text-fine-print: #7a7a7a;
--border-default: rgba(255, 255, 255, 0.1); /* Accent Colors */
--border-strong: rgba(255, 255, 255, 0.2); --accent-primary: #0066cc;
--accent-focus: #0071e3;
--accent-link: #2997ff;
--focus-ring: rgb(59, 130, 246); /* Status Colors (Apple System) */
--status-spam: #ff3b30;
--status-ham: #34c759;
--status-warn: #ff9500;
--status-pending: #8e8e93;
/* Border Colors */
--border-light: #f0f0f0;
--border-medium: #e0e0e0;
/* Radius */
--radius-none: 0rpx; --radius-none: 0rpx;
--radius-subtle: 8rpx; --radius-sm: 12rpx;
--radius-md: 16rpx;
--radius-lg: 24rpx;
--radius-pill: 9999rpx;
/* Spacing (Compact) */
--spacing-xs: 8rpx; --spacing-xs: 8rpx;
--spacing-sm: 16rpx; --spacing-sm: 16rpx;
--spacing-md: 24rpx; --spacing-md: 24rpx;
--spacing-lg: 48rpx; --spacing-lg: 48rpx;
--spacing-xl: 96rpx; --spacing-xl: 64rpx;
/* Typography */
--font-display: 'PingFang SC', 'SF Pro Display', -apple-system, sans-serif;
--font-text: 'PingFang SC', 'SF Pro Text', -apple-system, sans-serif;
min-height: 100%; min-height: 100%;
color: var(--text-primary); color: var(--text-primary);
font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif; font-family: var(--font-text);
background: var(--bg-dark); font-size: 28rpx;
line-height: 1.4;
background: var(--bg-parchment);
} }
.container { .container {
position: relative; position: relative;
padding: var(--spacing-md); padding: var(--spacing-sm);
padding-bottom: calc(var(--spacing-lg) + env(safe-area-inset-bottom)); padding-bottom: calc(var(--spacing-md) + env(safe-area-inset-bottom));
} }
/* Hero Section */ /* Hero Section */
.hero { .hero {
position: relative; position: relative;
padding: var(--spacing-lg) 0; padding: var(--spacing-md) 0;
text-align: center; text-align: center;
border-bottom: 1px solid var(--border-default);
} }
.hero-badge { .hero-badge {
display: inline-block; display: inline-block;
padding: var(--spacing-xs) var(--spacing-sm); padding: 6rpx 12rpx;
border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
color: var(--text-primary); background: var(--bg-pearl);
font-family: 'SF Mono', 'Consolas', monospace; color: var(--accent-primary);
font-size: 22rpx; font-family: var(--font-text);
letter-spacing: 1rpx; font-size: 20rpx;
text-transform: uppercase; font-weight: 600;
} }
.hero-title { .hero-title {
margin-top: var(--spacing-md); margin-top: var(--spacing-sm);
font-size: 56rpx; font-family: var(--font-display);
font-weight: 300; font-size: 48rpx;
letter-spacing: 2rpx; font-weight: 600;
letter-spacing: -1rpx;
color: var(--text-primary); color: var(--text-primary);
line-height: 1.3; line-height: 1.1;
} }
.hero-sub { .hero-sub {
margin-top: var(--spacing-sm); margin-top: var(--spacing-xs);
font-size: 28rpx; font-size: 26rpx;
color: var(--text-secondary); color: var(--text-secondary);
line-height: 1.5; line-height: 1.4;
max-width: 600rpx; max-width: 600rpx;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
@@ -77,68 +102,67 @@ page {
.hero-meta { .hero-meta {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: var(--spacing-xs); gap: 8rpx;
margin-top: var(--spacing-md); margin-top: var(--spacing-sm);
justify-content: center;
} }
.hero-metric { .hero-metric {
padding: var(--spacing-xs) var(--spacing-sm); padding: 6rpx 12rpx;
font-size: 24rpx; font-size: 22rpx;
color: var(--text-muted); color: var(--text-secondary);
border: 1px solid var(--border-default); border-radius: var(--radius-sm);
background: var(--bg-canvas);
} }
/* Cards */ /* Cards */
.card { .card {
margin-top: var(--spacing-md); margin-top: var(--spacing-sm);
padding: var(--spacing-md); padding: var(--spacing-sm);
background: transparent; background: var(--bg-canvas);
border: 1px solid var(--border-default); border: 1rpx solid var(--border-medium);
border-radius: var(--radius-lg);
overflow: hidden; overflow: hidden;
} }
.card:active {
border-color: var(--border-strong);
}
.card-title { .card-title {
margin-bottom: var(--spacing-sm); margin-bottom: var(--spacing-xs);
color: var(--text-primary); color: var(--text-primary);
font-family: var(--font-display);
font-size: 32rpx; font-size: 32rpx;
font-weight: 400; font-weight: 600;
letter-spacing: 0.5rpx;
} }
.card-desc { .card-desc {
margin-bottom: var(--spacing-sm); margin-bottom: var(--spacing-xs);
color: var(--text-secondary); color: var(--text-secondary);
font-size: 26rpx; font-size: 24rpx;
line-height: 1.5; line-height: 1.4;
} }
/* Divider */ /* Divider */
.glass-divider { .glass-divider {
margin: var(--spacing-sm) 0; margin: var(--spacing-xs) 0;
height: 1px; height: 1rpx;
background: var(--border-default); background: var(--border-light);
} }
/* Fields */ /* Fields */
.field { .field {
margin-top: var(--spacing-sm); margin-top: var(--spacing-xs);
} }
.field-label { .field-label {
display: block; display: block;
margin-bottom: var(--spacing-xs); margin-bottom: 6rpx;
color: var(--text-secondary); color: var(--text-secondary);
font-size: 26rpx; font-size: 24rpx;
} }
.field-help { .field-help {
margin-top: var(--spacing-xs); margin-top: 6rpx;
color: var(--text-muted); color: var(--text-secondary);
font-size: 24rpx; font-size: 22rpx;
} }
/* Inputs */ /* Inputs */
@@ -146,39 +170,40 @@ page {
.textarea { .textarea {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
min-height: 80rpx; min-height: 72rpx;
padding: 0 var(--spacing-sm); padding: 0 var(--spacing-sm);
background: transparent; background: var(--bg-parchment);
border: 1px solid var(--border-strong); border: 1rpx solid var(--border-light);
border-radius: var(--radius-md);
color: var(--text-primary); color: var(--text-primary);
font-size: 32rpx; font-size: 28rpx;
line-height: 80rpx; line-height: 72rpx;
} }
.input:focus, .input:focus,
.textarea:focus { .textarea:focus {
outline: none; outline: none;
border-color: var(--focus-ring); border-color: var(--accent-primary);
} }
.textarea { .textarea {
min-height: 200rpx; min-height: 160rpx;
padding-top: var(--spacing-sm); padding-top: var(--spacing-xs);
line-height: 1.5; line-height: 1.4;
} }
.picker-value { .picker-value {
min-width: 180rpx; min-width: 140rpx;
text-align: right; text-align: right;
color: var(--text-primary); color: var(--accent-primary);
font-size: 28rpx; font-size: 26rpx;
} }
/* Buttons */ /* Buttons */
.btn-row { .btn-row {
display: flex; display: flex;
gap: var(--spacing-sm); gap: var(--spacing-xs);
margin-top: var(--spacing-sm); margin-top: var(--spacing-xs);
} }
.btn-row .btn { .btn-row .btn {
@@ -187,17 +212,16 @@ page {
} }
.btn { .btn {
margin-top: var(--spacing-sm); margin-top: var(--spacing-xs);
padding: var(--spacing-sm) var(--spacing-md); padding: 16rpx 32rpx;
border: none; border: none;
border-radius: 0; border-radius: var(--radius-pill);
font-family: 'SF Mono', 'Consolas', monospace; font-family: var(--font-text);
font-size: 28rpx; font-size: 26rpx;
font-weight: 400; font-weight: 400;
letter-spacing: 2rpx; color: var(--text-dark-surface);
text-transform: uppercase; background: var(--accent-primary);
color: var(--bg-dark); transition: transform 0.1s ease;
background: var(--text-primary);
} }
button.btn::after { button.btn::after {
@@ -205,34 +229,45 @@ button.btn::after {
} }
.btn:active { .btn:active {
opacity: 0.9; transform: scale(0.95);
} }
.btn[disabled] { .btn[disabled] {
opacity: 0.3; opacity: 0.3;
transform: none;
}
/* Primary Button */
.btn-primary {
color: var(--text-dark-surface);
background: var(--accent-primary);
} }
/* Ghost Button */ /* Ghost Button */
.btn-ghost { .btn-ghost {
color: var(--text-primary); color: var(--accent-primary);
background: transparent; background: transparent;
border: 1px solid var(--border-strong); border: 1rpx solid var(--accent-primary);
} }
.btn-ghost:active { .btn-ghost:active {
background: var(--bg-hover); background: rgba(0, 102, 204, 0.1);
}
.btn-ghost[disabled] {
opacity: 0.3;
border-color: var(--text-secondary);
color: var(--text-secondary);
} }
/* Accent Button */ /* Accent Button */
.btn-accent { .btn-accent {
color: var(--text-primary); color: var(--accent-primary);
background: transparent; background: var(--bg-pearl);
border: 1px solid var(--border-strong);
} }
.btn-accent:active { .btn-accent:active {
background: var(--bg-hover); background: var(--bg-parchment);
border-color: var(--text-primary);
} }
/* Rows */ /* Rows */
@@ -240,21 +275,21 @@ button.btn::after {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
gap: var(--spacing-sm); gap: var(--spacing-xs);
} }
.row + .row { .row + .row {
margin-top: var(--spacing-sm); margin-top: var(--spacing-xs);
} }
.label { .label {
color: var(--text-secondary); color: var(--text-secondary);
font-size: 26rpx; font-size: 24rpx;
} }
.value { .value {
color: var(--text-primary); color: var(--text-primary);
font-size: 28rpx; font-size: 26rpx;
font-weight: 400; font-weight: 400;
} }
@@ -262,158 +297,163 @@ button.btn::after {
.grid-2 { .grid-2 {
display: grid; display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
gap: var(--spacing-sm); gap: var(--spacing-xs);
} }
.grid-3 { .grid-3 {
display: grid; display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-columns: repeat(3, minmax(0, 1fr));
gap: var(--spacing-sm); gap: var(--spacing-xs);
} }
.grid-auto { .grid-auto {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(220rpx, 1fr)); grid-template-columns: repeat(auto-fit, minmax(180rpx, 1fr));
gap: var(--spacing-sm); gap: var(--spacing-xs);
} }
/* KPI Cards */ /* KPI Cards */
.kpi { .kpi {
padding: var(--spacing-sm); padding: var(--spacing-xs);
background: var(--bg-surface); background: var(--bg-parchment);
border: 1px solid var(--border-default); border-radius: var(--radius-md);
} text-align: center;
.kpi:active {
border-color: var(--border-strong);
} }
.kpi-value { .kpi-value {
font-size: 40rpx; font-family: var(--font-display);
font-weight: 300; font-size: 36rpx;
font-weight: 600;
color: var(--text-primary); color: var(--text-primary);
line-height: 1.2; line-height: 1.2;
} }
.kpi-label { .kpi-label {
margin-top: var(--spacing-xs); margin-top: 4rpx;
font-size: 24rpx; font-size: 22rpx;
color: var(--text-muted); color: var(--text-secondary);
} }
/* Module Cards */ /* Module Cards */
.module-card { .module-card {
padding: var(--spacing-sm); padding: var(--spacing-xs);
background: var(--bg-surface); background: var(--bg-canvas);
border: 1px solid var(--border-default); border: 1rpx solid var(--border-medium);
border-radius: var(--radius-md);
transition: transform 0.1s ease;
} }
.module-card:active { .module-card:active {
border-color: var(--border-strong); transform: scale(0.98);
} }
.module-name { .module-name {
color: var(--text-primary); color: var(--text-primary);
font-size: 30rpx; font-size: 28rpx;
font-weight: 400; font-weight: 600;
} }
.module-desc { .module-desc {
margin-top: var(--spacing-xs); margin-top: 4rpx;
color: var(--text-secondary); color: var(--text-secondary);
font-size: 24rpx; font-size: 22rpx;
line-height: 1.5; line-height: 1.4;
} }
.module-tag { .module-tag {
display: inline-block; display: inline-block;
margin-top: var(--spacing-sm); margin-top: var(--spacing-xs);
padding: var(--spacing-xs) var(--spacing-sm); padding: 4rpx 10rpx;
color: var(--text-muted); color: var(--accent-primary);
font-size: 22rpx; font-size: 20rpx;
font-family: 'SF Mono', 'Consolas', monospace; font-weight: 600;
text-transform: uppercase; background: rgba(0, 102, 204, 0.1);
letter-spacing: 1rpx; border-radius: var(--radius-pill);
border: 1px solid var(--border-default);
} }
/* List Items */ /* List Items */
.list-item { .list-item {
margin-top: var(--spacing-sm); margin-top: var(--spacing-xs);
padding: var(--spacing-sm); padding: var(--spacing-xs);
background: var(--bg-surface); background: var(--bg-canvas);
border: 1px solid var(--border-default); border: 1rpx solid var(--border-light);
border-radius: var(--radius-md);
} }
.list-item:active { .list-item:active {
border-color: var(--border-strong); background: var(--bg-parchment);
} }
.item-title { .item-title {
color: var(--text-primary); color: var(--text-primary);
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 600;
line-height: 1.4; line-height: 1.3;
} }
.item-sub { .item-sub {
margin-top: var(--spacing-xs); margin-top: 4rpx;
color: var(--text-muted); color: var(--text-secondary);
font-size: 24rpx; font-size: 22rpx;
line-height: 1.5; line-height: 1.4;
} }
/* Tags & Chips */ /* Tags & Chips */
.tag { .tag {
display: inline-block; display: inline-block;
margin-right: var(--spacing-xs); margin-right: 6rpx;
margin-bottom: var(--spacing-xs); margin-bottom: 6rpx;
padding: var(--spacing-xs) var(--spacing-sm); padding: 4rpx 10rpx;
border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
font-size: 24rpx; font-size: 22rpx;
font-family: 'SF Mono', 'Consolas', monospace; font-family: var(--font-text);
text-transform: uppercase;
letter-spacing: 1rpx;
color: var(--text-primary); color: var(--text-primary);
background: transparent; background: var(--bg-parchment);
} }
.tag-danger { .tag-danger {
border-color: rgba(255, 91, 111, 0.5); color: var(--status-spam);
color: rgba(255, 91, 111, 0.9); background: rgba(255, 59, 48, 0.1);
} }
.chip-group { .chip-group {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: var(--spacing-xs); gap: 6rpx;
margin-top: var(--spacing-sm); margin-top: var(--spacing-xs);
} }
.chip { .chip {
padding: var(--spacing-xs) var(--spacing-sm); padding: 6rpx 12rpx;
border: 1px solid var(--border-default); border-radius: var(--radius-pill);
font-size: 24rpx; font-size: 22rpx;
color: var(--text-secondary); color: var(--text-secondary);
background: transparent; background: var(--bg-parchment);
} }
/* Progress Track - Minimalist */ .chip:active {
background: var(--bg-pearl);
}
/* Progress Track */
.progress-track { .progress-track {
margin-top: var(--spacing-xs); margin-top: 6rpx;
width: 100%; width: 100%;
height: 4rpx; height: 6rpx;
background: var(--border-default); background: var(--border-light);
border-radius: var(--radius-pill);
} }
.progress-fill { .progress-fill {
height: 100%; height: 100%;
background: rgba(255, 91, 111, 0.8); background: var(--status-spam);
border-radius: var(--radius-pill);
} }
.progress-fill-safe { .progress-fill-safe {
height: 100%; height: 100%;
background: var(--text-muted); background: var(--status-ham);
border-radius: var(--radius-pill);
} }
/* Status Labels */ /* Status Labels */
@@ -422,40 +462,39 @@ button.btn::after {
.status-warn, .status-warn,
.status-pending { .status-pending {
display: inline-block; display: inline-block;
padding: var(--spacing-xs) var(--spacing-sm); padding: 4rpx 12rpx;
font-size: 24rpx; font-size: 22rpx;
font-family: 'SF Mono', 'Consolas', monospace; font-family: var(--font-text);
text-transform: uppercase; font-weight: 600;
letter-spacing: 1rpx; border-radius: var(--radius-pill);
border: 1px solid var(--border-strong);
} }
.status-spam { .status-spam {
color: rgba(255, 91, 111, 0.9); color: var(--text-dark-surface);
border-color: rgba(255, 91, 111, 0.5); background: var(--status-spam);
} }
.status-ham { .status-ham {
color: rgba(45, 207, 149, 0.9); color: var(--text-dark-surface);
border-color: rgba(45, 207, 149, 0.5); background: var(--status-ham);
} }
.status-warn { .status-warn {
color: rgba(255, 180, 84, 0.9); color: var(--text-dark-surface);
border-color: rgba(255, 180, 84, 0.5); background: var(--status-warn);
} }
.status-pending { .status-pending {
color: var(--text-muted); color: var(--text-primary);
border-color: var(--border-default); background: var(--bg-parchment);
} }
/* Pager */ /* Pager */
.pager-row { .pager-row {
margin-top: var(--spacing-sm); margin-top: var(--spacing-xs);
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
gap: var(--spacing-sm); gap: var(--spacing-xs);
} }
.pager-btn { .pager-btn {
@@ -464,44 +503,44 @@ button.btn::after {
/* Muted & Small */ /* Muted & Small */
.muted { .muted {
color: var(--text-muted); color: var(--text-secondary);
font-size: 26rpx; font-size: 22rpx;
line-height: 1.5; line-height: 1.4;
} }
.small { .small {
font-size: 24rpx; font-size: 20rpx;
} }
.empty { .empty {
text-align: center; text-align: center;
padding: var(--spacing-lg); padding: var(--spacing-md);
color: var(--text-muted); color: var(--text-secondary);
font-size: 26rpx; font-size: 24rpx;
line-height: 1.5; line-height: 1.4;
} }
/* Animations */ /* Animations */
.fade-up { .fade-up {
animation: fadeUp 0.4s ease both; animation: fadeUp 0.3s ease both;
} }
.fade-up-delay-1 { .fade-up-delay-1 {
animation-delay: 0.08s; animation-delay: 0.05s;
} }
.fade-up-delay-2 { .fade-up-delay-2 {
animation-delay: 0.16s; animation-delay: 0.1s;
} }
.fade-up-delay-3 { .fade-up-delay-3 {
animation-delay: 0.24s; animation-delay: 0.15s;
} }
@keyframes fadeUp { @keyframes fadeUp {
from { from {
opacity: 0; opacity: 0;
transform: translateY(16rpx); transform: translateY(12rpx);
} }
to { to {
opacity: 1; opacity: 1;
@@ -513,15 +552,15 @@ button.btn::after {
.evidence-grid { .evidence-grid {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap: var(--spacing-sm); gap: var(--spacing-xs);
margin-top: var(--spacing-sm); margin-top: var(--spacing-xs);
} }
.evidence-item { .evidence-item {
position: relative; position: relative;
width: 120rpx; width: 100rpx;
height: 120rpx; height: 100rpx;
border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
overflow: hidden; overflow: hidden;
} }
@@ -539,132 +578,135 @@ button.btn::after {
position: absolute; position: absolute;
top: -4rpx; top: -4rpx;
right: -4rpx; right: -4rpx;
width: 32rpx; width: 28rpx;
height: 32rpx; height: 28rpx;
background: rgba(255, 91, 111, 0.9); background: var(--status-spam);
color: var(--text-primary); color: var(--text-dark-surface);
font-size: 24rpx; font-size: 20rpx;
text-align: center; text-align: center;
line-height: 32rpx; line-height: 28rpx;
border-radius: 50%;
} }
.evidence-add { .evidence-add {
width: 120rpx; width: 100rpx;
height: 120rpx; height: 100rpx;
border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
background: var(--bg-parchment);
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.evidence-add-icon { .evidence-add-icon {
font-size: 48rpx; font-size: 36rpx;
color: var(--text-muted); color: var(--text-secondary);
} }
/* Credit Score Bar */ /* Credit Score Bar */
.credit-score-bar { .credit-score-bar {
position: relative; position: relative;
width: 180rpx; width: 140rpx;
height: 28rpx; height: 20rpx;
background: var(--border-default); background: var(--border-light);
border-radius: var(--radius-pill);
} }
.credit-fill { .credit-fill {
height: 100%; height: 100%;
background: rgba(45, 207, 149, 0.6); background: var(--status-ham);
border-radius: var(--radius-pill);
} }
.credit-value { .credit-value {
position: absolute; position: absolute;
right: var(--spacing-xs); right: 8rpx;
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
font-size: 22rpx; font-size: 18rpx;
color: var(--text-primary); color: var(--text-primary);
} }
/* Report Modal */ /* Report Modal */
.report-modal { .report-modal {
margin-top: var(--spacing-md); margin-top: var(--spacing-sm);
padding: var(--spacing-md); padding: var(--spacing-sm);
background: var(--bg-surface); background: var(--bg-canvas);
border: 1px solid var(--border-strong); border: 1rpx solid var(--border-medium);
border-radius: var(--radius-lg);
position: relative; position: relative;
} }
.report-header { .report-header {
text-align: center; text-align: center;
margin-bottom: var(--spacing-sm); margin-bottom: var(--spacing-xs);
} }
.report-title { .report-title {
font-size: 36rpx; font-size: 32rpx;
font-weight: 300; font-weight: 600;
color: var(--text-primary); color: var(--text-primary);
font-family: 'SF Mono', 'Consolas', monospace; font-family: var(--font-display);
} }
.report-period { .report-period {
font-size: 24rpx; font-size: 22rpx;
color: var(--text-muted); color: var(--text-secondary);
margin-top: var(--spacing-xs); margin-top: 4rpx;
} }
.report-close { .report-close {
position: absolute; position: absolute;
top: var(--spacing-sm); top: var(--spacing-xs);
right: var(--spacing-sm); right: var(--spacing-xs);
width: 40rpx; width: 36rpx;
height: 40rpx; height: 36rpx;
color: rgba(255, 91, 111, 0.9); color: var(--status-spam);
font-size: 32rpx; font-size: 28rpx;
text-align: center; text-align: center;
line-height: 40rpx; line-height: 36rpx;
} }
.report-section { .report-section {
margin-top: var(--spacing-sm); margin-top: var(--spacing-xs);
padding: var(--spacing-sm); padding: var(--spacing-xs);
background: transparent; background: transparent;
border-top: 1px solid var(--border-default); border-top: 1rpx solid var(--border-light);
} }
.report-section-title { .report-section-title {
font-size: 28rpx; font-size: 24rpx;
color: var(--text-secondary); color: var(--text-secondary);
margin-bottom: var(--spacing-sm); margin-bottom: var(--spacing-xs);
font-family: 'SF Mono', 'Consolas', monospace; font-weight: 600;
text-transform: uppercase;
letter-spacing: 1rpx;
} }
.report-kpi { .report-kpi {
padding: var(--spacing-sm); padding: var(--spacing-xs);
background: var(--bg-surface); background: var(--bg-parchment);
text-align: center; text-align: center;
border: 1px solid var(--border-default); border-radius: var(--radius-md);
} }
.report-kpi-value { .report-kpi-value {
font-size: 32rpx; font-size: 28rpx;
font-weight: 300; font-weight: 600;
color: var(--text-primary); color: var(--text-primary);
} }
.report-kpi-label { .report-kpi-label {
font-size: 22rpx; font-size: 20rpx;
color: var(--text-muted); color: var(--text-secondary);
margin-top: var(--spacing-xs); margin-top: 4rpx;
} }
.report-trend-item { .report-trend-item {
margin-top: var(--spacing-xs); margin-top: 4rpx;
} }
/* Note textarea */ /* Note textarea */
.note-textarea { .note-textarea {
min-height: 120rpx; min-height: 100rpx;
} }
/* Media Query */ /* Media Query */

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -0,0 +1,4 @@
<!-- Home Icon (Normal) -->
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12 40V20L24 10L36 20V40H28V28H20V40H12Z" stroke="#86868b" stroke-width="2" fill="none"/>
</svg>

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@@ -1,11 +1,7 @@
const { request } = require('../../utils/request') const { request } = require('../../utils/request')
const USER_MODULES = [ const USER_MODULES = [
{ name: '信息发布', desc: '发布公开 / 私有 / 私信文本并实时检测', tag: '发布检测', path: '/pages/detect/index' }, { name: '批量识别', desc: '多条文本批量检测并给出风险汇总', tag: '批量筛查', path: '/pages/batch/index' }
{ name: '批量识别', desc: '多条文本批量检测并给出风险汇总', tag: '批量筛查', path: '/pages/batch/index' },
{ name: '发布历史', desc: '查看发布状态、概率和申诉进度', tag: '历史追踪', path: '/pages/history/index' },
{ name: '私信收件箱', desc: '查看通过检测后成功送达的私信', tag: '私信查看', path: '/pages/inbox/index' },
{ name: '个人中心', desc: '维护个人资料与密码设置', tag: '账号设置', path: '/pages/profile/index' }
] ]
const ADMIN_MODULES = [ const ADMIN_MODULES = [

View File

@@ -33,8 +33,8 @@
</view> </view>
<view class="card fade-up fade-up-delay-2"> <view class="card fade-up fade-up-delay-2">
<view class="card-title">用户功能</view> <view class="card-title">更多功能</view>
<view class="card-desc">常用操作入口,覆盖发布、检测、历史和账号设置。</view> <view class="card-desc">批量检测与管理功能入口。</view>
<view class="grid-2"> <view class="grid-2">
<view class="module-card" wx:for="{{userModules}}" wx:key="name" data-path="{{item.path}}" bindtap="goto"> <view class="module-card" wx:for="{{userModules}}" wx:key="name" data-path="{{item.path}}" bindtap="goto">
<view class="module-name">{{item.name}}</view> <view class="module-name">{{item.name}}</view>
@@ -55,6 +55,4 @@
</view> </view>
</view> </view>
</view> </view>
<button class="btn btn-ghost fade-up fade-up-delay-3" bindtap="logout">退出登录</button>
</view> </view>

View File

@@ -3,6 +3,7 @@ const { request } = require('../../utils/request')
Page({ Page({
data: { data: {
loading: false, loading: false,
user: null,
form: { form: {
nickname: '', nickname: '',
company: '', company: '',
@@ -17,6 +18,9 @@ Page({
}, },
async loadProfile() { async loadProfile() {
const app = getApp()
const user = app.globalData.user || wx.getStorageSync('user')
this.setData({ user })
const profile = await request({ url: '/user/profile' }) const profile = await request({ url: '/user/profile' })
this.setData({ this.setData({
form: { form: {
@@ -29,6 +33,12 @@ Page({
}) })
}, },
goto(e) {
const path = e.currentTarget.dataset.path
if (!path) return
wx.navigateTo({ url: path })
},
onInput(e) { onInput(e) {
const field = e.currentTarget.dataset.field const field = e.currentTarget.dataset.field
this.setData({ [`form.${field}`]: (e.detail.value || '').trim() }) this.setData({ [`form.${field}`]: (e.detail.value || '').trim() })
@@ -57,5 +67,18 @@ Page({
} finally { } finally {
this.setData({ loading: false }) this.setData({ loading: false })
} }
},
logout() {
wx.showModal({
title: '退出登录',
content: '确定要退出登录吗?',
success: (res) => {
if (res.confirm) {
getApp().clearAuth()
wx.reLaunch({ url: '/pages/login/index' })
}
}
})
} }
}) })

View File

@@ -1,7 +1,7 @@
<view class="container"> <view class="container">
<view class="hero fade-up"> <view class="hero fade-up">
<view class="hero-badge">PROFILE</view> <view class="hero-badge">PROFILE</view>
<view class="hero-title">个人资料设置</view> <view class="hero-title">个人中心</view>
<view class="hero-sub">完善你的身份信息,便于审计追踪和团队协同。</view> <view class="hero-sub">完善你的身份信息,便于审计追踪和团队协同。</view>
</view> </view>
@@ -36,4 +36,35 @@
<button class="btn btn-primary" loading="{{loading}}" bindtap="save">保存资料</button> <button class="btn btn-primary" loading="{{loading}}" bindtap="save">保存资料</button>
</view> </view>
</view>
<view class="card fade-up fade-up-delay-2" wx:if="{{user && user.is_admin}}">
<view class="card-title">管理员入口</view>
<view class="card-desc">管理后台功能快速访问。</view>
<view class="grid-2">
<view class="module-card" data-path="/pages/admin-dashboard/index" bindtap="goto">
<view class="module-name">运营看板</view>
<view class="module-desc">监控发布、拦截、样本和模型状态</view>
<view class="module-tag">数据概览</view>
</view>
<view class="module-card" data-path="/pages/admin-review/index" bindtap="goto">
<view class="module-name">复核与申诉</view>
<view class="module-desc">处理拦截复核和用户申诉</view>
<view class="module-tag">审核处理</view>
</view>
<view class="module-card" data-path="/pages/admin-samples/index" bindtap="goto">
<view class="module-name">样本管理</view>
<view class="module-desc">维护训练样本并触发模型重训</view>
<view class="module-tag">模型迭代</view>
</view>
<view class="module-card" data-path="/pages/admin-users/index" bindtap="goto">
<view class="module-name">用户管理</view>
<view class="module-desc">编辑用户信息和权限</view>
<view class="module-tag">权限管理</view>
</view>
</view>
</view>
<view class="card fade-up fade-up-delay-3">
<button class="btn btn-ghost" bindtap="logout">退出登录</button>
</view>
</view>