fix(route/caixin): Handle occasional occurrence of nonexistent video content (#20241)

This commit is contained in:
Andvari
2025-10-06 22:56:44 +08:00
committed by GitHub
parent 13ea517f34
commit 2c46b2ad1c
+6 -4
View File
@@ -13,10 +13,12 @@
{{ if $('.article .content_video').length }}
<% const video = $('script').text().match(/initPlayer\('(.*?)','(.*?)'\)/); %>
<% const videoUrl = video[1]; %>
<% const poster = video[2]; %>
<video controls preload="metadata" poster="{{ poster }}" src="{{ videoUrl }}"></video>
<br>
{{ if video}}
<% const videoUrl = video[1]; %>
<% const poster = video[2]; %>
<video controls preload="metadata" poster="{{ poster }}" src="{{ videoUrl }}"></video>
<br>
{{ /if }}
{{ /if }}
{{ if $('div#Main_Content_Val.text').length }}