修复session路径重复定义导致登录后搜索初始化失败;log.user改为顶部import

This commit is contained in:
2026-05-15 16:10:05 +08:00
parent dd4ea009fe
commit ed62b49921
+2 -4
View File
@@ -41,6 +41,7 @@ from tkinter import (
from excel_reader import read_input_excel, validate_required_columns from excel_reader import read_input_excel, validate_required_columns
from field_mapping import get_defaults, get_field_mapping, get_fixed_values, get_timing_config, load_config from field_mapping import get_defaults, get_field_mapping, get_fixed_values, get_timing_config, load_config
from log import user as _log_user
# ─── 全局引擎引用 ────────────────────────────────────────── # ─── 全局引擎引用 ──────────────────────────────────────────
@@ -74,9 +75,6 @@ def _resource_path(relative_path):
else: else:
return os.path.join(os.path.dirname(os.path.abspath(__file__)), relative_path) return os.path.join(os.path.dirname(os.path.abspath(__file__)), relative_path)
def _get_session_path():
return _resource_path("session.json")
# ─── 异步引擎后台线程 ────────────────────────────────────── # ─── 异步引擎后台线程 ──────────────────────────────────────
def _run_async(coro): def _run_async(coro):
@@ -994,7 +992,7 @@ class App:
return await future return await future
def _log_sync(self, msg): def _log_sync(self, msg):
print(f"[{datetime.now().strftime('%H:%M:%S')}] {msg}", file=sys.stderr, flush=True) _log_user(msg)
# ─── 入口 ────────────────────────────────────────────────── # ─── 入口 ──────────────────────────────────────────────────