From d22ca2a85ca593cd691e7ff9a9780cc37262533d Mon Sep 17 00:00:00 2001 From: imeepos Date: Tue, 11 Nov 2025 18:11:05 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20=E6=80=A7=E8=83=BD=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E4=B8=8E=E4=BD=99=E9=A2=9D=E6=89=A3=E8=B4=B9=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E9=9B=86=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 主要更新: - 🚀 模板详情页性能优化:添加缓存机制、图片预加载、请求中断控制 - 💰 集成余额检查与扣费功能到表单提交流程 - 🔄 添加错误重试机制,提升用户体验 - 🎨 重构动态表单字段为独立组件 (DynamicFormField) - 🔧 修复类型错误,优化样式结构 技术细节: - 实现5分钟缓存策略减少API调用 - 使用 AbortController 管理请求生命周期 - React.memo 优化列表项渲染性能 - 图片预缓存提升加载体验 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .claude/settings.local.json | 24 +- app/(auth)/login.tsx | 2 +- app/result.tsx | 12 +- app/templates/[id].tsx | 237 +++++--- app/templates/[id]/form.tsx | 579 +++++--------------- components/forms/dynamic-form-field.tsx | 391 +++++++++++++ components/forms/dynamic-form.tsx | 2 +- components/video/fullscreen-video-modal.tsx | 34 +- components/video/video-player.tsx | 64 ++- lib/api/balance.ts | 50 ++ lib/types/template.ts | 9 + 11 files changed, 822 insertions(+), 582 deletions(-) create mode 100644 components/forms/dynamic-form-field.tsx create mode 100644 lib/api/balance.ts diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 4f78525..fbe3c20 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -1,28 +1,6 @@ { "permissions": { - "allow": [ - "WebFetch(domain:docs.expo.dev)", - "WebFetch(domain:docs.expo.dev)", - "WebSearch", - "Bash(git add:*)", - "Bash(git commit:*)", - "Bash(npx eas:*)", - "Bash(npx @expo/eas-cli@latest:*)", - "Bash(npx expo install:*)", - "Bash(eas --version:*)", - "Bash(eas build:configure:*)", - "Bash(bunx:*)", - "Bash(./gradlew:*)", - "Bash(java:*)", - "Bash(where:*)", - "Bash(echo:*)", - "Bash(set:*)", - "Bash(git --version:*)", - "Bash(export:*)", - "Bash(ls:*)", - "Bash(npx tsc --noEmit)", - "Bash(curl 'https://api.mixvideo.bowong.cc/api/template-generations?page=1&limit=20' )" - ], + "allow": [], "deny": [], "ask": [] } diff --git a/app/(auth)/login.tsx b/app/(auth)/login.tsx index 304654b..8d227ca 100644 --- a/app/(auth)/login.tsx +++ b/app/(auth)/login.tsx @@ -30,7 +30,7 @@ export default function LoginScreen() { useEffect(() => { if (!authLoading && isAuthenticated) { console.log("[Login] User authenticated, redirecting to tabs..."); - router.replace("/(tabs)"); + router.replace("/(tabs)" as any); } }, [isAuthenticated, authLoading]); diff --git a/app/result.tsx b/app/result.tsx index 168c3c4..6250b97 100644 --- a/app/result.tsx +++ b/app/result.tsx @@ -197,13 +197,11 @@ export default function ResultPage() { return (