Reorganize miniapp menu and fix legacy prototype React globals.

Move 安全培训扫码 under 小羚羚小程序 in the sidebar, eager-inject window.React before legacy page imports, and keep the sync script aligned with both behaviors.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
王冕
2026-06-30 16:54:36 +08:00
parent d71ebc5727
commit 098283784e
17 changed files with 66 additions and 19 deletions

View File

@@ -16,3 +16,6 @@ export function ensureOneosWebLegacyGlobals(): void {
window.ReactDOM = ReactDOM;
window.antd = antd;
}
// Legacy jsx 可能在模块顶层使用 React.createElement须在页面 import 之前完成注入。
ensureOneosWebLegacyGlobals();

View File

@@ -2,6 +2,7 @@
* @name 业务管理
* 自 ONE-OS web端 原稿复刻18 个页面)
*/
import '../../common/oneosWebLegacy/legacyGlobals';
import React from 'react';
import Page1 from './pages/01-保险采购.jsx';
import Page2 from './pages/02-编辑交车任务.jsx';

View File

@@ -2,6 +2,7 @@
* @name 合同模板管理
* 自 ONE-OS web端 原稿复刻1 个页面)
*/
import '../../common/oneosWebLegacy/legacyGlobals';
import React from 'react';
import Page1 from './pages/01-合同模板管理.jsx';
import { OneosWebLegacyShell } from '../../common/oneosWebLegacy/OneosWebLegacyShell';

View File

@@ -2,6 +2,7 @@
* @name 数据分析
* 自 ONE-OS web端 原稿复刻9 个页面)
*/
import '../../common/oneosWebLegacy/legacyGlobals';
import React from 'react';
import Page1 from './pages/01-客户服务部业务统计报表.jsx';
import Page2 from './pages/02-物流业务台账.jsx';

View File

@@ -2,6 +2,7 @@
* @name 财务管理
* 自 ONE-OS web端 原稿复刻10 个页面)
*/
import '../../common/oneosWebLegacy/legacyGlobals';
import React from 'react';
import Page1 from './pages/01-还车应结款-查看.jsx';
import Page2 from './pages/02-还车应结款-费用明细.jsx';

View File

@@ -2,6 +2,7 @@
* @name 加氢站管理
* 自 ONE-OS web端 原稿复刻3 个页面)
*/
import '../../common/oneosWebLegacy/legacyGlobals';
import React from 'react';
import Page1 from './pages/01-加氢订单.jsx';
import Page2 from './pages/02-加氢记录.jsx';

View File

@@ -2,6 +2,7 @@
* @name 帮助中心
* 自 ONE-OS web端 原稿复刻1 个页面)
*/
import '../../common/oneosWebLegacy/legacyGlobals';
import React from 'react';
import Page1 from './pages/01-功能说明书.jsx';
import { OneosWebLegacyShell } from '../../common/oneosWebLegacy/OneosWebLegacyShell';

View File

@@ -2,6 +2,7 @@
* @name 车辆租赁合同
* 自 ONE-OS web端 原稿复刻8 个页面)
*/
import '../../common/oneosWebLegacy/legacyGlobals';
import React from 'react';
import Page1 from './pages/01-车辆租赁合同-变更为三方合同.jsx';
import Page2 from './pages/02-车辆租赁合同-查看.jsx';

View File

@@ -2,6 +2,7 @@
* @name 台账数据
* 自 ONE-OS web端 原稿复刻5 个页面)
*/
import '../../common/oneosWebLegacy/legacyGlobals';
import React from 'react';
import Page1 from './pages/01-保险分摊明细.jsx';
import Page2 from './pages/02-车辆氢费明细.jsx';

View File

@@ -2,6 +2,7 @@
* @name 登录
* 自 ONE-OS web端 原稿复刻1 个页面)
*/
import '../../common/oneosWebLegacy/legacyGlobals';
import React from 'react';
import Page1 from './pages/01-登录.jsx';
import { OneosWebLegacyShell } from '../../common/oneosWebLegacy/OneosWebLegacyShell';

View File

@@ -2,6 +2,7 @@
* @name 运维管理
* 自 ONE-OS web端 原稿复刻49 个页面)
*/
import '../../common/oneosWebLegacy/legacyGlobals';
import React from 'react';
import Page1 from './pages/01-备件库存.jsx';
import Page2 from './pages/02-仓库管理.jsx';

View File

@@ -2,6 +2,7 @@
* @name 采购管理
* 自 ONE-OS web端 原稿复刻2 个页面)
*/
import '../../common/oneosWebLegacy/legacyGlobals';
import React from 'react';
import Page1 from './pages/01-三方退租车管理.jsx';
import Page2 from './pages/02-三方退租申请-新增.jsx';

View File

@@ -2,6 +2,7 @@
* @name 安全培训扫码
* 自 ONE-OS web端 原稿复刻1 个页面)
*/
import '../../common/oneosWebLegacy/legacyGlobals';
import React from 'react';
import Page1 from './pages/01-安全培训扫码.jsx';
import { OneosWebLegacyShell } from '../../common/oneosWebLegacy/OneosWebLegacyShell';

View File

@@ -2,6 +2,7 @@
* @name 车辆管理
* 自 ONE-OS web端 原稿复刻2 个页面)
*/
import '../../common/oneosWebLegacy/legacyGlobals';
import React from 'react';
import Page1 from './pages/01-车辆管理.jsx';
import Page2 from './pages/02-车辆管理-查看.jsx';

View File

@@ -2,6 +2,7 @@
* @name 工作台
* 自 ONE-OS web端 原稿复刻1 个页面)
*/
import '../../common/oneosWebLegacy/legacyGlobals';
import React from 'react';
import Page1 from './pages/01-工作台.jsx';
import { OneosWebLegacyShell } from '../../common/oneosWebLegacy/OneosWebLegacyShell';