Files
nxxmdata/government-mini-program/start-dev.bat

55 lines
1.1 KiB
Batchfile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@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 安装依赖包...
call npm install
if %errorlevel% neq 0 (
echo 错误: 依赖安装失败
pause
exit /b 1
)
echo.
echo 选择运行模式:
echo 1. H5版本 (推荐,立即可用)
echo 2. 微信小程序 (需要HBuilderX)
echo 3. 查看使用说明
echo.
set /p choice=请输入选择 (1-3):
if "%choice%"=="1" (
echo.
echo 启动H5开发服务器...
echo 请确保后端服务已启动在 http://localhost:5352
echo 浏览器将自动打开 http://localhost:8080
echo.
call npm run dev:h5
) else if "%choice%"=="2" (
echo.
echo 微信小程序开发需要HBuilderX
echo 请参考 微信小程序使用说明.md
echo.
pause
) else if "%choice%"=="3" (
echo.
echo 打开使用说明...
start 微信小程序使用说明.md
echo.
pause
) else (
echo 无效选择启动H5版本...
call npm run dev:h5
)
pause