diff --git a/src/components/bluetoot/connection/fr200.js b/src/components/bluetoot/connection/fr200.js index 45c83c8..52fa2a5 100644 --- a/src/components/bluetoot/connection/fr200.js +++ b/src/components/bluetoot/connection/fr200.js @@ -57,21 +57,27 @@ export const fr200DeviceControlCommand = { }, /** - * '脸部' = 'workFace', - * '眼部' = 'workEye', - * '颈纹' = 'workNeck', * '进入水分测试模式' = 'switchTestMode', * '启动水分测试模式' = 'startTestMode', - * face - * eyes - * neck - * moistureTest + * face: "01", 面部 + * eyes: "02", 脸部 + * nasolabialFold: "03", 法令纹 + * mandibularLine: "04", 下颌线 + * led: "05", led + * moistureTest: "06", 水分测试 + * maskPenetration: "07",面膜促渗 + * essence: "08", 精华模式 + * headLiftingPro: "09", 抬头纹Pro + * neck: "0A", 颈纹 + * partition: "11", 分区模式 废弃VM1001 + * ignore: "255", 不改变/无模式 */ + // 普通工作模式 work: { commandType: "DeviceControl", workStatus: "working", - workMode: "", // face + workMode: "ignore", // face }, // 切换/进入水分测试 switchTestMode: { diff --git a/src/components/bluetoot/connection/index.tsx b/src/components/bluetoot/connection/index.tsx index 707ba39..16753da 100644 --- a/src/components/bluetoot/connection/index.tsx +++ b/src/components/bluetoot/connection/index.tsx @@ -459,7 +459,7 @@ class ConnectionBluetoot extends Component { return jsonStatus; } - /** 7.通知BLE特征值更改 */ + /** 7.通知BLE特征值更改 连接成功需拿到响应判断是否需要升级,然后跳转详情页 */ notifyBLECharacteristicValueChange() { console.log("7.通知BLE特征值更改"); const { deviceInfo } = this.props; diff --git a/src/moduleIOT/pages/iotCarePlan/FR200.tsx b/src/moduleIOT/pages/iotCarePlan/FR200.tsx index d2a1b6e..f517d81 100644 --- a/src/moduleIOT/pages/iotCarePlan/FR200.tsx +++ b/src/moduleIOT/pages/iotCarePlan/FR200.tsx @@ -10,8 +10,8 @@ import React, { useState, } from "react"; -import Echarts from "./components/Echart/index"; -import Gears from "./components/Gears/index" +// import Echarts from "./components/Echart/index"; +import Gears from "./components/Gears/index"; import { Block, View, @@ -41,7 +41,7 @@ import ConnectionBluetoot from "@/components/bluetoot/connection"; import ElectricityView from "./components/ElectricityView/index"; import ModeListView from "./components/ModeList/FR200"; import ModeContent from "./components/ModeContent/FR200"; -import Footer from "./components/Footer"; +import Footer from "./components/Footer/FR200"; /* 本页组件 END */ import { go, getStorageSync, setStorageSync, msg } from "@/utils/traoAPI"; @@ -129,10 +129,10 @@ class IotCarePlanFR200 extends Component { workMode: "", //当前模式 // 挡位调节组件参数 - GearData:[ - {name:'额头',forehead:5,Total:10}, - {name:'左脸颊',forehead:6,Total:10}, - {name:'右脸颊',forehead:2,Total:10}, + GearData: [ + { name: "额头", forehead: 5, Total: 10 }, + { name: "左脸颊", forehead: 6, Total: 10 }, + { name: "右脸颊", forehead: 2, Total: 10 }, ], gear: { gear: 1 }, @@ -334,19 +334,17 @@ class IotCarePlanFR200 extends Component { } async init() { - // 查询自定义设备指令 + // 查询离线记录汇总 const queryInstructionParams = { commandType: "InfoQuery", - infoQueryType: "customModeInfo", + infoQueryType: "offlineClockInInfo", + dataType: "summary", }; let commandBuffer = deviceToolKitInstance.toBleCommand( queryInstructionParams as any ); sendCommand({ value: commandBuffer }).then((res) => { - console.log( - "查询自定义组合模式指令发送成功 参数为=>", - queryInstructionParams - ); + console.log("查询查询离线记录汇总 参数为=>", queryInstructionParams); }); // 监听蓝牙连接状态改变 @@ -370,7 +368,7 @@ class IotCarePlanFR200 extends Component { this.setState({ isConnectShow: true, // 打开蓝牙链接弹窗 isConnectionBlutoot: false, // 断开蓝牙 - isShowCountdown: false, // 关闭倒计时,防止倒计时还在运行 + // isShowCountdown: false, // 关闭倒计时,防止倒计时还在运行 }); this.footerIsDisabled(); }; @@ -515,21 +513,21 @@ class IotCarePlanFR200 extends Component { return false; } // 加减组件- 减号操作 -handleMinus = async (data,inde) => { - let GearData =this.state.GearData - if(GearData[inde].forehead !== 1){ - GearData[inde].forehead = GearData[inde].forehead - 1 - this.setState({GearData}) - } -}; -// 加减组件- 加号操作 -handleAdd = async (data,inde) => { - let GearData =this.state.GearData - if(GearData[inde].forehead !== GearData[inde].Total){ - GearData[inde].forehead = GearData[inde].forehead + 1 - this.setState({GearData}) - } -}; + handleMinus = async (data, inde) => { + let GearData = this.state.GearData; + if (GearData[inde].forehead !== 1) { + GearData[inde].forehead = GearData[inde].forehead - 1; + this.setState({ GearData }); + } + }; + // 加减组件- 加号操作 + handleAdd = async (data, inde) => { + let GearData = this.state.GearData; + if (GearData[inde].forehead !== GearData[inde].Total) { + GearData[inde].forehead = GearData[inde].forehead + 1; + this.setState({ GearData }); + } + }; /** 切换护理模式 */ switchModeCurrentFun = async (data) => { @@ -1248,10 +1246,10 @@ handleAdd = async (data,inde) => { } // 仅在切换模式的时候,弹窗倒计时. - if (type === "switch") { - let downNum = CountDownTime[ActiveModeItem.modeType] || 3; - this.showCountdownFun(downNum, () => {}); // 倒计时弹窗 - } + // if (type === "switch") { + // let downNum = CountDownTime[ActiveModeItem.modeType] || 3; + // this.showCountdownFun(downNum, () => {}); // 倒计时弹窗 + // } // 开始执行护理 this.workStatus = MODE_WORKING_ENUM.WORKING; // 不管当前什么状态,直接设为工作状态 @@ -2158,11 +2156,12 @@ handleAdd = async (data,inde) => { /> )} - - + {/* */} +