This commit is contained in:
haoouba 2021-01-30 20:49:05 +08:00
parent b7625a5e0c
commit dbd749f6f8

View File

@ -137,7 +137,7 @@ document.addEventListener('DOMContentLoaded', () => {
<dd><span class="muted">类型</span><p class="text">${item.vod_class || ''}</p></dd>
<dd><span class="muted">主演</span><p class="text">${item.vod_actor || ''}</p></dd>
<dd><span class="muted">导演</span><p class="text">${item.vod_director || ''}</p></dd>
<dd><span class="muted">简介</span><p class="text">${item.vod_content ? item.vod_content : item.vod_blurb}</p></dd>
<dd><span class="muted">简介</span><p class="text">${getContent(item)}</p></dd>
</dl>
`)
new LazyLoad('.video_lazyload')
@ -145,5 +145,15 @@ document.addEventListener('DOMContentLoaded', () => {
})
}
function getContent(item) {
if (item.vod_content) {
return item.vod_content.replace(/<[^>]+>/g, '')
} else if (item.vod_blurb) {
return item.vod_blurb.replace(/<[^>]+>/g, '')
} else {
return '暂无简介'
}
}
console.timeEnd('Video.js执行时长')
})