diff --git a/mini-program/src/pages/main/ScriptLibraryView.vue b/mini-program/src/pages/main/ScriptLibraryView.vue index 3ac75e1..8970c74 100644 --- a/mini-program/src/pages/main/ScriptLibraryView.vue +++ b/mini-program/src/pages/main/ScriptLibraryView.vue @@ -220,25 +220,24 @@ const getLengthLabel = (length) => { const getTags = (script) => { if (Array.isArray(script.tags) && script.tags.length) return script.tags.slice(0, 4) - return [script.style || '逆袭成长', '都市', '事业', '热血'] + return [] } -const getChapterCount = (script) => script.chapterCount || script.chapters || Math.max(1, Math.round((script.wordCount || 30000) / 4500)) +const getChapterCount = (script) => script.chapterCount || script.chapters || 0 const getWordCount = (script) => { const count = Number(script.wordCount || 0) - if (!count) return '3.1万字' if (count >= 10000) return `${(count / 10000).toFixed(1)}万字` return `${count}字` } const getDateText = (script) => { - if (getStatus(script) === 'done') return `完成于:${script.completedAt || script.date || '2025.05.10'}` - if (getStatus(script) === 'draft') return `创建于:${script.createdAt || script.date || '2025.05.08'}` - return `最近更新:${script.updatedAt || script.date || '今天 21:30'}` + if (getStatus(script) === 'done') return `完成于:${script.completedAt || script.date || ''}` + if (getStatus(script) === 'draft') return `创建于:${script.createdAt || script.date || ''}` + return `最近更新:${script.updatedAt || script.date || ''}` } -const getProgress = (script) => Math.max(1, Math.min(99, Number(script.progress || 28))) +const getProgress = (script) => Math.max(0, Math.min(99, Number(script.progress || 0))) const getInitial = (script) => (script.title || '剧').slice(0, 1)