@echo off echo 启动政府端微信小程序开发环境... echo. echo 检查Node.js环境... node --version if %errorlevel% neq 0 ( echo 错误: 未找到Node.js,请先安装Node.js 16.20.2+ pause exit /b 1 ) echo. echo 检查后端服务... curl -s http://localhost:5352/health >nul 2>&1 if %errorlevel% neq 0 ( echo 警告: 后端服务未运行,请先启动后端服务 echo 在另一个命令行窗口中运行: cd ../government-backend && npm start echo. echo 按任意键继续(后端服务将在后台启动)... pause >nul ) echo. echo 安装依赖包... call npm install if %errorlevel% neq 0 ( echo 错误: 依赖安装失败 pause exit /b 1 ) echo. echo 启动微信小程序开发模式... echo 请确保已安装并打开微信开发者工具 echo. call npm run dev:mp-weixin if %errorlevel% neq 0 ( echo 错误: 启动失败 pause exit /b 1 ) pause