|
|
@ -8,7 +8,7 @@ import MeasurementCanvas, { |
|
|
|
import { useEffect, useRef, useState } from 'react'; |
|
|
|
|
|
|
|
import RailTypeBtn from '../components/RailTypeBtn'; |
|
|
|
import { Cascader, Picker, Toast } from 'antd-mobile'; |
|
|
|
import { Cascader, Dialog, Picker, Toast } from 'antd-mobile'; |
|
|
|
import { useAppDispatch, useAppSelector } from '../utils/hooks'; |
|
|
|
import { updateTaskState } from '../store/features/measureSlice'; |
|
|
|
import Bridge from '../utils/bridge'; |
|
|
@ -94,6 +94,15 @@ export default function Measure() { |
|
|
|
// } else {
|
|
|
|
// console.log("当前环境不支持 React Native WebView");
|
|
|
|
// }
|
|
|
|
if (!contextState.device.connected) { |
|
|
|
Dialog.alert({ |
|
|
|
content: '蓝牙未连接,请先连接蓝牙', |
|
|
|
onConfirm: () => { |
|
|
|
navigate("/home/bluetooth"); |
|
|
|
}, |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
Bridge.startMeasure().then((res) => { |
|
|
|
if (res.success) { |
|
|
|
dispatch(updateTaskState('START_RECORD_SIG')); |
|
|
|