${historyList.length === 0 ? '
暂无观看记录
' :
historyList.map(item => {
const ph = item.playHistory || {};
const epInfo = ph.playingIndex !== undefined ? `
第${ph.playingIndex + 1}集` : '';
let progressInfo = '';
if (ph.currentTime > 0 && ph.duration > 0) {
const pct = Math.min(Math.round((ph.currentTime / ph.duration) * 100), 100);
progressInfo = `
`;
}
const poster = item.posterUrl
? `
})
`
: `
🎬
`;
return `
${poster}
${escapeHtml(item.movieName)}
${epInfo}${progressInfo}${formatHistoryTime(item.timestamp)}
`}).join('')}