peixue-dev/Archive/[一次性]清除缓存重新编译-游客模式修复-2026-02-01.bat

67 lines
1.6 KiB
Batchfile
Raw Permalink 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
chcp 65001 >nul
echo ========================================
echo 清除缓存并重新编译 - 游客模式修复
echo ========================================
echo.
cd /d "%~dp0..\peidu\uniapp"
echo [1/5] 清除 node_modules/.cache 目录...
if exist "node_modules\.cache" (
rmdir /s /q "node_modules\.cache"
echo ✓ 已清除 node_modules/.cache
) else (
echo ✓ node_modules/.cache 不存在
)
echo.
echo [2/5] 清除 unpackage 目录...
if exist "unpackage" (
rmdir /s /q "unpackage"
echo ✓ 已清除 unpackage
) else (
echo ✓ unpackage 不存在
)
echo.
echo [3/5] 清除 dist 目录...
if exist "dist" (
rmdir /s /q "dist"
echo ✓ 已清除 dist
) else (
echo ✓ dist 不存在
)
echo.
echo [4/5] 清除微信开发者工具缓存...
echo 请手动在微信开发者工具中:
echo 1. 点击菜单栏 "工具" - "清除缓存"
echo 2. 勾选所有选项文件缓存、数据缓存、Storage
echo 3. 点击"清除"
echo.
pause
echo.
echo [5/5] 重新编译小程序...
call npm run dev:mp-weixin
echo.
echo ========================================
echo 编译完成!
echo ========================================
echo.
echo 接下来请按照以下步骤测试:
echo.
echo 1. 在微信开发者工具中点击"编译"
echo 2. 打开调试器,切换到 Storage 标签
echo 3. 删除 token、userInfo、currentRole
echo 4. 刷新小程序
echo 5. 访问"服务日历"页面
echo 6. 验证不弹出"登录已过期"提示
echo.
echo 详细测试步骤请查看:
echo Archive\[一次性]游客模式测试步骤-2026-02-01.md
echo.
pause