feat: 添加mock数据

This commit is contained in:
zdl
2025-11-05 16:49:13 +08:00
parent 4c08ef57ff
commit 623ec73c62
3 changed files with 88 additions and 1 deletions

View File

@@ -34,7 +34,7 @@ export async function startMockServiceWorker() {
// 🎯 严格模式(关键配置)
// 'bypass': 未定义 Mock 的请求自动转发到真实后端
// 'warn': 未定义的请求会显示警告(调试用)
// 'error': 未定义的请求会抛出错误(严格模式)✅ 当前使用
// 'error': 未定义的请求会抛出错误(严格模式)✅ 当前使用 穿透模式 bypass
onUnhandledRequest: 'error',
// 自定义 Service Worker URL如果需要