feat: 性能优化与余额扣费系统集成

主要更新:
- 🚀 模板详情页性能优化:添加缓存机制、图片预加载、请求中断控制
- 💰 集成余额检查与扣费功能到表单提交流程
- 🔄 添加错误重试机制,提升用户体验
- 🎨 重构动态表单字段为独立组件 (DynamicFormField)
- 🔧 修复类型错误,优化样式结构

技术细节:
- 实现5分钟缓存策略减少API调用
- 使用 AbortController 管理请求生命周期
- React.memo 优化列表项渲染性能
- 图片预缓存提升加载体验

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
imeepos
2025-11-11 18:11:05 +08:00
parent eee280d9b3
commit d22ca2a85c
11 changed files with 822 additions and 582 deletions

View File

@@ -38,6 +38,13 @@ export interface TemplateNodeActionData {
aspectRatio?: string;
selectedModel?: string;
advancedParams?: Record<string, string | number | boolean | null>;
// Select field
options?: Array<{ label: string; value: string }>;
required?: boolean;
placeholder?: string;
allowMultiple?: boolean;
// Text field
multiline?: boolean;
}
export interface TemplateNodeMetrics {
@@ -129,6 +136,8 @@ export interface Template {
uploadSapecifications?: string | null;
uploadSapecificationsEn?: string | null;
sortOrder?: number;
costPrice?: number | null;
price?: number | null;
category: Category | null;
tags: Tag[];
templateTags?: TemplateTagLink[];