@echo off chcp 65001 >nul title 丰享订单监控 v5 cd /d "%~dp0" echo ============================================ echo 丰享订单监控 v5 echo 推送: 企业微信(TTS 可选,见 config.yaml) echo ============================================ echo. :: 依次尝试:项目内虚拟环境 -> FX_PYTHON -> IndexTTS2 环境 -> 系统 python set "PYTHON=" if exist ".venv\Scripts\python.exe" set "PYTHON=.venv\Scripts\python.exe" if not defined PYTHON if defined FX_PYTHON set "PYTHON=%FX_PYTHON%" if not defined PYTHON if exist "E:\2025Code\python\IndexTT\index-tts\.venv\Scripts\python.exe" set "PYTHON=E:\2025Code\python\IndexTT\index-tts\.venv\Scripts\python.exe" if not defined PYTHON set "PYTHON=python" echo [环境] Python: %PYTHON% "%PYTHON%" -c "import requests, yaml" >nul 2>&1 if errorlevel 1 ( echo [准备] 缺少依赖,正在安装... "%PYTHON%" -m pip install -r requirements.txt ) if not exist "config.yaml" ( echo [提示] 未找到 config.yaml,将使用默认配置 echo 建议复制 config.example.yaml 为 config.yaml 后填写企业微信 webhook echo. ) echo [启动] 启动监控(Ctrl+C 退出)... echo. "%PYTHON%" order_monitor.py echo. echo [结束] 进程已退出,错误码: %errorlevel% pause