You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

91 lines
2.0 KiB

@echo off
echo ================================
echo 任务管�系统测试�
echo ================================
echo.
echo 请选择�动模�:
echo 1. 普通模�(标准�动)
echo 2. 开�模�(热加�
echo.
set /p mode="请输入选择 (1 �2, 默认�1): "
if "%mode%"=="" set mode=1
if "%mode%"=="2" (
echo.
echo [INFO] �动开�模�(热加�...
call dev.bat
exit /b 0
)
echo.
echo [INFO] �动普通模�..
echo 正在�动系统...
echo.
REM 检查是�安装了�赖
if not exist "frontend\node_modules" (
echo [1/4] 安装�端�赖...
cd frontend
npm install
cd ..
)
if not exist "backend\go.mod" (
echo [2/4] �始化�端项�..
cd backend
go mod init task-track-backend
go mod tidy
cd ..
)
REM �动�端�务�
echo [3/4] �动�端�务�..
echo 正在�止现有的�端进�..
taskkill /f /im go.exe >nul 2>&1
timeout /t 1 /nobreak >nul
cd backend
echo 检查�端代�..
go build -o temp-test.exe main.go
if %errorlevel% neq 0 (
echo ��端编译失败,请检查代�
cd ..
pause
exit /b 1
)
del temp-test.exe >nul 2>&1
echo �动�端�务�..
start /b go run main.go
cd ..
echo 等待�端�动...
timeout /t 5 /nobreak >nul
REM �动�端�务�
echo [4/4] �动�端�务�..
cd frontend
start /b npm run dev
cd ..
echo.
echo ================================
echo 系统�动完��
echo ================================
echo.
echo 📱 �端地�: http://localhost:5173
echo 🔗 �端地�: http://localhost:8080
echo.
echo 🚀 测试说明:
echo 1. �览器会自动打开测试登录页�
echo 2. 点击"一键测试登���开始测�
echo 3. 测试账�: testuser / 123456
echo.
echo 📖 详细测试指�请查� TEST_GUIDE.md
echo.
echo 按任�键�止�务�..
pause >nul
echo 正在�止�务�..
REM 清�进程
taskkill /f /im go.exe >nul 2>&1
taskkill /f /im node.exe >nul 2>&1
echo �务器已�止�