diff --git a/lib/common/static/journal_upload_slots.js b/lib/common/static/journal_upload_slots.js
index 8e43422..5153985 100644
--- a/lib/common/static/journal_upload_slots.js
+++ b/lib/common/static/journal_upload_slots.js
@@ -93,8 +93,16 @@
});
}
+ function isOptionsReviewSlot(input) {
+ if (!input) return false;
+ if (input.classList && input.classList.contains("or-upload-input")) return true;
+ return !!(input.closest && input.closest("#or-upload-slots, #options-review-root"));
+ }
+
function bindInput(input) {
if (!input || input.dataset.journalSlotBound === "1") return;
+ // 期权复盘槽位由 options_review.js 处理,勿被合约复盘上传抢走
+ if (isOptionsReviewSlot(input)) return;
input.dataset.journalSlotBound = "1";
input.addEventListener("change", function () {
var file = input.files && input.files[0];
diff --git a/lib/common/static/options_review.js b/lib/common/static/options_review.js
index 2c6ec72..a963eba 100644
--- a/lib/common/static/options_review.js
+++ b/lib/common/static/options_review.js
@@ -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 =
+ '已有 ' +
+ escapeHtml(img.file) +
+ '';
+ status.className =
+ "journal-upload-status or-upload-status journal-upload-status--ok";
+ }
}
});
diff --git a/lib/instance/templates/embed_shell.html b/lib/instance/templates/embed_shell.html
index 53c910d..4368857 100644
--- a/lib/instance/templates/embed_shell.html
+++ b/lib/instance/templates/embed_shell.html
@@ -93,7 +93,7 @@
-
+
diff --git a/lib/instance/templates/index.html b/lib/instance/templates/index.html
index ed256b1..2a766aa 100644
--- a/lib/instance/templates/index.html
+++ b/lib/instance/templates/index.html
@@ -456,7 +456,7 @@
-
+
diff --git a/lib/options/options_review_images_lib.py b/lib/options/options_review_images_lib.py
index b1845a8..a0d0545 100644
--- a/lib/options/options_review_images_lib.py
+++ b/lib/options/options_review_images_lib.py
@@ -112,17 +112,23 @@ def images_json_dumps(items: Sequence[Mapping[str, str]]) -> Optional[str]:
def options_review_image_paths(row: Any, upload_folder: str) -> List[str]:
- upload_folder = os.path.abspath(upload_folder or "")
+ upload_root = os.path.abspath(upload_folder or "")
+ options_dir = options_review_upload_dir(upload_root)
paths: List[str] = []
seen: set[str] = set()
def _add(name: Optional[str]) -> None:
if not name:
return
- p = os.path.abspath(os.path.join(upload_folder, str(name).strip()))
- if os.path.isfile(p) and p not in seen:
- seen.add(p)
- paths.append(p)
+ base = os.path.basename(str(name).strip())
+ if not base:
+ return
+ for folder in (options_dir, upload_root):
+ p = os.path.abspath(os.path.join(folder, base))
+ if os.path.isfile(p) and p not in seen:
+ seen.add(p)
+ paths.append(p)
+ return
try:
keys = row.keys() if hasattr(row, "keys") else ()
diff --git a/lib/options/options_review_register.py b/lib/options/options_review_register.py
index c73dbef..4dffe73 100644
--- a/lib/options/options_review_register.py
+++ b/lib/options/options_review_register.py
@@ -100,7 +100,13 @@ def register_options_review_routes(app: Flask, cfg: dict[str, Any], repo_root: s
safe = os.path.basename(filename or "")
path = os.path.join(folder, safe)
if not os.path.isfile(path):
- return ("not found", 404)
+ # 兼容误走合约 journal 上传、落在 UPLOAD_FOLDER 根目录的文件
+ root = os.path.abspath(cfg["upload_folder"] or "")
+ alt = os.path.join(root, safe)
+ if os.path.isfile(alt):
+ path = alt
+ else:
+ return ("not found", 404)
return send_file(path)
@app.route("/api/options/review/sync", methods=["POST"])
diff --git a/lib/options/templates/options_review_panel.html b/lib/options/templates/options_review_panel.html
index 73135c5..13c7aca 100644
--- a/lib/options/templates/options_review_panel.html
+++ b/lib/options/templates/options_review_panel.html
@@ -68,6 +68,11 @@
.or-pager{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:.74rem}
.or-list-loading{opacity:.55;pointer-events:none;transition:opacity .12s ease}
.or-trades-table-wrap,.or-reviewed-table-wrap{min-height:9.5rem}
+ .or-slot-thumb{
+ display:block;margin-top:6px;max-width:160px;max-height:90px;
+ object-fit:contain;border-radius:4px;border:1px solid rgba(127,127,127,.3);
+ background:rgba(0,0,0,.2);cursor:zoom-in;
+ }
{# 1. 交易记录(含 Tab/筛选,固定约5行) #}
@@ -176,13 +181,12 @@
-