imeepos
|
4270973652
|
refactor: 优化代码和添加类型检查脚本
- 统一 OWNER_ID 导入,从 lib/auth 导入而非环境变量
- 添加 type-checks 脚本用于 TypeScript 类型检查
- 对接 my 页面后端接口,使用 useTemplateGenerations
- 添加 MySkeleton 骨架屏组件
- 添加下拉刷新功能
- 添加空状态提示文案
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-01-16 12:34:27 +08:00 |
imeepos
|
755a374b67
|
feat: 对接 generateVideo 页面后端接口
- 新增 uploadFile 工具函数用于图片上传
- 更新 useTemplateActions hook 使用 handleError 统一错误处理
- 实现 generateVideo 页面视频生成功能
- 根据 formSchema.startNodes 动态构建请求数据
- 支持图片和文本输入
- 添加 loading 状态和错误提示
- 生成成功后显示通知并返回
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-01-16 12:33:05 +08:00 |
imeepos
|
4d1e901032
|
fix: 修复所有 TypeScript 类型错误
- 修复 webpPreviewUrl -> previewUrl 字段名错误
- 修复 video.tsx 中的 useTemplates 参数类型问题
- 修复 video.tsx 中 position 重复定义问题
- 修复 searchResults.tsx 中的 SearchResultItem 类型不匹配
- 修复 SearchResultsGrid.tsx 中不存在的 scrollContent 样式
- 修复 use-templates.ts 中 page 可能是 undefined 的类型问题
- 添加 tsconfig.json 的 exclude 配置
- 修复 use-template-actions.ts 中 null 不能赋值给 ApiError 的问题
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-01-16 12:14:04 +08:00 |
imeepos
|
ae120f24d3
|
feat: 对接 templateDetail 页面后端接口
- 创建 hooks/use-error.ts 统一错误处理
- 创建 hooks/use-template-detail.ts 获取模板详情
- 创建 hooks/use-template-generations.ts 获取模板生成记录
- 更新 hooks 使用 handleError 统一错误处理
- 优化 SearchResultsGrid 组件,复用 TemplateGeneration 类型
- 删除不必要的类型转换和重复代码
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-01-16 11:56:38 +08:00 |
imeepos
|
fb719c6ea2
|
fix: 对接退出登录
|
2026-01-13 17:03:14 +08:00 |
imeepos
|
37a4a2f807
|
fix: 成功对接登录接口
|
2026-01-13 16:25:49 +08:00 |
imeepos
|
2f290eeedd
|
fix: 区分登录失败和 Token 过期的 401 错误
- 登录/注册接口的 401 不触发全局拦截器
- 让认证错误正常传递到表单组件显示 i18n 翻译
- 只有其他接口的 401 才认为是 Token 过期
- 移除调试日志
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-01-13 16:19:22 +08:00 |
imeepos
|
a66bcca38b
|
fix: 使用 RNText 并设置白色文字颜色
|
2026-01-13 16:16:43 +08:00 |
imeepos
|
40571d2337
|
fix: 修复 Toast 支持字符串参数
|
2026-01-13 16:13:21 +08:00 |
imeepos
|
7cf896215c
|
fix: 增加 Toast 默认显示时间从 2秒 到 4秒
|
2026-01-13 16:12:20 +08:00 |
imeepos
|
3eeff10338
|
fix: 使用内联样式修复 Toast 显示过小问题
- 使用内联样式替代 TailwindCSS 类名
- 设置固定位置在屏幕 30% 高度处
- 字体大小 18px,字重 600
- 背景 rgba(0,0,0,0.9) 深色半透明
- 最小高度 60px,内边距 20px
- 圆角 12px,添加阴影效果
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-01-13 16:09:59 +08:00 |
imeepos
|
3f1f10be49
|
fix: 优化 Toast 样式使其更明显
- 增大字体从 16px 到 18px
- 添加字重加粗 (font-semibold)
- 增加内边距 (px: 12→24, py: 8→16)
- 增加外边距 (mx: 20→40)
- 增加背景不透明度 (85%→90%)
- 增加圆角 (2px→8px)
- 添加阴影效果 (shadow-lg)
- 调整垂直位置 (mt-[-40px]→mt-[-80px])
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-01-13 16:08:21 +08:00 |
imeepos
|
99e2c5fafc
|
fix: 修复 Toast 未定义导致 fetch 拦截器崩溃
- 添加 Toast 调用的 try-catch 安全检查
- 修复 "Cannot read properties of undefined (reading 'show')" 错误
- 确保 fetch 拦截器在 Toast 未初始化时也能正常工作
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-01-13 16:06:47 +08:00 |
imeepos
|
2d0a21205f
|
feat: 添加认证错误 i18n 翻译
- 添加常见认证错误代码的翻译(中英文)
- 修改 AuthForm 组件处理错误代码
- 支持的错误类型:
- INVALID_USERNAME_OR_PASSWORD: 用户名或密码错误
- USER_NOT_FOUND: 用户不存在
- EMAIL_ALREADY_EXISTS: 邮箱已被注册
- USERNAME_ALREADY_EXISTS: 用户名已被占用
- WEAK_PASSWORD: 密码强度不够
- INVALID_EMAIL: 邮箱格式不正确
- VALIDATION_ERROR: 输入信息格式错误
- NETWORK_ERROR: 网络连接失败
- UNKNOWN_ERROR: 未知错误
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-01-13 16:05:30 +08:00 |
imeepos
|
ee119d472f
|
fix: 修复 fetch 拦截器正确处理 JSON 请求体
- 正确处理不同类型的 headers(Headers 对象、数组、普通对象)
- 自动序列化对象类型的请求体为 JSON 字符串
- 确保非 GET/HEAD 请求设置正确的 Content-Type
- 修复登录请求体变成 [object Object] 的问题
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-01-13 16:02:28 +08:00 |
imeepos
|
c2c097efb3
|
fix: 添加 Content-Type: application/json 请求头
修复登录/注册接口返回 VALIDATION_ERROR 的问题
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-01-13 16:01:13 +08:00 |
imeepos
|
24fd3a8847
|
feat: 完善认证系统
- 修复 Storage 层使用 AsyncStorage
- 统一 Token 存储键名为 bestaibest.better-auth.session_token
- 启用 401 自动跳转登录页并显示 Toast 提示
- 添加全局认证守卫(AuthGuard 组件)
- 修复 x-ownerid header 配置(从环境变量读取商户ID)
- 导出 loomart API 供活动数据使用
主要修改:
- lib/storage.native.ts: 新建,使用 AsyncStorage
- lib/storage.ts: 添加错误处理和注释
- lib/fetch-logger.ts: 统一 Token 键,启用 401 拦截
- lib/auth.ts: 导出 TOKEN_KEY,修复 x-ownerid,导出 loomart
- app/_layout.tsx: 添加 AuthGuard 组件实现路由守卫
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-01-13 16:00:02 +08:00 |
imeepos
|
1a6df3c806
|
fix: 登录页面
|
2026-01-13 15:55:52 +08:00 |
imeepos
|
a2ba14d312
|
fix: 添加 repo/sdk 依赖
|
2026-01-13 15:00:00 +08:00 |
imeepos
|
9fa65a9ac3
|
fix: 添加better auth 接口配置
|
2026-01-13 14:58:48 +08:00 |
imeepos
|
02d0c807cd
|
Initial commit: expo-popcore-app
|
2025-12-25 16:25:55 +08:00 |