Commit Graph

2 Commits

Author SHA1 Message Date
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