Fix options review screenshots missing after journal upload hijack.
Stop journal_upload_slots from binding options slots; resolve journal_* files from static/images root so existing reviews display again. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -498,7 +498,12 @@
|
||||
var slash = name.lastIndexOf("/");
|
||||
if (slash >= 0) name = name.slice(slash + 1);
|
||||
if (!name) return "";
|
||||
return "/static/images/options_journal/" + encodeURIComponent(name);
|
||||
// options_journal_* 在子目录;误走合约上传的 journal_* 在 static/images 根目录
|
||||
var base =
|
||||
name.toLowerCase().indexOf("options_journal_") === 0
|
||||
? "/static/images/options_journal/"
|
||||
: "/static/images/";
|
||||
return base + encodeURIComponent(name);
|
||||
}
|
||||
|
||||
function renderDetailImages(images) {
|
||||
@@ -940,7 +945,21 @@
|
||||
);
|
||||
if (hidden && img.file) {
|
||||
hidden.value = img.file;
|
||||
if (status) status.textContent = "已有 " + img.file;
|
||||
if (status) {
|
||||
var src = optionsJournalImgSrc(img.file);
|
||||
status.innerHTML =
|
||||
'已有 <a href="' +
|
||||
src +
|
||||
'" target="_blank" rel="noopener">' +
|
||||
escapeHtml(img.file) +
|
||||
'</a><br><img class="or-slot-thumb" src="' +
|
||||
src +
|
||||
'" alt="' +
|
||||
escapeHtml(img.tf || "") +
|
||||
'" loading="lazy">';
|
||||
status.className =
|
||||
"journal-upload-status or-upload-status journal-upload-status--ok";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user