From dbd749f6f842e7163f631a9337bacb8c9f673c4e Mon Sep 17 00:00:00 2001 From: haoouba <2323333339@qq.com> Date: Sat, 30 Jan 2021 20:49:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/joe.video.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/assets/js/joe.video.js b/assets/js/joe.video.js index 0fcc0a4..f0aeeff 100644 --- a/assets/js/joe.video.js +++ b/assets/js/joe.video.js @@ -137,7 +137,7 @@ document.addEventListener('DOMContentLoaded', () => {
类型:

${item.vod_class || '未知'}

主演:

${item.vod_actor || '未知'}

导演:

${item.vod_director || '未知'}

-
简介:

${item.vod_content ? item.vod_content : item.vod_blurb}

+
简介:

${getContent(item)}

`) 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执行时长') })