|
@@ -2,11 +2,19 @@ import PageContent from '@/components/PageContent';
|
|
import PageTitle from '@/components/PageTitle';
|
|
import PageTitle from '@/components/PageTitle';
|
|
import TabsContent from '@/components/TabsContent';
|
|
import TabsContent from '@/components/TabsContent';
|
|
import { UnityAction } from '@/utils/utils';
|
|
import { UnityAction } from '@/utils/utils';
|
|
|
|
+import { useEffect } from 'react';
|
|
import AirConditioner from './components/AirConditioner';
|
|
import AirConditioner from './components/AirConditioner';
|
|
import Light from './components/Light';
|
|
import Light from './components/Light';
|
|
|
|
|
|
function Hardware() {
|
|
function Hardware() {
|
|
- const handleTabsChange = (tab) => {};
|
|
|
|
|
|
+ const handleTabsChange = (tab) => {
|
|
|
|
+ UnityAction.sendMsg(tab == '1' ? 'ACData' : 'lightData');
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ useEffect(() => {
|
|
|
|
+ UnityAction.sendMsg('ACData');
|
|
|
|
+ }, []);
|
|
|
|
+
|
|
return (
|
|
return (
|
|
<PageContent closeable={false}>
|
|
<PageContent closeable={false}>
|
|
<PageTitle
|
|
<PageTitle
|