适配朋友圈插件v1.4.3-4

This commit is contained in:
anian
2026-04-21 16:06:28 +08:00
parent 565bf30ea5
commit 73dc2a1c1c
2 changed files with 5 additions and 7 deletions
+4 -6
View File
@@ -74,13 +74,11 @@
<!-- 图片列表 -->
<div class="img_list img-dynamic-container">
<div class="list_inner"
th:with="isImgList=${#strings.startsWith(spec.title, 'img:::')}"
th:attr="num=${isImgList ? #arrays.length(#strings.substringAfter(spec.title, 'img:::').split(',')) : 0}">
<!-- 只有识别为图片列表时才渲染 -->
th:with="imgRaw=${spec.imageFiles},isImgList=${not #strings.isEmpty(imgRaw)}"
th:attr="num=${isImgList ? #arrays.length(imgRaw.split(',')) : 0}">
<!-- 仅使用 imageFiles;字段缺失或为空时不显示图片 -->
<th:block th:if="${isImgList}">
<!-- 去掉前缀,分割数组 -->
<th:block
th:with="imgArray=${#strings.substringAfter(spec.title, 'img:::').split(',')}">
<th:block th:with="imgArray=${imgRaw.split(',')}">
<th:block th:each="url : ${imgArray}"
th:with="cleanUrl=${#strings.trim(url)}">
<span class="fancybox mo_img"