From ae1463e400f46c77568772a5a2d6ae62b13c589a Mon Sep 17 00:00:00 2001 From: Peanut Date: Tue, 23 Jun 2026 22:19:30 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E5=89=A7=E6=9C=AC=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=B7=A5=E5=85=B7=E5=87=BD=E6=95=B0=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=80=BC=E5=85=9C=E5=BA=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mini-program/src/pages/main/ScriptLibraryView.vue | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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)