peixue-dev/Archive/[一次性]修复中文乱码-2026-01-28.bat

44 lines
959 B
Batchfile

@echo off
chcp 65001 >nul
echo ========================================
echo 修复中文乱码问题
echo ========================================
echo.
cd /d "%~dp0..\peidu\uniapp"
echo [1/3] 停止开发服务器...
taskkill /F /IM node.exe 2>nul
timeout /t 2 >nul
echo.
echo [2/3] 清除编译缓存...
if exist unpackage (
rmdir /s /q unpackage
echo ✓ 已删除 unpackage 目录
)
if exist node_modules\.cache (
rmdir /s /q node_modules\.cache
echo ✓ 已删除 node_modules\.cache 目录
)
echo.
echo [3/3] 使用 UTF-8 编码重新编译...
chcp 65001
set NODE_OPTIONS=--max_old_space_size=4096
call npm run dev:mp-weixin
echo.
echo ========================================
echo 编译完成!
echo.
echo 下一步操作:
echo 1. 在微信开发者工具中点击"清缓存" -> "清除全部缓存"
echo 2. 重新打开项目
echo 3. 检查中文是否正常显示
echo ========================================
echo.
pause