hookehuyr

fix(IndexCheckInPage): 修复团队头像显示限制逻辑

修改团队头像显示逻辑,当头像数量超过8个时仅显示前8个,否则显示全部
1 <!-- 1 <!--
2 * @Date: 2025-05-29 15:34:17 2 * @Date: 2025-05-29 15:34:17
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-12-17 10:07:42 4 + * @LastEditTime: 2025-12-17 14:45:25
5 * @FilePath: /mlaj/src/views/checkin/IndexCheckInPage.vue 5 * @FilePath: /mlaj/src/views/checkin/IndexCheckInPage.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
78 </div> --> 78 </div> -->
79 <div style="padding: 0.75rem 1rem;"> 79 <div style="padding: 0.75rem 1rem;">
80 <van-image round width="2.8rem" height="2.8rem" :src="item ? item : 'https://cdn.ipadbiz.cn/mlaj/images/icon_1.jpeg'" fit="cover" 80 <van-image round width="2.8rem" height="2.8rem" :src="item ? item : 'https://cdn.ipadbiz.cn/mlaj/images/icon_1.jpeg'" fit="cover"
81 - v-for="(item, index) in teamAvatars.splice(0, 8)" :key="index" 81 + v-for="(item, index) in teamAvatars" :key="index"
82 :style="{ marginLeft: index > 0 ? '-0.5rem' : '', border: '2px solid #eff6ff', background: '#fff' }" /> 82 :style="{ marginLeft: index > 0 ? '-0.5rem' : '', border: '2px solid #eff6ff', background: '#fff' }" />
83 </div> 83 </div>
84 </div> 84 </div>
...@@ -558,7 +558,7 @@ const getTaskDetail = async (month) => { ...@@ -558,7 +558,7 @@ const getTaskDetail = async (month) => {
558 taskDetail.value = data; 558 taskDetail.value = data;
559 progress1.value = ((data.checkin_number/data.target_number)*100).toFixed(1); // 计算进度条百分比 559 progress1.value = ((data.checkin_number/data.target_number)*100).toFixed(1); // 计算进度条百分比
560 showProgress.value = !isNaN(progress1.value); // 如果是NaN,就不显示进度条 560 showProgress.value = !isNaN(progress1.value); // 如果是NaN,就不显示进度条
561 - teamAvatars.value = data.checkin_avatars; 561 + teamAvatars.value = taskDetail.value.checkin_avatars.length > 8 ? taskDetail.value.checkin_avatars.splice(0, 8) : taskDetail.value.checkin_avatars;
562 // 获取当前用户的打卡日期 562 // 获取当前用户的打卡日期
563 myCheckinDates.value = data.my_checkin_dates; 563 myCheckinDates.value = data.my_checkin_dates;
564 // 获取当前用户的补卡日期 564 // 获取当前用户的补卡日期
......