|
@@ -4139,7 +4139,7 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
const hasDeconstruction = deconstructionData[noteId] != null && matchType.includes('完全匹配');
|
|
const hasDeconstruction = deconstructionData[noteId] != null && matchType.includes('完全匹配');
|
|
|
|
|
|
|
|
html += `
|
|
html += `
|
|
|
- <div class="note-card ${{matchClass}}" style="border:2px solid #fbbf24;border-radius:12px;overflow:hidden;background:white;transition:all 0.2s;">
|
|
|
|
|
|
|
+ <div class="note-card ${{matchClass}}" style="border:2px solid #fbbf24;border-radius:12px;overflow:hidden;background:white;transition:all 0.2s;cursor:pointer;" onclick="openNoteImagesModal(${{featureIdx}}, ${{baseWordIdx}}, ${{swIdx}}, ${{noteIdx}})">
|
|
|
<!-- 图片轮播区域 -->
|
|
<!-- 图片轮播区域 -->
|
|
|
<div style="position:relative;width:100%;height:200px;background:#f3f4f6;">
|
|
<div style="position:relative;width:100%;height:200px;background:#f3f4f6;">
|
|
|
${{cover ? `<img src="${{cover}}" style="width:100%;height:100%;object-fit:cover;">` : `<div style="width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:#9ca3af;">${{typeIcon}}</div>`}}
|
|
${{cover ? `<img src="${{cover}}" style="width:100%;height:100%;object-fit:cover;">` : `<div style="width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:#9ca3af;">${{typeIcon}}</div>`}}
|
|
@@ -4155,17 +4155,15 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
${{title}}
|
|
${{title}}
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <!-- 类型标签 -->
|
|
|
|
|
- <div style="margin-bottom:8px;">
|
|
|
|
|
|
|
+ <!-- 类型标签和作者信息 -->
|
|
|
|
|
+ <div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;">
|
|
|
<span style="display:inline-block;padding:2px 8px;background:#ecfdf5;color:#059669;font-size:11px;border-radius:4px;">
|
|
<span style="display:inline-block;padding:2px 8px;background:#ecfdf5;color:#059669;font-size:11px;border-radius:4px;">
|
|
|
${{typeIcon}} 图文
|
|
${{typeIcon}} 图文
|
|
|
</span>
|
|
</span>
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 作者信息 -->
|
|
|
|
|
- <div style="display:flex;align-items:center;margin-bottom:10px;">
|
|
|
|
|
- ${{userAvatar ? `<img src="${{userAvatar}}" style="width:20px;height:20px;border-radius:50%;margin-right:6px;">` : '<div style="width:20px;height:20px;border-radius:50%;background:#e5e7eb;margin-right:6px;"></div>'}}
|
|
|
|
|
- <span style="font-size:11px;color:#6b7280;">${{userName}}</span>
|
|
|
|
|
|
|
+ <div style="display:flex;align-items:center;">
|
|
|
|
|
+ ${{userAvatar ? `<img src="${{userAvatar}}" style="width:20px;height:20px;border-radius:50%;margin-right:6px;">` : '<div style="width:20px;height:20px;border-radius:50%;background:#e5e7eb;margin-right:6px;"></div>'}}
|
|
|
|
|
+ <span style="font-size:11px;color:#6b7280;">${{userName}}</span>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 评分徽章 -->
|
|
<!-- 评分徽章 -->
|
|
@@ -5166,12 +5164,25 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
|
|
|
|
|
// ========== 新增功能2: 帖子图片浮层模态窗口 ==========
|
|
// ========== 新增功能2: 帖子图片浮层模态窗口 ==========
|
|
|
function openNoteImagesModal(featureIdx, groupIdx, searchIdx, noteIdx) {{
|
|
function openNoteImagesModal(featureIdx, groupIdx, searchIdx, noteIdx) {{
|
|
|
|
|
+ console.log('🎯 [点击事件] 参数 - featureIdx:', featureIdx, 'groupIdx:', groupIdx, 'searchIdx:', searchIdx, 'noteIdx:', noteIdx);
|
|
|
|
|
+
|
|
|
const feature = data[featureIdx];
|
|
const feature = data[featureIdx];
|
|
|
|
|
+ console.log('📊 [数据检查] feature:', feature);
|
|
|
|
|
+
|
|
|
const group = feature['组合评估结果_分组'][groupIdx];
|
|
const group = feature['组合评估结果_分组'][groupIdx];
|
|
|
|
|
+ console.log('📊 [数据检查] group:', group);
|
|
|
|
|
+
|
|
|
const search = group['top10_searches'][searchIdx];
|
|
const search = group['top10_searches'][searchIdx];
|
|
|
|
|
+ console.log('📊 [数据检查] search:', search);
|
|
|
|
|
+
|
|
|
const searchResult = search.search_result || {{}};
|
|
const searchResult = search.search_result || {{}};
|
|
|
|
|
+ console.log('📊 [数据检查] searchResult:', searchResult);
|
|
|
|
|
+
|
|
|
const notes = searchResult.data?.data || [];
|
|
const notes = searchResult.data?.data || [];
|
|
|
|
|
+ console.log('📊 [数据检查] notes数组长度:', notes.length);
|
|
|
|
|
+
|
|
|
const note = notes[noteIdx];
|
|
const note = notes[noteIdx];
|
|
|
|
|
+ console.log('📊 [数据检查] note:', note);
|
|
|
|
|
|
|
|
if (!note) {{
|
|
if (!note) {{
|
|
|
console.log('❌ [浮层] 找不到帖子数据');
|
|
console.log('❌ [浮层] 找不到帖子数据');
|
|
@@ -5179,16 +5190,23 @@ def generate_html(data: List[Dict[str, Any]], stats: Dict[str, Any],
|
|
|
}}
|
|
}}
|
|
|
|
|
|
|
|
const card = note.note_card || {{}};
|
|
const card = note.note_card || {{}};
|
|
|
|
|
+ console.log('📊 [数据检查] note_card:', card);
|
|
|
|
|
+
|
|
|
const images = card.image_list || [];
|
|
const images = card.image_list || [];
|
|
|
|
|
+ console.log('📊 [数据检查] image_list:', images);
|
|
|
|
|
+ console.log('📊 [数据检查] image_list类型:', typeof images, 'isArray:', Array.isArray(images));
|
|
|
|
|
+
|
|
|
const title = card.display_title || '无标题';
|
|
const title = card.display_title || '无标题';
|
|
|
const noteId = note.id || '';
|
|
const noteId = note.id || '';
|
|
|
|
|
|
|
|
console.log('🔍 [帖子图片浮层] 帖子ID:', noteId);
|
|
console.log('🔍 [帖子图片浮层] 帖子ID:', noteId);
|
|
|
console.log('🔍 [帖子图片浮层] 标题:', title);
|
|
console.log('🔍 [帖子图片浮层] 标题:', title);
|
|
|
console.log('🔍 [帖子图片浮层] 图片数量:', images.length);
|
|
console.log('🔍 [帖子图片浮层] 图片数量:', images.length);
|
|
|
|
|
+ console.log('🔍 [帖子图片浮层] 图片数组内容:', images);
|
|
|
|
|
|
|
|
if (images.length === 0) {{
|
|
if (images.length === 0) {{
|
|
|
console.log('❌ [浮层] 该帖子没有图片');
|
|
console.log('❌ [浮层] 该帖子没有图片');
|
|
|
|
|
+ console.log('❌ [浮层] card完整内容:', JSON.stringify(card, null, 2));
|
|
|
return;
|
|
return;
|
|
|
}}
|
|
}}
|
|
|
|
|
|