feat(miniprogram): 温润东方风全面 UI 重设计

73 文件变更,覆盖全部 40 个页面 SCSS + TabBar 图标 + 组件样式。
统一赤陶主色 #C4623A + 暖米背景 + 衬线标题字体 + 12px 圆角体系。
This commit is contained in:
iven
2026-04-28 00:19:52 +08:00
parent fbb28e655d
commit 50eae8b809
97 changed files with 7633 additions and 2373 deletions

View File

@@ -1,17 +1,50 @@
@import '../../styles/variables.scss';
@mixin serif-number {
font-family: 'Georgia', 'Times New Roman', serif;
font-variant-numeric: tabular-nums;
}
@mixin section-title {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: 30px;
font-weight: bold;
color: $tx;
margin-bottom: 20px;
display: block;
}
@mixin tag($bg, $color) {
display: inline-block;
padding: 4px 12px;
border-radius: 8px;
font-size: 20px;
font-weight: 500;
background: $bg;
color: $color;
}
@mixin flex-center {
display: flex;
align-items: center;
justify-content: center;
}
.events-page {
min-height: 100vh;
background: #f0f4f8;
background: $bg;
padding-bottom: 120px;
}
.events-header {
background: linear-gradient(135deg, #0891b2, #06b6d4);
padding: 40px 32px;
color: #fff;
background: $pri;
padding: 48px 32px 32px;
color: $card;
&__title {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: 40px;
font-weight: 700;
font-weight: bold;
display: block;
margin-bottom: 8px;
}
@@ -30,10 +63,10 @@
}
.event-card {
background: #fff;
border-radius: 16px;
background: $card;
border-radius: $r;
padding: 28px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
box-shadow: $shadow-sm;
&__header {
display: flex;
@@ -43,29 +76,45 @@
}
&__status {
padding: 4px 14px;
border-radius: 12px;
@include tag($bd-l, $tx2);
font-size: 22px;
font-weight: 500;
}
&__status--published {
@include tag($pri-l, $pri);
}
&__status--ongoing {
@include tag($acc-l, $acc);
}
&__status--completed {
@include tag($bd-l, $tx3);
}
&__status--cancelled {
@include tag($dan-l, $dan);
}
&__points {
font-size: 28px;
font-weight: 700;
color: #f59e0b;
font-weight: bold;
color: $wrn;
@include serif-number;
}
&__title {
font-family: 'Georgia', 'Times New Roman', serif;
font-size: 30px;
font-weight: 600;
color: #0f172a;
font-weight: bold;
color: $tx;
display: block;
margin-bottom: 12px;
}
&__desc {
font-size: 26px;
color: #64748b;
color: $tx2;
display: block;
margin-bottom: 16px;
line-height: 1.5;
@@ -74,18 +123,18 @@
&__info {
display: flex;
flex-direction: column;
gap: 6px;
gap: 8px;
margin-bottom: 16px;
}
&__date {
font-size: 24px;
color: #475569;
color: $tx2;
}
&__location {
font-size: 24px;
color: #94a3b8;
color: $tx3;
}
&__footer {
@@ -93,26 +142,27 @@
justify-content: space-between;
align-items: center;
padding-top: 16px;
border-top: 1px solid #f1f5f9;
border-top: 1px solid $bd-l;
}
&__participants {
font-size: 24px;
color: #94a3b8;
color: $tx3;
@include serif-number;
}
&__btn {
background: #0891b2;
border-radius: 12px;
padding: 12px 28px;
background: $pri;
border-radius: $r-sm;
padding: 16px 32px;
&--disabled {
background: #cbd5e1;
background: $bd;
}
&-text {
font-size: 26px;
color: #fff;
color: $card;
font-weight: 500;
}
}

View File

@@ -6,11 +6,11 @@ import Loading from '@/components/Loading';
import EmptyState from '@/components/EmptyState';
import './index.scss';
const STATUS_MAP: Record<string, { label: string; color: string }> = {
published: { label: '报名中', color: '#0891b2' },
ongoing: { label: '进行中', color: '#10b981' },
completed: { label: '已结束', color: '#94a3b8' },
cancelled: { label: '已取消', color: '#ef4444' },
const STATUS_MAP: Record<string, { label: string; className: string }> = {
published: { label: '报名中', className: 'event-card__status--published' },
ongoing: { label: '进行中', className: 'event-card__status--ongoing' },
completed: { label: '已结束', className: 'event-card__status--completed' },
cancelled: { label: '已取消', className: 'event-card__status--cancelled' },
};
export default function EventsPage() {
@@ -70,14 +70,14 @@ export default function EventsPage() {
) : (
<View className='event-list'>
{events.map((event) => {
const st = STATUS_MAP[event.status] || { label: event.status, color: '#94a3b8' };
const st = STATUS_MAP[event.status] || { label: event.status, className: '' };
const isFull = event.max_participants != null && event.current_participants >= event.max_participants;
const isRegistering = registering === event.id;
return (
<View key={event.id} className='event-card'>
<View className='event-card__header'>
<View className='event-card__status' style={`background: ${st.color}20; color: ${st.color}`}>
<View className={`event-card__status ${st.className}`}>
<Text>{st.label}</Text>
</View>
<Text className='event-card__points'>+{event.points_reward} </Text>