Fix CoinOX static JS path so hedge_plan.js is served.

dirname(BASE_DIR) pointed at /opt/lib and returned 404, leaving the hedge page stuck on loading.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-14 11:28:05 +08:00
parent 135cdc13ba
commit a845da8d08
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -9408,7 +9408,8 @@ def api_reviews():
return jsonify([row_to_dict(r) for r in rows])
_REPO_STATIC_DIR = common_static_dir(os.path.dirname(BASE_DIR))
# CoinOX 独立仓: app.py 与 lib/ 同级,勿再 dirname(BASE_DIR)(会落到 /opt/lib 导致静态 404)
_REPO_STATIC_DIR = common_static_dir(_REPO_ROOT)
_AI_REVIEW_RENDER_JS = os.path.join(_REPO_STATIC_DIR, "ai_review_render.js")
_FORM_SUBMIT_GUARD_JS = os.path.join(_REPO_STATIC_DIR, "form_submit_guard.js")
_MANUAL_ORDER_RR_PREVIEW_JS = os.path.join(_REPO_STATIC_DIR, "manual_order_rr_preview.js")