Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-06-09 15:51:29 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cb6c465cc233d7b0e6251569b3eb9136d5f62759
cb6c465c
1 parent
1353f41e
fix(IndexCheckInPage): 修复进度条显示条件逻辑
当进度计算结果为NaN时隐藏进度条显示
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
src/views/checkin/IndexCheckInPage.vue
src/views/checkin/IndexCheckInPage.vue
View file @
cb6c465
<!--
* @Date: 2025-05-29 15:34:17
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-06-09 1
1:32:31
* @LastEditTime: 2025-06-09 1
5:50:10
* @FilePath: /mlaj/src/views/checkin/IndexCheckInPage.vue
* @Description: 文件描述
-->
...
...
@@ -14,7 +14,7 @@
@click-subtitle="onClickSubtitle">
</van-calendar>
<div class="text-wrapper">
<div
v-if="showProgress"
class="text-wrapper">
<div class="text-header">目标进度</div>
<div style="background-color: #FFF; margin-top: 1rem;">
<div class="grade-percentage-main">
...
...
@@ -500,13 +500,15 @@ const delCheckin = (post) => {
const taskDetail = ref({});
const myCheckinDates = ref([]);
const checkinDataList = ref([]);
const showProgress = ref(true);
const getTaskDetail = async (month) => {
const { code, data } = await getTaskDetailAPI({ i: route.query.id, month });
if (code) {
console.warn(data);
taskDetail.value = data;
progress1.value = (data.checkin_number/data.target_number)*100 ;
progress1.value = (data.checkin_number/data.target_number)*100; // 计算进度条百分比
showProgress.value = !isNaN(progress1.value); // 如果是NaN,就不显示进度条
teamAvatars.value = data.checkin_avatars;
// 获取当前用户的打卡日期
myCheckinDates.value = data.my_checkin_dates;
...
...
Please
register
or
login
to post a comment