优化日程界面

This commit is contained in:
2026-07-15 18:14:17 +08:00
parent 11e0763766
commit bca5170e22
19 changed files with 2805 additions and 1070 deletions
+91 -94
View File
@@ -11,7 +11,7 @@
</view>
</view>
<view class="search-bar">
<FaIcon name="magnifying-glass" color="#9acafc" :size="18" />
<FaIcon name="magnifying-glass" color="#909399" :size="16" />
<text class="search-text">搜索功能数据...</text>
</view>
</view>
@@ -19,17 +19,20 @@
<view class="main-scroll">
<view class="stats-grid">
<view class="stat-card" v-for="item in stats" :key="item.label">
<text class="stat-value">{{ item.value }}</text>
<text class="stat-label">{{ item.label }}</text>
<text class="stat-trend" :class="item.up ? 'up' : 'down'">
{{ item.up ? '↑' : '↓' }} {{ item.trend }}
</text>
<text class="stat-value">{{ item.value }}</text>
<view class="stat-trend" :class="item.up ? 'up' : 'down'">
<FaIcon :name="item.up ? 'arrow-trend-up' : 'arrow-trend-down'" :color="item.up ? '#3c9cff' : '#909399'" :size="12" />
<text>{{ item.trend }}</text>
</view>
</view>
</view>
<view class="section">
<text class="section-title">快捷入口</text>
<view class="quick-grid">
<view class="section-header">
<text class="section-title">快捷入口</text>
</view>
<view class="quick-card">
<view
class="quick-item"
v-for="item in quickActions"
@@ -37,7 +40,7 @@
@tap="onQuickTap(item)"
>
<view class="quick-icon">
<FaIcon :name="item.icon" color="#3c9cff" :size="22" />
<FaIcon :name="item.icon" color="#3c9cff" :size="20" />
</view>
<text class="quick-name">{{ item.name }}</text>
</view>
@@ -51,11 +54,14 @@
</view>
<view class="activity-card">
<view class="activity-item" v-for="(item, index) in activities" :key="index">
<view class="activity-dot" />
<view class="activity-icon">
<FaIcon name="circle" color="#3c9cff" :size="8" />
</view>
<view class="activity-body">
<text class="activity-title">{{ item.title }}</text>
<text class="activity-time">{{ item.time }}</text>
</view>
<FaIcon name="chevron-right" color="#c0c4cc" :size="12" />
</view>
</view>
</view>
@@ -121,149 +127,145 @@ function onQuickTap(item) {
</script>
<style lang="scss" scoped>
@import '@/src/styles/page-common.scss';
.page {
height: 100vh;
background: #ffffff;
display: flex;
flex-direction: column;
overflow: hidden;
@include page-shell;
}
.header {
flex-shrink: 0;
padding: calc(var(--status-bar-height, 44px) + 24rpx) 40rpx 32rpx;
background: #ffffff;
padding: calc(var(--status-bar-height, 44px) + 20rpx) $page-padding-x 24rpx;
background: $color-card;
box-shadow: $shadow-header;
}
.header-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 32rpx;
margin-bottom: 28rpx;
}
.greeting {
display: block;
font-size: 26rpx;
color: $u-primary-disabled;
color: $color-text-muted;
}
.username {
display: block;
font-size: 40rpx;
font-weight: 600;
color: $u-primary;
margin-top: 6rpx;
color: $color-text;
margin-top: 4rpx;
}
.avatar {
width: 80rpx;
height: 80rpx;
width: 88rpx;
height: 88rpx;
border-radius: 50%;
background: #ffffff;
border: 2rpx solid #e8f0f8;
background: $color-primary-bg;
display: flex;
align-items: center;
justify-content: center;
}
.avatar-text {
font-size: 32rpx;
font-size: 34rpx;
font-weight: 600;
color: $u-primary;
color: $color-primary;
}
.search-bar {
display: flex;
align-items: center;
gap: 16rpx;
background: #ffffff;
border: 2rpx solid #e8f0f8;
border-radius: 16rpx;
padding: 22rpx 28rpx;
background: $color-bg-page;
border-radius: $radius-md;
padding: 20rpx 24rpx;
}
.search-text {
font-size: 26rpx;
color: $u-primary-disabled;
font-size: 28rpx;
color: $color-text-muted;
}
.main-scroll {
flex: 1;
min-height: 0;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
padding: 8rpx 40rpx 0;
@include scroll-body;
}
.stats-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20rpx;
margin-bottom: 48rpx;
margin-bottom: 32rpx;
}
.stat-card {
background: #ffffff;
border: 2rpx solid #e8f0f8;
border-radius: 16rpx;
padding: 28rpx;
}
.stat-value {
display: block;
font-size: 36rpx;
font-weight: 600;
color: $u-primary;
@include card;
padding: 28rpx 24rpx;
}
.stat-label {
display: block;
font-size: 24rpx;
color: $u-primary-disabled;
margin-top: 6rpx;
color: $color-text-muted;
}
.stat-value {
display: block;
font-size: 40rpx;
font-weight: 600;
color: $color-text;
margin-top: 8rpx;
}
.stat-trend {
display: block;
margin-top: 12rpx;
display: inline-flex;
align-items: center;
gap: 6rpx;
margin-top: 16rpx;
padding: 4rpx 12rpx;
border-radius: $radius-sm;
font-size: 22rpx;
&.up {
color: $u-primary;
background: $color-primary-bg;
color: $color-primary;
}
&.down {
color: $u-primary-disabled;
background: $color-divider;
color: $color-text-muted;
}
}
.section {
margin-bottom: 48rpx;
margin-bottom: 32rpx;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24rpx;
margin-bottom: 20rpx;
}
.section-title {
font-size: 30rpx;
font-weight: 600;
color: $u-primary;
@include section-title;
}
.section-more {
font-size: 24rpx;
color: $u-primary-disabled;
font-size: 26rpx;
color: $color-primary;
}
.quick-grid {
.quick-card {
@include card;
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 20rpx;
padding: 32rpx 16rpx;
}
.quick-item {
@@ -271,72 +273,67 @@ function onQuickTap(item) {
flex-direction: column;
align-items: center;
gap: 12rpx;
}
.quick-icon {
width: 96rpx;
height: 96rpx;
border-radius: 24rpx;
background: #ffffff;
border: 2rpx solid #e8f0f8;
display: flex;
align-items: center;
justify-content: center;
&:active {
border-color: $u-primary-disabled;
opacity: 0.7;
}
}
.quick-icon {
@include icon-box(88rpx);
border-radius: $radius-lg;
}
.quick-name {
font-size: 22rpx;
color: $u-primary-disabled;
font-size: 24rpx;
color: $color-text-secondary;
}
.activity-card {
background: #ffffff;
border: 2rpx solid #e8f0f8;
border-radius: 16rpx;
@include card;
overflow: hidden;
}
.activity-item {
display: flex;
align-items: center;
padding: 28rpx;
gap: 20rpx;
padding: 28rpx 24rpx;
gap: 16rpx;
& + & {
border-top: 2rpx solid #f0f6fb;
border-top: 1rpx solid $color-divider;
}
&:active {
background: $color-bg-page;
}
}
.activity-dot {
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: $u-primary;
flex-shrink: 0;
.activity-icon {
width: 32rpx;
display: flex;
justify-content: center;
}
.activity-body {
flex: 1;
min-width: 0;
}
.activity-title {
display: block;
font-size: 28rpx;
color: $u-primary;
color: $color-text;
}
.activity-time {
display: block;
font-size: 22rpx;
color: $u-primary-disabled;
font-size: 24rpx;
color: $color-text-muted;
margin-top: 6rpx;
}
.bottom-space {
height: 40rpx;
height: 24rpx;
}
</style>