hookehuyr

fix(进度条): 修复进度条百分比显示精度问题

将进度条百分比计算结果使用 toFixed(1) 保留一位小数,避免显示过多小数位
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-06-11 13:38:38 4 + * @LastEditTime: 2025-06-13 14:12:53
5 * @FilePath: /mlaj/src/views/checkin/IndexCheckInPage.vue 5 * @FilePath: /mlaj/src/views/checkin/IndexCheckInPage.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -524,7 +524,7 @@ const getTaskDetail = async (month) => { ...@@ -524,7 +524,7 @@ const getTaskDetail = async (month) => {
524 const { code, data } = await getTaskDetailAPI({ i: route.query.id, month }); 524 const { code, data } = await getTaskDetailAPI({ i: route.query.id, month });
525 if (code) { 525 if (code) {
526 taskDetail.value = data; 526 taskDetail.value = data;
527 - progress1.value = (data.checkin_number/data.target_number)*100; // 计算进度条百分比 527 + progress1.value = ((data.checkin_number/data.target_number)*100).toFixed(1); // 计算进度条百分比
528 showProgress.value = !isNaN(progress1.value); // 如果是NaN,就不显示进度条 528 showProgress.value = !isNaN(progress1.value); // 如果是NaN,就不显示进度条
529 teamAvatars.value = data.checkin_avatars; 529 teamAvatars.value = data.checkin_avatars;
530 // 获取当前用户的打卡日期 530 // 获取当前用户的打卡日期
...@@ -700,6 +700,7 @@ const formatData = (data) => { ...@@ -700,6 +700,7 @@ const formatData = (data) => {
700 700
701 .post-content { 701 .post-content {
702 .post-text { 702 .post-text {
703 + color: #666;
703 margin-bottom: 1rem; 704 margin-bottom: 1rem;
704 } 705 }
705 706
......