@echo off chcp 65001 >nul title 智慧运营中台 cd /d "%~dp0" echo ============================================ echo 智慧运营中台 - Windows 启动器 echo 目录:%CD% echo ============================================ echo. where node >nul 2>nul if errorlevel 1 ( echo [错误] 未检测到 Node.js。 echo 请先安装 Node.js 22.13 或更高版本:https://nodejs.org/ echo 安装后重新打开本窗口再试。 echo. pause exit /b 1 ) node -e "const [a,b]=process.versions.node.split('.').map(Number);if(a<22||(a===22&&b<13)){console.error('当前 Node.js '+process.version+' 过低,需要 22.13 及以上。');process.exit(1)}" if errorlevel 1 ( echo. pause exit /b 1 ) echo 使用 Node:%CD% node -v echo. if not exist node_modules ( echo 正在安装依赖(首次启动需要几分钟)... call npm install if errorlevel 1 ( echo. echo [错误] 依赖安装失败。请检查网络,或手动在命令行执行:npm install pause exit /b 1 ) ) echo 正在启动服务,启动后请保持本窗口不要关闭... echo 浏览器访问:http://localhost:5177 echo. call npm start echo. echo 服务已退出。若上方有报错信息,请截图反馈。 pause