Files
x-server-mobile/frontend
root e31cf88eab fix: 添加与登录页相同的 tt 对象刷新机制
问题:
- 登录页可以飞书免登,但审批详情页不能
- 原因:登录页有刷新机制等待 tt 对象注入,审批详情页没有

修复:
- approval/detail.tsx - 添加与登录页相同的刷新逻辑
- 在飞书中但 tt 对象不存在时,自动刷新页面(最多3次)
- 每次刷新后重新检测 tt 对象是否已注入

工作流程:
1. 用户点击飞书消息按钮
2. 打开审批详情页
3. 检测到在飞书中但 tt 对象不存在
4. 自动刷新页面(最多3次)
5. tt 对象注入成功后自动免登
6. 免登成功后加载审批详情

相关文件:
- frontend/src/pages/approval/detail.tsx

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 19:28:04 +08:00
..
2026-02-26 09:59:41 +08:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])