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-12-29 09:59:54 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
57685e23ced26c7a5d9139d7d8afaeaec0d5545e
57685e23
1 parent
14cda1d8
fix(recall): 修改活动历史日期范围计算为固定到2025年
根据李琛要求,将活动历史日期范围的计算从动态获取改为固定到2025年结束
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
src/views/recall/ActivityHistoryPage.vue
src/views/recall/timeline.vue
src/views/recall/ActivityHistoryPage.vue
View file @
57685e2
...
...
@@ -221,11 +221,13 @@ onMounted(async () => {
}))
// 遍历日期把列表date字段从小到大排序, 获取到其中日期段 比如 2020-2025
const sortedDates = activities.value.map(item => item.date).sort((a, b) => new Date(a) - new Date(b))
if (sortedDates[0] !== sortedDates[sortedDates.length - 1]) {
recordDate.value = sortedDates[0] + '-' + sortedDates[sortedDates.length - 1] || ''
} else {
recordDate.value = sortedDates[0] || ''
}
// if (sortedDates[0] !== sortedDates[sortedDates.length - 1]) {
// recordDate.value = sortedDates[0] + '-' + sortedDates[sortedDates.length - 1] || ''
// } else {
// recordDate.value = sortedDates[0] || ''
// }
// 李琛说就写死到2025年结束
recordDate.value = sortedDates[0] + '-' + '2025'
}
}
}
...
...
@@ -246,11 +248,13 @@ onMounted(async () => {
total: item.fee_stu * item.stu_cnt || 0
}));
const sortedDates = activities.value.map(item => item.date).sort((a, b) => new Date(a) - new Date(b))
if (sortedDates[0] !== sortedDates[sortedDates.length - 1]) {
recordDate.value = sortedDates[0] + '-' + sortedDates[sortedDates.length - 1] || ''
} else {
recordDate.value = sortedDates[0] || ''
}
// if (sortedDates[0] !== sortedDates[sortedDates.length - 1]) {
// recordDate.value = sortedDates[0] + '-' + sortedDates[sortedDates.length - 1] || ''
// } else {
// recordDate.value = sortedDates[0] || ''
// }
// 李琛说就写死到2025年结束
recordDate.value = sortedDates[0] + '-' + '2025'
}
}
}
...
...
src/views/recall/timeline.vue
View file @
57685e2
...
...
@@ -140,7 +140,9 @@ const joinDateFormatted = computed(() => {
const durationString = computed(() => {
const start = dayjs(joinDate.value)
const end = lastActivityDate.value ? dayjs(lastActivityDate.value) : dayjs()
// const end = lastActivityDate.value ? dayjs(lastActivityDate.value) : dayjs()
// 写死最后一次活动是2025年12月31日
const end = dayjs('2025-12-31')
const years = end.diff(start, 'year')
const months = end.diff(start, 'month') % 12
...
...
Please
register
or
login
to post a comment