@echo off chcp 65001 >nul echo ======================================== echo 强制重新编译 - 切换到本地服务器 echo ======================================== echo. echo [1/4] 停止所有node进程... taskkill /F /IM node.exe 2>nul timeout /t 2 >nul echo. echo [2/4] 清除编译缓存... cd peidu\uniapp if exist unpackage\dist\dev\mp-weixin rmdir /s /q unpackage\dist\dev\mp-weixin if exist .hbuilderx rmdir /s /q .hbuilderx if exist node_modules\.cache rmdir /s /q node_modules\.cache echo 缓存清除完成 echo. echo [3/4] 重新编译小程序... echo 正在编译,请稍候... call npm run dev:mp-weixin echo. echo [4/4] 完成! echo ======================================== echo 现在使用本地服务器: http://localhost:8089 echo. echo 请在微信开发者工具中: echo 1. 点击"编译" 按钮 echo 2. 或者按 Ctrl+B 重新编译 echo 3. 查看控制台确认BASE_URL是否为localhost:8089 echo ======================================== pause