feat: joinedDay
This commit is contained in:
@@ -32,6 +32,12 @@
|
|||||||
<view class="tags-container" v-else-if="!isLoggedIn">
|
<view class="tags-container" v-else-if="!isLoggedIn">
|
||||||
<text class="tags-text">点击登录解锁更多功能</text>
|
<text class="tags-text">点击登录解锁更多功能</text>
|
||||||
</view>
|
</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="stats-container">
|
||||||
<view class="stat-item">
|
<view class="stat-item">
|
||||||
@@ -131,6 +137,7 @@ const userStats = ref({
|
|||||||
comment: 0,
|
comment: 0,
|
||||||
liked: 0,
|
liked: 0,
|
||||||
pkCount: 0,
|
pkCount: 0,
|
||||||
|
joinedDay: 0,
|
||||||
label: []
|
label: []
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -141,6 +148,7 @@ const loadUserStats = async () => {
|
|||||||
comment: 0,
|
comment: 0,
|
||||||
liked: 0,
|
liked: 0,
|
||||||
pkCount: 0,
|
pkCount: 0,
|
||||||
|
joinedDay: 0,
|
||||||
label: []
|
label: []
|
||||||
};
|
};
|
||||||
return;
|
return;
|
||||||
@@ -153,6 +161,7 @@ const loadUserStats = async () => {
|
|||||||
comment: data.comment || 0,
|
comment: data.comment || 0,
|
||||||
liked: data.liked || 0,
|
liked: data.liked || 0,
|
||||||
pkCount: data.pkCount || 0,
|
pkCount: data.pkCount || 0,
|
||||||
|
joinedDay: data.joinedDay || 0,
|
||||||
label: data.label || []
|
label: data.label || []
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -315,7 +324,7 @@ const navTo = (page) => {
|
|||||||
.tags-container {
|
.tags-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 48rpx;
|
margin-bottom: 24rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sparkle-icon {
|
.sparkle-icon {
|
||||||
@@ -329,6 +338,31 @@ const navTo = (page) => {
|
|||||||
color: #666;
|
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 {
|
.stats-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user