Commit Graph

4 Commits

Author SHA1 Message Date
root c1e54d9457 chore: 移除已迁移的旧文件 2026-02-27 18:01:32 +08:00
root 6d08695a7d feat: 优化飞书免登失败后的用户体验
问题:
- 移动端飞书 WebView 中 JSBridge SDK 未注入
- 导致免登功能不可用

修复:
1. debug-feishu.tsx - 多次检测环境,添加重试和重新检测功能
2. login/index.tsx - 支持 redirect 参数,登录成功后返回原页面
3. QRCodeLogin.tsx - 支持 redirect 参数

用户体验改进:
- 免登失败时,友好提示用户使用其他登录方式
- 登录成功后自动返回到原页面(审批详情页)
- 用户完成登录后可直接进行审批操作

替代方案:
1. 点击飞书消息中的"查看详情"按钮
2. 跳转到登录页面
3. 使用邮箱/密码或扫码登录
4. 登录成功后自动返回审批详情页
5. 直接进行审批操作

相关文件:
- frontend/src/pages/debug-feishu.tsx
- frontend/src/pages/login/index.tsx
- frontend/src/pages/login/QRCodeLogin.tsx

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:24:20 +08:00
root 7e57e8720b feat: 添加飞书 JSBridge SDK 支持
问题:
- 移动端飞书 WebView 中 tt 对象没有被注入
- 导致免登功能无法使用

修复:
1. index.html - 引入飞书 H5 JSBridge SDK
2. approval/detail.tsx - 添加对多种飞书 API 的支持
3. debug-feishu.tsx - 更新调试页面,检测所有可能的 API 对象

支持的飞书 API:
- window.tt (标准 H5 应用)
- window.h5sdk (JSBridge)
- window.bridge (JSBridge)
- window.ttjsBridge (旧版)

相关文件:
- frontend/index.html
- frontend/src/pages/approval/detail.tsx
- frontend/src/pages/debug-feishu.tsx

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:21:01 +08:00
root f31abf2c68 feat: 添加飞书环境调试页面和详细日志
修改内容:
1. 新增 debug-feishu.tsx - 飞书环境调试页面
2. approval/detail.tsx - 添加详细的调试日志
3. router/index.tsx - 添加调试页面路由
4. business-trip.ts - 修复 import 错误

调试页面功能:
- 检测是否在飞书客户端内
- 显示 window.tt 等对象状态
- 测试飞书免登功能

使用方法:
1. 在飞书客户端中打开: https://xsm.dev.hnxinyouhe.com/debug-feishu
2. 查看环境信息
3. 点击"测试飞书免登"按钮

相关文件:
- frontend/src/pages/debug-feishu.tsx
- frontend/src/pages/approval/detail.tsx
- frontend/src/router/index.tsx
- frontend/src/services/business-trip.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:16:33 +08:00