peixue-dev/Archive/[一次性]完整修复游客模式-专项课程-2026-02-01.bat

47 lines
1.3 KiB
Batchfile
Raw Permalink Normal View History

2026-02-28 17:26:03 +08:00
@echo off
chcp 65001 >nul
echo ========================================
echo 完整修复游客模式 - 专项课程
echo ========================================
echo.
echo [1/3] 停止后端服务(如果正在运行)...
for /f "tokens=5" %%a in ('netstat -aon ^| find ":8089" ^| find "LISTENING"') do (
echo 找到进程ID: %%a
taskkill /F /PID %%a
echo 已停止进程 %%a
)
timeout /t 2 /nobreak >nul
echo.
echo [2/3] 清除前端缓存并重新编译小程序...
cd peidu\uniapp
if exist node_modules\.cache (
rmdir /s /q node_modules\.cache
echo 已清除 node_modules\.cache
)
if exist dist (
rmdir /s /q dist
echo 已清除 dist 目录
)
if exist unpackage (
rmdir /s /q unpackage
echo 已清除 unpackage 目录
)
echo.
echo [3/3] 现在请执行以下操作:
echo.
echo 1. 在IDEA中重新启动后端服务PeiduApplication
echo 2. 等待后端启动完成(看到 "Started PeiduApplication" 日志)
echo 3. 在微信开发者工具中点击"编译"按钮
echo 4. 测试游客模式访问专项课程列表
echo.
echo ========================================
echo 修复内容:
echo - 后端:添加 /api/special-course/** 到游客白名单
echo - 前端:添加专项课程接口到游客白名单
echo ========================================
echo.
pause