From b3de26a4f625f901080e92b0d73e1e90141d6d0a Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期六, 06 十二月 2025 09:38:57 +0800
Subject: [PATCH] 图片回显修改

---
 fzzy-igdss-web/src/main/resources/static/snapRecord/snapRecord.js      |    4 ++--
 fzzy-igdss-web/src/main/resources/static/eventInfo/eventInfo.js        |    4 ++--
 fzzy-igdss-web/src/main/resources/templates/snapRecord/snapRecord.html |    6 ++----
 fzzy-igdss-web/src/main/resources/templates/eventInfo/eventInfo.html   |    4 ++--
 4 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/fzzy-igdss-web/src/main/resources/static/eventInfo/eventInfo.js b/fzzy-igdss-web/src/main/resources/static/eventInfo/eventInfo.js
index d396730..e1fc848 100644
--- a/fzzy-igdss-web/src/main/resources/static/eventInfo/eventInfo.js
+++ b/fzzy-igdss-web/src/main/resources/static/eventInfo/eventInfo.js
@@ -138,8 +138,8 @@
     records.forEach(function(record) {
         html += `
             <div class="gallery-item">
-                <img src="/logo-sm.png" alt="${record.id}"
-                     data-url="/logo-sm.png" data-id="${record.id}"
+                <img src="${record.imgName || '/logo-sm.png'}" alt="${record.id}"
+                    data-url="${record.imgName || '/logo-sm.png'}" data-id="${record.id}"
                      class="gallery-img" onclick="showEventInfoPreview(this.getAttribute('data-url'))">
                 <div class="gallery-info">
                     <div class="gallery-header">
diff --git a/fzzy-igdss-web/src/main/resources/static/snapRecord/snapRecord.js b/fzzy-igdss-web/src/main/resources/static/snapRecord/snapRecord.js
index 01668a6..dbf8807 100644
--- a/fzzy-igdss-web/src/main/resources/static/snapRecord/snapRecord.js
+++ b/fzzy-igdss-web/src/main/resources/static/snapRecord/snapRecord.js
@@ -138,8 +138,8 @@
     records.forEach(function(record) {
         html += `
             <div class="gallery-item">
-                <img src="/logo-sm.png" alt="${record.id}"
-                     data-url="/logo-sm.png" data-id="${record.id}"
+                <img  src="${record.imgName || '/logo-sm.png'}" alt="${record.id}"
+                     data-url="${record.imgName || '/logo-sm.png'}" data-id="${record.id}"
                      class="gallery-img" onclick="showSnapRecordPreview(this.getAttribute('data-url'))">
                 <div class="gallery-info">
                     <div class="gallery-header">
diff --git a/fzzy-igdss-web/src/main/resources/templates/eventInfo/eventInfo.html b/fzzy-igdss-web/src/main/resources/templates/eventInfo/eventInfo.html
index 490cd29..4148cf0 100644
--- a/fzzy-igdss-web/src/main/resources/templates/eventInfo/eventInfo.html
+++ b/fzzy-igdss-web/src/main/resources/templates/eventInfo/eventInfo.html
@@ -39,8 +39,8 @@
                 </div>
                 <!-- 浜嬩欢鍗$墖 -->
                 <div th:each="eventInfo : ${eventInfoList}" class="gallery-item">
-                    <img th:src="@{/logo-sm.png}" th:alt="${eventInfo.id}"
-                         th:data-url="@{/logo-sm.png}" th:data-id="${eventInfo.id}"
+                    <img th:src="${eventInfo.imgName ?: '/logo-sm.png'}" th:alt="${eventInfo.id}"
+                         th:data-url="${eventInfo.imgName ?: '/logo-sm.png'}" th:data-id="${eventInfo.id}"
                          class="gallery-img" onclick="showEventInfoPreview(this.getAttribute('data-url'))">
                     <div class="gallery-info">
                         <div class="gallery-header">
diff --git a/fzzy-igdss-web/src/main/resources/templates/snapRecord/snapRecord.html b/fzzy-igdss-web/src/main/resources/templates/snapRecord/snapRecord.html
index e3f1bc1..af916a6 100644
--- a/fzzy-igdss-web/src/main/resources/templates/snapRecord/snapRecord.html
+++ b/fzzy-igdss-web/src/main/resources/templates/snapRecord/snapRecord.html
@@ -39,10 +39,8 @@
                 </div>
                 <!-- 鍥剧墖鍗$墖 -->
                 <div th:each="snapRecord : ${snapRecordList}" class="gallery-item">
-<!--                    <img th:src="${snapRecord.imgPath}" th:alt="${snapRecord.id}"-->
-<!--                         th:data-url="${snapRecord.imgPath}" th:data-id="${snapRecord.id}"-->
-                    <img th:src="@{/logo-sm.png}" th:alt="${snapRecord.id}"
-                         th:data-url="@{/logo-sm.png}" th:data-id="${snapRecord.id}"
+                    <img th:src="${snapRecord.imgName ?: '/logo-sm.png'}" th:alt="${snapRecord.id}"
+                         th:data-url="${snapRecord.imgName ?: '/logo-sm.png'}" th:data-id="${snapRecord.id}"
                          class="gallery-img" onclick="showSnapRecordPreview(this.getAttribute('data-url'))">
                     <div class="gallery-info">
                         <div class="gallery-header">

--
Gitblit v1.9.3