feat: joinedDay

This commit is contained in:
zzc
2026-06-22 18:13:10 +08:00
parent d14084c2a1
commit 8d2337e5b7

View File

@@ -32,6 +32,12 @@
<view class="tags-container" v-else-if="!isLoggedIn">
<text class="tags-text">点击登录解锁更多功能</text>
</view>
<view v-if="isLoggedIn && userStats.joinedDay > 0" class="joined-day-pill">
<text class="joined-day-label">已加入</text>
<text class="joined-day-value">{{ userStats.joinedDay }}</text>
<text class="joined-day-label"></text>
</view>
<view class="stats-container">
<view class="stat-item">
@@ -131,6 +137,7 @@ const userStats = ref({
comment: 0,
liked: 0,
pkCount: 0,
joinedDay: 0,
label: []
});
@@ -141,6 +148,7 @@ const loadUserStats = async () => {
comment: 0,
liked: 0,
pkCount: 0,
joinedDay: 0,
label: []
};
return;
@@ -153,6 +161,7 @@ const loadUserStats = async () => {
comment: data.comment || 0,
liked: data.liked || 0,
pkCount: data.pkCount || 0,
joinedDay: data.joinedDay || 0,
label: data.label || []
};
} catch (error) {
@@ -315,7 +324,7 @@ const navTo = (page) => {
.tags-container {
display: flex;
align-items: center;
margin-bottom: 48rpx;
margin-bottom: 24rpx;
}
.sparkle-icon {
@@ -329,6 +338,31 @@ const navTo = (page) => {
color: #666;
}
.joined-day-pill {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8rpx;
height: 52rpx;
padding: 0 20rpx;
margin-bottom: 36rpx;
border-radius: 999rpx;
background: linear-gradient(135deg, rgba(91, 84, 223, 0.12), rgba(69, 59, 199, 0.05));
box-shadow: inset 0 0 0 2rpx rgba(91, 84, 223, 0.08);
}
.joined-day-label {
font-size: 22rpx;
color: #7b8191;
font-weight: 500;
}
.joined-day-value {
font-size: 28rpx;
color: #453bc7;
font-weight: 800;
}
.stats-container {
display: flex;
align-items: center;