hookehuyr

feat(排行榜): 添加助力榜空状态提示和样式

- 在助力榜无数据时显示空状态提示和图片
- 调整助力码按钮位置
- 优化空状态下的布局和样式
<!--
* @Date: 2025-01-09 00:00:00
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-09-19 09:35:49
* @LastEditTime: 2025-09-19 10:58:52
* @FilePath: /lls_program/src/components/RankingCard.vue
* @Description: 排行榜卡片组件
-->
......@@ -43,10 +43,22 @@
<!-- 排行榜日期 -->
<view class="rank-date relative">
{{ currentDate }}
<view v-if="activeTab === 'support'" class="absolute font-bold text-white" style="right: 95rpx;" @tap="joinOrganization">助力码</view>
<view v-if="activeTab === 'support'" class="absolute font-bold text-white top-0" style="right: 30rpx;" @tap="joinOrganization">助力码</view>
</view>
<!-- 助力榜空状态提示 -->
<view v-if="activeTab === 'support' && (!supportData || !supportData.families || supportData.families.length === 0)" class="support-empty-state">
<view class="empty-image">
<image src="https://cdn.ipadbiz.cn/lls_prog/images/support_img.png" class="empty-img" />
</view>
<view class="empty-text">
<view class="empty-line">家庭的二、三代小辈</view>
<view class="empty-line">输入助力码,来为大家长助力</view>
</view>
</view>
<!-- 前三名展示 -->
<view class="top-three">
<view v-else class="top-three">
<!-- 第二名 -->
<view v-if="topRanks[1]" class="rank-item second">
<view class="crown">
......@@ -687,6 +699,37 @@ defineExpose({
}
}
.support-empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 80rpx 40rpx;
padding-top: 0;
text-align: center;
.empty-image {
.empty-img {
width: 400rpx;
height: 400rpx;
}
}
.empty-text {
.empty-line {
color: rgba(255, 255, 255, 0.9);
font-size: 28rpx;
line-height: 1.5;
margin-bottom: 8rpx;
&:last-child {
margin-bottom: 0;
}
}
}
}
.my-rank-section {
background: rgba(255, 255, 255, 0.95);
border-radius: 16rpx;
......
<!--
* @Date: 2025-09-01 13:07:52
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-09-19 09:58:37
* @LastEditTime: 2025-09-19 10:58:47
* @FilePath: /lls_program/src/pages/FamilyRank/index.vue
* @Description: 文件描述
-->
......@@ -41,11 +41,22 @@
<!-- 排行榜日期 -->
<view v-if="!loading" class="rank-date relative">
{{ currentDate }}
<view v-if="activeTab === 'support'" class="absolute font-bold text-white" style="right: 95rpx;" @tap="joinOrganization">助力码</view>
<view v-if="activeTab === 'support'" class="absolute font-bold text-white top-0" style="right: 30rpx;" @tap="joinOrganization">助力码</view>
</view>
<!-- 助力榜空状态提示 -->
<view v-if="!loading && activeTab === 'support' && (!supportData || !supportData.families || supportData.families.length === 0)" class="support-empty-state">
<view class="empty-image">
<image src="https://cdn.ipadbiz.cn/lls_prog/images/support_img.png" class="empty-img" mode="aspectFit" />
</view>
<view class="empty-text">
<view class="empty-line">家庭的二、三代小辈</view>
<view class="empty-line">输入助力码,来为大家长助力</view>
</view>
</view>
<!-- 前三名展示 -->
<view v-if="!loading && topThreeData.length > 0" class="top-three">
<view v-else-if="!loading && topThreeData.length > 0" class="top-three">
<!-- 第二名 -->
<view v-if="topThreeData[1]" class="rank-item second">
<!-- <view class="crown crown-silver">👑</view> -->
......@@ -120,7 +131,7 @@
</view>
<!-- 暂无数据 -->
<view v-else-if="!loading" class="no-data">
<view v-else-if="!loading && activeTab !== 'support'" class="no-data">
<view class="no-data-text">暂无{{ currentRegionName }}排行榜数据</view>
</view>
</view>
......@@ -523,6 +534,37 @@ onMounted(async () => {
}
}
.support-empty-state {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 120rpx 40rpx;
text-align: center;
padding-top: 0;
.empty-image {
.empty-img {
width: 400rpx;
height: 400rpx;
}
}
.empty-text {
.empty-line {
color: rgba(255, 255, 255, 0.9);
font-size: 32rpx;
line-height: 1.5;
margin-bottom: 12rpx;
&:last-child {
margin-bottom: 0;
}
}
}
}
.top-three {
position: relative;
display: flex;
......