feat: 完善视频学习进度缓存

完善新手导航和三大创作模块的视频完成缓存、未完成提示与学习进度计算,确保进度按实际学习资源完成情况更新。

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
zhongyidianandClaude Opus 4.7 committed 2026-05-11 09:05:29 +08:00
1 parent 1f8723aabd
commit 6f289959be
63 files changed
+3139 -1126

No files matched your search

+12 -1
View File
@@ -81,6 +81,17 @@ const worksList = ref<WorkItem[]>([
},
])
const getCachedWorkScore = (work: WorkItem): number => {
const scores = filmStore.practiceWorkRatings[work.path]
const values = scores ? Object.values(scores) : []
if (values.length === 0) return work.stars
return Math.round(
values.reduce((total, score) => total + score, 0) / values.length,
)
}
/** 左滑动作品列表 */
const scrollWorksLeft = (): void => {
if (worksScrollIndex.value > 0) {
@@ -306,7 +317,7 @@ onUnmounted(() => {
</h3>
<!-- 星星评分 -->
<StarRating
:score="work.stars"
:score="getCachedWorkScore(work)"
size="lg"
readonly
/>