From 5c28cc06249516def17a5b594bd76a87bd0cea68 Mon Sep 17 00:00:00 2001 From: blak-kong <546598185@qq.com> Date: Mon, 5 Feb 2024 13:55:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.config.ts | 1 + src/app.tsx | 1 + src/components/bluetoot/connection/index.tsx | 12 +- .../device-connection-popup.less | 8 +- .../device-connection-popup.tsx | 68 +++++----- src/pages/index/index.tsx | 10 +- .../components/ModeList/index.less | 99 ++++++++++++++ .../iotCarePlan/components/ModeList/index.tsx | 104 +++++++++++++++ src/pages/iotCarePlan/iotCarePlan.less | 52 ++++++++ src/pages/iotCarePlan/iotCarePlan.tsx | 126 +++++++++++++++++- src/store/features/deviceInfo.js | 2 +- src/utils/log.js | 1 - src/utils/request.js | 6 +- 13 files changed, 432 insertions(+), 58 deletions(-) create mode 100644 src/pages/iotCarePlan/components/ModeList/index.less create mode 100644 src/pages/iotCarePlan/components/ModeList/index.tsx diff --git a/src/app.config.ts b/src/app.config.ts index d268d46..a93bb81 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -17,6 +17,7 @@ export default defineAppConfig({ "pages/instrument_manage/index", "pages/instrument_detail/index", "pages/instrumentClickinUpload/index", + "pages/iotCarePlan/iotCarePlan", 'pages/privacyPolicy/privacyPolicy', 'pages/userPolicy/userPolicy', 'pages/about/about', diff --git a/src/app.tsx b/src/app.tsx index ef756c4..fa0213e 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -24,6 +24,7 @@ class App extends Component { return; } + // go("/pages/iotCarePlan/iotCarePlan"); // go("/pages/instrument_clickin_upload/index"); // go("/pages/instrument/intro"); // Taro.switchTab({ diff --git a/src/components/bluetoot/connection/index.tsx b/src/components/bluetoot/connection/index.tsx index c7a91e5..27bfa92 100644 --- a/src/components/bluetoot/connection/index.tsx +++ b/src/components/bluetoot/connection/index.tsx @@ -299,8 +299,8 @@ class ConnectionBluetoot extends Component { // let type = this.props.yiqiInfo.model || "FR200"; let type = "WE200"; // this.props.yiqiInfo.model = type; - console.log(" this.props.yiqiInfo.model", this.props.yiqiInfo.model); - // console.info('搜索到到蓝牙设备 value => ', item.devices[0]?.name) + console.log("this.props.yiqiInfo.model", this.props.yiqiInfo.model); + console.info("搜索到到蓝牙设备 value => ", item.devices[0]?.name); for (let i = 0; i < item.devices.length; i++) { if ( item.devices[i].connectable && @@ -336,6 +336,10 @@ class ConnectionBluetoot extends Component { } catch (e) {} clearTimeout(connectionTimer); const { yiqiInfo: deviceInfo } = this.props; + console.log( + "this.props.bluetoothInfo.deviceId", + this.props.bluetoothInfo.deviceId + ); /*********开始主动连接*******/ createBLEConnection(this.props.bluetoothInfo.deviceId) .then((res) => { @@ -464,7 +468,7 @@ class ConnectionBluetoot extends Component { connectionStatus, islian: true, // 不需要离线记录,但暂未完全删除这部分逻辑,所以直接设为true }); - this.detectVersionUpdate(); + // this.detectVersionUpdate(); // 获取升级信息 // todo 连接成功需删除离线记录,暂时未缓存离线记录 if (this.state.connectionSuccess) return; // 暂时不需要查询是否连接子设备, 直接进入查询版本信息 @@ -698,7 +702,7 @@ class ConnectionBluetoot extends Component { ); break; case InstrumentTypeEnum.WL200: - console.log("WL200无法配对,只能用M01"); + // console.log("WL200无法配对,只能用M01"); console.log("正在发送WL200", bleCommandSamples.match); // matchArrayBuffer = deviceToolKitInstanceWL200.toBleCommand( // bleCommandSamples.match as any diff --git a/src/components/bluetoot/device-connection-popup/device-connection-popup.less b/src/components/bluetoot/device-connection-popup/device-connection-popup.less index 5dd5b43..2d6f098 100644 --- a/src/components/bluetoot/device-connection-popup/device-connection-popup.less +++ b/src/components/bluetoot/device-connection-popup/device-connection-popup.less @@ -1,9 +1,11 @@ .common-box { width: 670rpx; - height: 1150rpx; box-sizing: border-box; } -.site-popup-content-box { +.device-connection-box { + height: 1150rpx; +} +.device-popup-content-box { margin: 0; } // .van-popup { @@ -65,7 +67,7 @@ width: 100%; box-sizing: border-box; display: flex; - column-gap: 30rpx; + // column-gap: 30rpx; // padding-top: 10px; margin: 0 auto 10px; text-align: center; diff --git a/src/components/bluetoot/device-connection-popup/device-connection-popup.tsx b/src/components/bluetoot/device-connection-popup/device-connection-popup.tsx index e227570..15bd8bb 100644 --- a/src/components/bluetoot/device-connection-popup/device-connection-popup.tsx +++ b/src/components/bluetoot/device-connection-popup/device-connection-popup.tsx @@ -103,13 +103,13 @@ export default class DeviceConnectPopup extends Component { > {!error && ( - + {data.bluetoothConnectingTitle} - + {this.isImage(data.bluetoothConnecting) ? ( + + {data.bluetoothConnectingContent} + + + )} - - {connectionSuccess ? ( - + {connectionSuccess ? ( + + - 正在为您启动今日护理场景 - - ) : ( - + + 正在为您启动今日护理场景 + + ) : ( + + - - 正在为您启动今日护理场景 - - - )} - + + + 正在为您启动今日护理场景 + + + )} @@ -185,13 +189,13 @@ export default class DeviceConnectPopup extends Component { )} {error && ( - + {data.bluetoothConnectFailTitle} - +