From c2cfcd5f902e92ff820da802b2b7cce87e643daa Mon Sep 17 00:00:00 2001 From: blak-kong <546598185@qq.com> Date: Sat, 3 Feb 2024 09:54:19 +0800 Subject: [PATCH 01/11] =?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/components/bluetoot/InstrumentTypeEnum.js | 18 ++-- src/components/bluetoot/connection/index.tsx | 96 +++++++++++-------- src/pages/index/index.tsx | 19 ++-- src/store/features/deviceInfo.js | 23 ++++- 4 files changed, 99 insertions(+), 57 deletions(-) diff --git a/src/components/bluetoot/InstrumentTypeEnum.js b/src/components/bluetoot/InstrumentTypeEnum.js index 48bd86a..eef976a 100644 --- a/src/components/bluetoot/InstrumentTypeEnum.js +++ b/src/components/bluetoot/InstrumentTypeEnum.js @@ -1,10 +1,16 @@ const InstrumentTypeEnum = { //仪器类型 - FR200: 1, - MATRIX: 2, - WL200: 3, - FR380: 4, - FR390: 5, - M01: 6, + // FR200: 1, + // MATRIX: 2, + // WL200: 3, + // FR380: 4, + // FR390: 5, + // M01: 6, + FR200: "FR200", + MATRIX: "MATRIX", + WL200: "WL200", + FR380: "FR380", + FR390: "FR390", + M01: "M01", }; export default InstrumentTypeEnum; diff --git a/src/components/bluetoot/connection/index.tsx b/src/components/bluetoot/connection/index.tsx index 4b1eb5d..585a909 100644 --- a/src/components/bluetoot/connection/index.tsx +++ b/src/components/bluetoot/connection/index.tsx @@ -8,7 +8,10 @@ import DeviceConnectPopup from "../device-connection-popup/device-connection-pop /*** redux ***/ import { connect } from "react-redux"; -import { setBluetoothInfo } from "../../../store/features/deviceInfo"; +import { + setBluetoothInfo, + setDeviceId, +} from "../../../store/features/deviceInfo"; /*** redux end ***/ import { @@ -305,11 +308,22 @@ class ConnectionBluetoot extends Component { ).indexOf(`${type}`) !== -1 ) { console.info("连接的设备信息", item.devices[i], type); + let params = { + deviceId: item.devices[i].deviceId, + servicesuuid: item.devices[i].serviceId, + characteristicsuuid0: item.devices[i].characteristics[0].uuid, + characteristicsuuid1: item.devices[i].characteristics[1].uuid, + characteristicId: "", + }; + this.props.setBluetoothInfo(params); - clearInterval(searchBluetootTimers); - Taro.stopBluetoothDevicesDiscovery(); //停止搜索蓝牙 - // app.globalData.deviceInfo.deviceId = item.devices[i].deviceId; - this.createBLEConnection(); + setTimeout(() => { + console.log("this.props.bluetoothInfo", this.props.bluetoothInfo); + clearInterval(searchBluetootTimers); + Taro.stopBluetoothDevicesDiscovery(); //停止搜索蓝牙 + // app.globalData.deviceInfo.deviceId = item.devices[i].deviceId; + this.createBLEConnection(); + }, 10); break; } } @@ -327,13 +341,10 @@ class ConnectionBluetoot extends Component { /*********开始主动连接*******/ createBLEConnection(this.props.bluetoothInfo.deviceId) .then((res) => { + console.log("createBLEConnection", res); let { errno, errMsg } = res; if (errno == 0) { - if ( - deviceInfo.type == InstrumentTypeEnum.FR200 || - deviceInfo.type == InstrumentTypeEnum.FR380 || - deviceInfo.type == InstrumentTypeEnum.FR390 - ) { + if (this.props.yiqiInfo.model === "WL200") { this.setState({ connectionStatus: true, }); @@ -358,14 +369,19 @@ class ConnectionBluetoot extends Component { /** 6.获取蓝牙特征值 */ getBLEDeviceServices() { + console.log("========6.获取蓝牙特征值========"); getBLEDeviceServices(this.props.bluetoothInfo.deviceId) .then((res) => { + console.log("特征值", res); let bluetoothInfo = this.props.bluetoothInfo; bluetoothInfo.servicesuuid = res.servicesuuid; bluetoothInfo.characteristicsuuid1 = res.characteristicsuuid1; bluetoothInfo.characteristicsuuid0 = res.characteristicsuuid0; this.props.setBluetoothInfo(bluetoothInfo); - this.notifyBLECharacteristicValueChange(); + + setTimeout(() => { + this.notifyBLECharacteristicValueChange(); + }, 10); }) .catch((err) => { let { errno, errMsg } = err; @@ -376,8 +392,10 @@ class ConnectionBluetoot extends Component { /** 7.通知BLE特征值更改 */ notifyBLECharacteristicValueChange() { + console.log("7.通知BLE特征值更改"); const { yiqiInfo: deviceInfo } = this.props; const bluetoothInfo = this.props.bluetoothInfo; + console.log("bluetoothInfo", bluetoothInfo); notifyBLECharacteristicValueChange({ deviceId: bluetoothInfo.deviceId, servicesuuid: bluetoothInfo.servicesuuid, @@ -391,24 +409,22 @@ class ConnectionBluetoot extends Component { console.info("onBLECharacteristicValueChange value => ", value); let str = ab2hex(value.value); //转为16进制字符串 let connectionStatus = [ - InstrumentTypeEnum.FR200, - InstrumentTypeEnum.WL200, - InstrumentTypeEnum.FR380, - InstrumentTypeEnum.FR390, - InstrumentTypeEnum.M01, - ].includes(Number(deviceInfo.type)); - const isFRDevice = [ - InstrumentTypeEnum.FR200, - InstrumentTypeEnum.FR380, - InstrumentTypeEnum.FR390, - ].includes(Number(deviceInfo.type)); + "FR200", + "WL200", + "FR380", + "FR390", + "M01", + ].includes(deviceInfo.model); + const isFRDevice = ["FR200", "FR380", "FR390"].includes( + deviceInfo.model + ); if (isFRDevice) { this.setState({ connectionStatus, }); log.info( commandMap.reciviedBLECommand, - `仪器类型: ${deviceInfo.type}`, + `仪器模式: ${deviceInfo.model}`, value ); filterBleData(str).forEach((item) => { @@ -454,8 +470,8 @@ class ConnectionBluetoot extends Component { `connection_guide, ${deviceInfo.type}:${versionInfo.version}` ); if ( - deviceInfo.type == InstrumentTypeEnum.FR380 || - deviceInfo.type == InstrumentTypeEnum.FR390 + deviceInfo.model == "FR380" || + deviceInfo.model == "FR390" ) { console.log("跳转护理页"); // this.triggerEvent("offlineChange", this.state); @@ -510,7 +526,7 @@ class ConnectionBluetoot extends Component { } else { let jsonStatus: any = null; let querySubDeviceArrayBuffer; - if (deviceInfo.type == InstrumentTypeEnum.WL200) { + if (deviceInfo.model == "WL200") { // querySubDeviceArrayBuffer = deviceToolKitInstanceWL200.toBleCommand(bleCommandSamples.querySubDevice); // jsonStatus = deviceToolKitInstanceWL200.toJsonStatus(value.value); jsonStatus = deviceToolKitInstanceM01.toJsonStatus(value.value); @@ -518,7 +534,7 @@ class ConnectionBluetoot extends Component { deviceToolKitInstanceM01.toBleCommand( bleCommandSamples.querySubDevice as any ); // todo - } else if (deviceInfo.type == InstrumentTypeEnum.M01) { + } else if (deviceInfo.model == "M01") { jsonStatus = deviceToolKitInstanceM01.toJsonStatus(value.value); querySubDeviceArrayBuffer = deviceToolKitInstanceM01.toBleCommand( @@ -527,7 +543,7 @@ class ConnectionBluetoot extends Component { } log.info( commandMap.reciviedBLECommand, - `仪器类型: ${deviceInfo.type}`, + `仪器模式: ${deviceInfo.model}`, jsonStatus ); if (jsonStatus?.commandType === "BleMatch") { @@ -633,22 +649,19 @@ class ConnectionBluetoot extends Component { * type4 FR380 */ console.log("发送配对码"); - if (deviceInfo.type == InstrumentTypeEnum.FR200) { + if (deviceInfo.model == "FR200") { if (sendPairingTimer) clearInterval(sendPairingTimer); sendPairingTimer = setInterval(() => { this.sendPairingSignal(); }, 1000); - } else if ( - deviceInfo.type == InstrumentTypeEnum.WL200 || - deviceInfo.type == InstrumentTypeEnum.M01 - ) { + } else if (deviceInfo.model == "WL200" || deviceInfo.model == "M01") { if (sendPairingTimer) clearInterval(sendPairingTimer); sendPairingTimer = setInterval(() => { this.sendPairingSignal(); }, 1000); } else if ( - deviceInfo.type == InstrumentTypeEnum.FR380 || - deviceInfo.type == InstrumentTypeEnum.FR390 + deviceInfo.model == "FR380" || + deviceInfo.model == "FR390" ) { if (sendPairingTimer) clearInterval(sendPairingTimer); sendPairingTimer = setInterval(() => { @@ -682,11 +695,7 @@ class ConnectionBluetoot extends Component { // 8.发送指令:获取仪器版本号 sendGetVersion() { const { yiqiInfo: deviceInfo } = this.props; - const isFRDevice = [ - InstrumentTypeEnum.FR200, - InstrumentTypeEnum.FR380, - InstrumentTypeEnum.FR390, - ].includes(Number(deviceInfo.type)); + const isFRDevice = ["FR200", "FR380", "FR390"].includes(deviceInfo.model); log.info(commandMap.sendVersionCommand, `仪器:${deviceInfo.type}`); if (isFRDevice) { writeBLECharacteristicValue({ @@ -768,7 +777,7 @@ class ConnectionBluetoot extends Component { const { yiqiInfo: deviceInfo } = this.props; log.info(commandMap.sendMatchCode, `仪器:${deviceInfo.type}发送匹配码`); let matchArrayBuffer: any = null; - switch (deviceInfo.type) { + switch (deviceInfo.model) { case InstrumentTypeEnum.FR200: matchArrayBuffer = deviceToolKitInstanceFR200.toBleCommand( bleCommandSamples.match as any @@ -1078,7 +1087,7 @@ class ConnectionBluetoot extends Component { infoQueryType: "offlineClockSummary", }; const value = - deviceInfo.type == InstrumentTypeEnum.WL200 + deviceInfo.model == InstrumentTypeEnum.WL200 ? deviceToolKitInstanceWL200.toBleCommand(versionCommand as any) : deviceToolKitInstanceM01.toBleCommand(versionCommand as any); sendCommand({ value }).then(); @@ -1135,5 +1144,8 @@ const mapDispatchToProps = (dispatch) => ({ setBluetoothInfo(data) { dispatch(setBluetoothInfo(data)); }, + setDeviceId(data) { + dispatch(setDeviceId(data)); + }, }); export default connect(mapStateToProps, mapDispatchToProps)(ConnectionBluetoot); diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index d9dcbab..5f2a897 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -573,22 +573,21 @@ class Index extends Component { goNursing = (item) => { console.log("goNursing", item); setStorageSync("instrument_detail", JSON.stringify(item)); + // setStorageSync("connectInstrument", JSON.stringify(item)); - // this.setState({ instrument_detail: item }); - // this.setState({ connectInstrument: item }); - // setTimeout(() => this.bindBlockLeft()); + this.setState({ connectInstrument: item }); + setTimeout(() => this.bindBlockLeft()); // isConnectShow - setTimeout(() => { - go("/pages/instrumentClickinUpload/index?id=" + item.id); - }, 10); + // setTimeout(() => { + // go("/pages/instrumentClickinUpload/index?id=" + item.id); + // }, 10); // go("/pages/instrument/intro?id=" + item.id); }; /* 扫码进入逻辑 */ /** 蓝牙逻辑 */ bindBlockLeft() { - console.log("this.state.userinfo", this.state.userinfo); if (!this.state.userinfo.mobile) { //未注册授权 this.alertRegister(); @@ -596,6 +595,9 @@ class Index extends Component { } if (this.state.connectInstrument.type === 1) { //非IOT + setTimeout(() => { + go("/pages/instrumentClickinUpload/index"); + }, 10); } else { Taro.getSystemInfo({ success: (res) => { @@ -716,6 +718,7 @@ class Index extends Component { //连接完成时数据的回调 offlineChange = async (e) => { + console.log("offlineChange", e); const that = this; log.info( commandMap.versionInfoHome, @@ -1131,6 +1134,8 @@ class Index extends Component { yiqiInfo={connectInstrument} close={this.connectionClose} confirm={this.connectionConfirm} + offlineChange={this.offlineChange} + pairingChange={this.pairingChange} /> )} {/* */} diff --git a/src/store/features/deviceInfo.js b/src/store/features/deviceInfo.js index a87398a..e84d158 100644 --- a/src/store/features/deviceInfo.js +++ b/src/store/features/deviceInfo.js @@ -18,10 +18,29 @@ const deviceInfoReducer = createSlice({ state = JSON.parse(JSON.stringify(payload)); }, setBluetoothInfo(state, { payload }) { - state.bluetoothInfo = JSON.parse(JSON.stringify(payload)); + console.log("setBluetoothInfo payload", payload); + // state.bluetoothInfo = JSON.parse(JSON.stringify(payload)); + // console.log("state.bluetoothInfo", state.bluetoothInfo); + state.bluetoothInfo.deviceId = payload.deviceId; + if (payload.servicesuuid) { + state.bluetoothInfo.servicesuuid = payload.servicesuuid; + } + if (payload.characteristicsuuid0) { + state.bluetoothInfo.characteristicsuuid0 = payload.characteristicsuuid0; + } + if (payload.characteristicsuuid1) { + state.bluetoothInfo.characteristicsuuid1 = payload.characteristicsuuid1; + } + if (payload.characteristicId) { + state.bluetoothInfo.characteristicId = payload.characteristicId; + } + }, + setDeviceId(state, { payload }) { + console.log("setDeviceId payload", payload); + state.bluetoothInfo.deviceId = payload.deviceId; }, }, }); -export const { setBluetoothInfo } = deviceInfoReducer.actions; +export const { setBluetoothInfo, setDeviceId } = deviceInfoReducer.actions; export default deviceInfoReducer.reducer; From 5c85dc7e5d648d59eb5289e4652ff62d14a1a0cc Mon Sep 17 00:00:00 2001 From: blak-kong <546598185@qq.com> Date: Sat, 3 Feb 2024 19:51:48 +0800 Subject: [PATCH 02/11] =?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 --- package-lock.json | 188 ++++++-- package.json | 10 +- src/components/bluetoot/connection/index.tsx | 453 ++++++++---------- src/components/bluetoot/connection/test.js | 118 ++--- .../device-connection-popup.less | 78 ++- .../device-connection-popup.tsx | 194 +++++--- src/pages/iotCarePlan/iotCarePlan.less | 0 src/pages/iotCarePlan/iotCarePlan.tsx | 54 +++ src/store/features/deviceInfo.js | 5 +- src/utils/bluetoothWXAPI.js | 3 +- src/utils/log.js | 48 +- src/utils/request.js | 4 +- 12 files changed, 686 insertions(+), 469 deletions(-) create mode 100644 src/pages/iotCarePlan/iotCarePlan.less create mode 100644 src/pages/iotCarePlan/iotCarePlan.tsx diff --git a/package-lock.json b/package-lock.json index 73121b2..a456014 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,8 @@ "version": "1.0.0", "dependencies": { "@antmjs/vantui": "^3.2.2", - "@babel/runtime": "^7.7.7", - "@flossom-npm/iot-translater": "^1.0.14", - "@flossom-npm/iot-translater-we100": "^1.0.74", + "@flossom-npm/iot-translater": "^1.0.8", + "@flossom-npm/iot-translater-we100": "^1.0.66", "@reduxjs/toolkit": "^2.0.1", "@taroify/core": "^0.1.1-alpha.8", "@tarojs/components": "3.6.19", @@ -35,11 +34,11 @@ "react": "^18.0.0", "react-dom": "^18.0.0", "react-redux": "^9.0.3", - "taro-ui": "^3.2.0", - "terser-webpack-plugin": "^5.3.9" + "taro-ui": "^3.2.0" }, "devDependencies": { "@babel/core": "^7.8.0", + "@babel/runtime": "^7.7.7", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.5", "@tarojs/cli": "3.6.19", "@tarojs/taro-loader": "3.6.19", @@ -61,6 +60,7 @@ "react-refresh": "^0.11.0", "stylelint": "9.3.0", "taro-plugin-compiler-optimization": "^1.0.4", + "terser-webpack-plugin": "^5.3.9", "thread-loader": "^4.0.2", "ts-node": "^10.9.1", "typescript": "^4.1.0", @@ -4254,15 +4254,15 @@ } }, "node_modules/@flossom-npm/iot-translater": { - "version": "1.0.14", - "resolved": "https://gitea.ecolite.co/api/packages/huangbangxin/npm/%40flossom-npm%2Fiot-translater/-/1.0.14/iot-translater-1.0.14.tgz", - "integrity": "sha512-rpqLLgYoX/vFVS8jGtk6AfTxyXtrSnX94LvMROUOslZBLC40PuzClLGWr4E9qXdCqeneOA9jssZrZbHysfd7yA==", + "version": "1.0.8", + "resolved": "https://gitea.ecolite.co/api/packages/huangbangxin/npm/%40flossom-npm%2Fiot-translater/-/1.0.8/iot-translater-1.0.8.tgz", + "integrity": "sha512-mx2TvBzqexz3vwol3AElnHde5LYBBk/KD6iXF08MRdexipIVQBr6DZX2tJztvPyx61GY3oFToPbej3m/sFZEQg==", "license": "ISC" }, "node_modules/@flossom-npm/iot-translater-we100": { - "version": "1.0.74", - "resolved": "https://gitea.ecolite.co/api/packages/huangbangxin/npm/%40flossom-npm%2Fiot-translater-we100/-/1.0.74/iot-translater-we100-1.0.74.tgz", - "integrity": "sha512-6FgvU+YVjdLeiU96E5fhqXgcvT2rh0ZNkOpLK647abtezVYge/WcFotjZezkw9QHSBK8qrBpS8XbQFkRSt/nWw==", + "version": "1.0.66", + "resolved": "https://gitea.ecolite.co/api/packages/huangbangxin/npm/%40flossom-npm%2Fiot-translater-we100/-/1.0.66/iot-translater-we100-1.0.66.tgz", + "integrity": "sha512-dZNvUONleoGddwv2qLZQWUCoFPNi4MKPL/F1YDrePQyUawm0nAGkh6ZBOUPtmFN5ENXs4QlfPVy0wALJioCtKA==", "license": "ISC" }, "node_modules/@gar/promisify": { @@ -4672,6 +4672,7 @@ "version": "0.3.5", "resolved": "https://registry.npmmirror.com/@jridgewell/source-map/-/source-map-0.3.5.tgz", "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", @@ -8089,6 +8090,7 @@ "version": "8.44.7", "resolved": "https://registry.npmmirror.com/@types/eslint/-/eslint-8.44.7.tgz", "integrity": "sha512-f5ORu2hcBbKei97U73mf+l9t4zTGl74IqZ0GQk4oVea/VS8tQZYkUveSYojk+frraAVYId0V2WC9O4PTNru2FQ==", + "dev": true, "license": "MIT", "dependencies": { "@types/estree": "*", @@ -8099,6 +8101,7 @@ "version": "3.7.7", "resolved": "https://registry.npmmirror.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, "license": "MIT", "dependencies": { "@types/eslint": "*", @@ -8109,6 +8112,7 @@ "version": "1.0.5", "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.5.tgz", "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true, "license": "MIT" }, "node_modules/@types/expect": { @@ -8239,6 +8243,7 @@ "version": "7.0.15", "resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, "license": "MIT" }, "node_modules/@types/json5": { @@ -9201,6 +9206,7 @@ "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/ast/-/ast-1.11.6.tgz", "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "dev": true, "license": "MIT", "dependencies": { "@webassemblyjs/helper-numbers": "1.11.6", @@ -9211,24 +9217,28 @@ "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/helper-api-error": { "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/helper-buffer": { "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", + "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "dev": true, "license": "MIT", "dependencies": { "@webassemblyjs/floating-point-hex-parser": "1.11.6", @@ -9240,12 +9250,14 @@ "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/helper-wasm-section": { "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "dev": true, "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.11.6", @@ -9258,6 +9270,7 @@ "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "dev": true, "license": "MIT", "dependencies": { "@xtuc/ieee754": "^1.2.0" @@ -9267,6 +9280,7 @@ "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "dev": true, "license": "Apache-2.0", "dependencies": { "@xtuc/long": "4.2.2" @@ -9276,12 +9290,14 @@ "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/wasm-edit": { "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "dev": true, "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.11.6", @@ -9298,6 +9314,7 @@ "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "dev": true, "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.11.6", @@ -9311,6 +9328,7 @@ "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "dev": true, "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.11.6", @@ -9323,6 +9341,7 @@ "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "dev": true, "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.11.6", @@ -9337,6 +9356,7 @@ "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "dev": true, "license": "MIT", "dependencies": { "@webassemblyjs/ast": "1.11.6", @@ -9356,12 +9376,14 @@ "version": "1.2.0", "resolved": "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz", "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true, "license": "BSD-3-Clause" }, "node_modules/@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmmirror.com/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true, "license": "Apache-2.0" }, "node_modules/abab": { @@ -9441,6 +9463,7 @@ "version": "1.9.0", "resolved": "https://registry.npmmirror.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "dev": true, "license": "MIT", "peerDependencies": { "acorn": "^8" @@ -9537,6 +9560,7 @@ "version": "6.12.6", "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", @@ -9595,6 +9619,7 @@ "version": "3.5.2", "resolved": "https://registry.npmmirror.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, "license": "MIT", "peerDependencies": { "ajv": "^6.9.1" @@ -11741,6 +11766,7 @@ "version": "1.0.3", "resolved": "https://registry.npmmirror.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true, "license": "MIT", "engines": { "node": ">=6.0" @@ -14257,6 +14283,7 @@ "version": "5.15.0", "resolved": "https://registry.npmmirror.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dev": true, "license": "MIT", "dependencies": { "graceful-fs": "^4.2.4", @@ -14270,6 +14297,7 @@ "version": "2.2.1", "resolved": "https://registry.npmmirror.com/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -14890,6 +14918,7 @@ "version": "5.1.1", "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", @@ -14903,6 +14932,7 @@ "version": "4.3.0", "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=4.0" @@ -15104,6 +15134,7 @@ "version": "4.3.0", "resolved": "https://registry.npmmirror.com/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" @@ -15116,6 +15147,7 @@ "version": "5.3.0", "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, "license": "BSD-2-Clause", "engines": { "node": ">=4.0" @@ -15166,6 +15198,7 @@ "version": "3.3.0", "resolved": "https://registry.npmmirror.com/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, "license": "MIT", "engines": { "node": ">=0.8.x" @@ -16194,6 +16227,7 @@ "version": "2.1.0", "resolved": "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, "license": "MIT" }, "node_modules/fast-levenshtein": { @@ -17273,6 +17307,7 @@ "version": "0.4.1", "resolved": "https://registry.npmmirror.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true, "license": "BSD-2-Clause" }, "node_modules/global-dirs": { @@ -20607,6 +20642,7 @@ "version": "2.3.1", "resolved": "https://registry.npmmirror.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, "license": "MIT" }, "node_modules/json-schema": { @@ -20650,6 +20686,7 @@ "version": "0.4.1", "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { @@ -21042,6 +21079,7 @@ "version": "4.3.0", "resolved": "https://registry.npmmirror.com/loader-runner/-/loader-runner-4.3.0.tgz", "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, "license": "MIT", "engines": { "node": ">=6.11.5" @@ -27302,6 +27340,7 @@ "version": "2.3.1", "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -27435,6 +27474,7 @@ "version": "2.1.0", "resolved": "https://registry.npmmirror.com/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" @@ -29442,6 +29482,7 @@ "version": "5.2.1", "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, "funding": [ { "type": "github", @@ -29580,6 +29621,7 @@ "version": "3.3.0", "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.8", @@ -29886,6 +29928,7 @@ "version": "6.0.1", "resolved": "https://registry.npmmirror.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz", "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "dev": true, "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" @@ -32938,6 +32981,7 @@ "version": "5.24.0", "resolved": "https://registry.npmmirror.com/terser/-/terser-5.24.0.tgz", "integrity": "sha512-ZpGR4Hy3+wBEzVEnHvstMvqpD/nABNelQn/z2r0fjVWGQsN3bpOLzQlqDxmb4CDZnXq5lpjnQ+mHQLAOpfM5iw==", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -32956,6 +33000,7 @@ "version": "5.3.9", "resolved": "https://registry.npmmirror.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.17", "jest-worker": "^27.4.5", @@ -32985,6 +33030,7 @@ "version": "2.20.3", "resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true, "license": "MIT" }, "node_modules/text-encoding": { @@ -34241,6 +34287,7 @@ "version": "4.4.1", "resolved": "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" @@ -34742,6 +34789,7 @@ "version": "2.4.0", "resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-2.4.0.tgz", "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dev": true, "license": "MIT", "dependencies": { "glob-to-regexp": "^0.4.1", @@ -34784,6 +34832,7 @@ "version": "5.89.0", "resolved": "https://registry.npmmirror.com/webpack/-/webpack-5.89.0.tgz", "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", + "dev": true, "license": "MIT", "dependencies": { "@types/eslint-scope": "^3.7.3", @@ -35218,12 +35267,14 @@ "version": "1.4.1", "resolved": "https://registry.npmmirror.com/es-module-lexer/-/es-module-lexer-1.4.1.tgz", "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", + "dev": true, "license": "MIT" }, "node_modules/webpack/node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmmirror.com/tapable/-/tapable-2.2.1.tgz", "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -35233,6 +35284,7 @@ "version": "3.2.3", "resolved": "https://registry.npmmirror.com/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, "license": "MIT", "engines": { "node": ">=10.13.0" @@ -38848,14 +38900,14 @@ } }, "@flossom-npm/iot-translater": { - "version": "1.0.14", - "resolved": "https://gitea.ecolite.co/api/packages/huangbangxin/npm/%40flossom-npm%2Fiot-translater/-/1.0.14/iot-translater-1.0.14.tgz", - "integrity": "sha512-rpqLLgYoX/vFVS8jGtk6AfTxyXtrSnX94LvMROUOslZBLC40PuzClLGWr4E9qXdCqeneOA9jssZrZbHysfd7yA==" + "version": "1.0.8", + "resolved": "https://gitea.ecolite.co/api/packages/huangbangxin/npm/%40flossom-npm%2Fiot-translater/-/1.0.8/iot-translater-1.0.8.tgz", + "integrity": "sha512-mx2TvBzqexz3vwol3AElnHde5LYBBk/KD6iXF08MRdexipIVQBr6DZX2tJztvPyx61GY3oFToPbej3m/sFZEQg==" }, "@flossom-npm/iot-translater-we100": { - "version": "1.0.74", - "resolved": "https://gitea.ecolite.co/api/packages/huangbangxin/npm/%40flossom-npm%2Fiot-translater-we100/-/1.0.74/iot-translater-we100-1.0.74.tgz", - "integrity": "sha512-6FgvU+YVjdLeiU96E5fhqXgcvT2rh0ZNkOpLK647abtezVYge/WcFotjZezkw9QHSBK8qrBpS8XbQFkRSt/nWw==" + "version": "1.0.66", + "resolved": "https://gitea.ecolite.co/api/packages/huangbangxin/npm/%40flossom-npm%2Fiot-translater-we100/-/1.0.66/iot-translater-we100-1.0.66.tgz", + "integrity": "sha512-dZNvUONleoGddwv2qLZQWUCoFPNi4MKPL/F1YDrePQyUawm0nAGkh6ZBOUPtmFN5ENXs4QlfPVy0wALJioCtKA==" }, "@gar/promisify": { "version": "1.1.3", @@ -39134,6 +39186,7 @@ "version": "0.3.5", "resolved": "https://registry.npmmirror.com/@jridgewell/source-map/-/source-map-0.3.5.tgz", "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==", + "dev": true, "requires": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -41647,6 +41700,7 @@ "version": "8.44.7", "resolved": "https://registry.npmmirror.com/@types/eslint/-/eslint-8.44.7.tgz", "integrity": "sha512-f5ORu2hcBbKei97U73mf+l9t4zTGl74IqZ0GQk4oVea/VS8tQZYkUveSYojk+frraAVYId0V2WC9O4PTNru2FQ==", + "dev": true, "requires": { "@types/estree": "*", "@types/json-schema": "*" @@ -41656,6 +41710,7 @@ "version": "3.7.7", "resolved": "https://registry.npmmirror.com/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", + "dev": true, "requires": { "@types/eslint": "*", "@types/estree": "*" @@ -41664,7 +41719,8 @@ "@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmmirror.com/@types/estree/-/estree-1.0.5.tgz", - "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", + "dev": true }, "@types/expect": { "version": "1.20.4", @@ -41781,7 +41837,8 @@ "@types/json-schema": { "version": "7.0.15", "resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true }, "@types/json5": { "version": "0.0.29", @@ -42558,6 +42615,7 @@ "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/ast/-/ast-1.11.6.tgz", "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "dev": true, "requires": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" @@ -42566,22 +42624,26 @@ "@webassemblyjs/floating-point-hex-parser": { "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", - "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==" + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", + "dev": true }, "@webassemblyjs/helper-api-error": { "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", - "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==" + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", + "dev": true }, "@webassemblyjs/helper-buffer": { "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==" + "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==", + "dev": true }, "@webassemblyjs/helper-numbers": { "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", + "dev": true, "requires": { "@webassemblyjs/floating-point-hex-parser": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -42591,12 +42653,14 @@ "@webassemblyjs/helper-wasm-bytecode": { "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", - "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==" + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", + "dev": true }, "@webassemblyjs/helper-wasm-section": { "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-buffer": "1.11.6", @@ -42608,6 +42672,7 @@ "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", + "dev": true, "requires": { "@xtuc/ieee754": "^1.2.0" } @@ -42616,6 +42681,7 @@ "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", + "dev": true, "requires": { "@xtuc/long": "4.2.2" } @@ -42623,12 +42689,14 @@ "@webassemblyjs/utf8": { "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", - "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==" + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", + "dev": true }, "@webassemblyjs/wasm-edit": { "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-buffer": "1.11.6", @@ -42644,6 +42712,7 @@ "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", @@ -42656,6 +42725,7 @@ "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-buffer": "1.11.6", @@ -42667,6 +42737,7 @@ "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@webassemblyjs/helper-api-error": "1.11.6", @@ -42680,6 +42751,7 @@ "version": "1.11.6", "resolved": "https://registry.npmmirror.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "dev": true, "requires": { "@webassemblyjs/ast": "1.11.6", "@xtuc/long": "4.2.2" @@ -42694,12 +42766,14 @@ "@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmmirror.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz", - "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true }, "@xtuc/long": { "version": "4.2.2", "resolved": "https://registry.npmmirror.com/@xtuc/long/-/long-4.2.2.tgz", - "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true }, "abab": { "version": "2.0.6", @@ -42760,6 +42834,7 @@ "version": "1.9.0", "resolved": "https://registry.npmmirror.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "dev": true, "requires": {} }, "acorn-jsx": { @@ -42827,6 +42902,7 @@ "version": "6.12.6", "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -42867,6 +42943,7 @@ "version": "3.5.2", "resolved": "https://registry.npmmirror.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, "requires": {} }, "anser": { @@ -44430,7 +44507,8 @@ "chrome-trace-event": { "version": "1.0.3", "resolved": "https://registry.npmmirror.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==" + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true }, "ci-info": { "version": "3.9.0", @@ -46244,6 +46322,7 @@ "version": "5.15.0", "resolved": "https://registry.npmmirror.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dev": true, "requires": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -46252,7 +46331,8 @@ "tapable": { "version": "2.2.1", "resolved": "https://registry.npmmirror.com/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==" + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true } } }, @@ -46803,6 +46883,7 @@ "version": "5.1.1", "resolved": "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, "requires": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -46811,7 +46892,8 @@ "estraverse": { "version": "4.3.0", "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==" + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true } } }, @@ -46850,6 +46932,7 @@ "version": "4.3.0", "resolved": "https://registry.npmmirror.com/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, "requires": { "estraverse": "^5.2.0" } @@ -46857,7 +46940,8 @@ "estraverse": { "version": "5.3.0", "resolved": "https://registry.npmmirror.com/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true }, "estree-walker": { "version": "2.0.2", @@ -46889,7 +46973,8 @@ "events": { "version": "3.3.0", "resolved": "https://registry.npmmirror.com/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true }, "exec-async": { "version": "2.2.0", @@ -47672,7 +47757,8 @@ "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, "fast-levenshtein": { "version": "2.0.6", @@ -48453,7 +48539,8 @@ "glob-to-regexp": { "version": "0.4.1", "resolved": "https://registry.npmmirror.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true }, "global-dirs": { "version": "3.0.1", @@ -50766,7 +50853,8 @@ "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmmirror.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true }, "json-schema": { "version": "0.4.0", @@ -50806,7 +50894,8 @@ "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -51075,7 +51164,8 @@ "loader-runner": { "version": "4.3.0", "resolved": "https://registry.npmmirror.com/loader-runner/-/loader-runner-4.3.0.tgz", - "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==" + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true }, "loader-utils": { "version": "2.0.4", @@ -55576,7 +55666,8 @@ "punycode": { "version": "2.3.1", "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==" + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true }, "pupa": { "version": "2.1.1", @@ -55659,6 +55750,7 @@ "version": "2.1.0", "resolved": "https://registry.npmmirror.com/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, "requires": { "safe-buffer": "^5.1.0" } @@ -57166,7 +57258,8 @@ "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true }, "safe-json-stringify": { "version": "1.2.0", @@ -57246,6 +57339,7 @@ "version": "3.3.0", "resolved": "https://registry.npmmirror.com/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", + "dev": true, "requires": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -57477,6 +57571,7 @@ "version": "6.0.1", "resolved": "https://registry.npmmirror.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz", "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "dev": true, "requires": { "randombytes": "^2.1.0" } @@ -59755,6 +59850,7 @@ "version": "5.24.0", "resolved": "https://registry.npmmirror.com/terser/-/terser-5.24.0.tgz", "integrity": "sha512-ZpGR4Hy3+wBEzVEnHvstMvqpD/nABNelQn/z2r0fjVWGQsN3bpOLzQlqDxmb4CDZnXq5lpjnQ+mHQLAOpfM5iw==", + "dev": true, "requires": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -59765,7 +59861,8 @@ "commander": { "version": "2.20.3", "resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true } } }, @@ -59773,6 +59870,7 @@ "version": "5.3.9", "resolved": "https://registry.npmmirror.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "dev": true, "requires": { "@jridgewell/trace-mapping": "^0.3.17", "jest-worker": "^27.4.5", @@ -60684,6 +60782,7 @@ "version": "4.4.1", "resolved": "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "requires": { "punycode": "^2.1.0" } @@ -61048,6 +61147,7 @@ "version": "2.4.0", "resolved": "https://registry.npmmirror.com/watchpack/-/watchpack-2.4.0.tgz", "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dev": true, "requires": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -61080,6 +61180,7 @@ "version": "5.89.0", "resolved": "https://registry.npmmirror.com/webpack/-/webpack-5.89.0.tgz", "integrity": "sha512-qyfIC10pOr70V+jkmud8tMfajraGCZMBWJtrmuBymQKCrLTRejBI8STDp1MCyZu/QTdZSeacCQYpYNQVOzX5kw==", + "dev": true, "requires": { "@types/eslint-scope": "^3.7.3", "@types/estree": "^1.0.0", @@ -61110,17 +61211,20 @@ "es-module-lexer": { "version": "1.4.1", "resolved": "https://registry.npmmirror.com/es-module-lexer/-/es-module-lexer-1.4.1.tgz", - "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==" + "integrity": "sha512-cXLGjP0c4T3flZJKQSuziYoq7MlT+rnvfZjfp7h+I7K9BNX54kP9nyWvdbwjQ4u1iWbOL4u96fgeZLToQlZC7w==", + "dev": true }, "tapable": { "version": "2.2.1", "resolved": "https://registry.npmmirror.com/tapable/-/tapable-2.2.1.tgz", - "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==" + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true }, "webpack-sources": { "version": "3.2.3", "resolved": "https://registry.npmmirror.com/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==" + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true } } }, diff --git a/package.json b/package.json index 1c4804b..115d2ad 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,8 @@ "author": "", "dependencies": { "@antmjs/vantui": "^3.2.2", - "@flossom-npm/iot-translater": "^1.0.14", - "@flossom-npm/iot-translater-we100": "^1.0.74", + "@flossom-npm/iot-translater": "^1.0.8", + "@flossom-npm/iot-translater-we100": "^1.0.66", "@reduxjs/toolkit": "^2.0.1", "@taroify/core": "^0.1.1-alpha.8", "@tarojs/components": "3.6.19", @@ -65,6 +65,7 @@ }, "devDependencies": { "@babel/core": "^7.8.0", + "@babel/runtime": "^7.7.7", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.5", "@tarojs/cli": "3.6.19", "@tarojs/taro-loader": "3.6.19", @@ -86,11 +87,10 @@ "react-refresh": "^0.11.0", "stylelint": "9.3.0", "taro-plugin-compiler-optimization": "^1.0.4", + "terser-webpack-plugin": "^5.3.9", "thread-loader": "^4.0.2", "ts-node": "^10.9.1", "typescript": "^4.1.0", - "webpack": "^5.78.0", - "terser-webpack-plugin": "^5.3.9", - "@babel/runtime": "^7.7.7" + "webpack": "^5.78.0" } } diff --git a/src/components/bluetoot/connection/index.tsx b/src/components/bluetoot/connection/index.tsx index 585a909..c7a91e5 100644 --- a/src/components/bluetoot/connection/index.tsx +++ b/src/components/bluetoot/connection/index.tsx @@ -50,7 +50,7 @@ import { DeviceToolKit as DeviceToolKitFR200 } from "@flossom-npm/iot-translater import { showModal, msg } from "@/utils/traoAPI"; // const { InstrumentTypeEnum, OtaDeviceTypeEnum } = app.globalData; -import InstrumentTypeEnum from "../instrumentTypeEnum"; +import InstrumentTypeEnum from "../InstrumentTypeEnum"; import OtaDeviceTypeEnum from "../OtaDeviceTypeEnum"; let isGetVersionTimer: any = null; @@ -70,7 +70,7 @@ let searchBluetootTimersNum = 0; // 搜索蓝牙秒数 let connectionTimer: any = null; // 连接蓝牙定时器 let connectionTimerNum = 0; -let sendPairingTimer: any = null; +let sendPairingTimer: any = null; // 发送配对 import "./index.less"; @@ -146,7 +146,7 @@ class ConnectionBluetoot extends Component { /** 开始连接 */ connection() { this.setState({ - isConnection: true, + isConnection: false, }); //初始化 蓝牙连接 this.bluetoothInit(); @@ -213,7 +213,7 @@ class ConnectionBluetoot extends Component { openBluetoothAdapter() { openBluetoothAdapter() .then((res) => { - console.info("openBluetoothAdapter res value =>", res); + console.log("openBluetoothAdapter res value =>", res); let { errno, errMsg } = res; if (errno == 0) { this.startBluetoothDevicesDiscovery(); @@ -236,7 +236,7 @@ class ConnectionBluetoot extends Component { this.close(); }); } else { - console.info("openBluetoothAdapter err value => ", err); + console.log("openBluetoothAdapter err value => ", err); this.failErrorCode(errno, errMsg); } }); @@ -298,6 +298,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) for (let i = 0; i < item.devices.length; i++) { if ( @@ -307,18 +309,13 @@ class ConnectionBluetoot extends Component { : item.devices[i].name ).indexOf(`${type}`) !== -1 ) { - console.info("连接的设备信息", item.devices[i], type); + console.log("连接的设备信息", item.devices[i], type); let params = { deviceId: item.devices[i].deviceId, - servicesuuid: item.devices[i].serviceId, - characteristicsuuid0: item.devices[i].characteristics[0].uuid, - characteristicsuuid1: item.devices[i].characteristics[1].uuid, - characteristicId: "", }; - this.props.setBluetoothInfo(params); + this.props.setDeviceId(params); setTimeout(() => { - console.log("this.props.bluetoothInfo", this.props.bluetoothInfo); clearInterval(searchBluetootTimers); Taro.stopBluetoothDevicesDiscovery(); //停止搜索蓝牙 // app.globalData.deviceInfo.deviceId = item.devices[i].deviceId; @@ -333,6 +330,7 @@ class ConnectionBluetoot extends Component { /** 5.新建蓝牙连接 */ async createBLEConnection() { console.log("========新建蓝牙连接========"); + this.setState({ isConnection: true }); // 开始蓝牙连接 try { await closeBLEConnection(this.props.bluetoothInfo.deviceId); } catch (e) {} @@ -344,7 +342,7 @@ class ConnectionBluetoot extends Component { console.log("createBLEConnection", res); let { errno, errMsg } = res; if (errno == 0) { - if (this.props.yiqiInfo.model === "WL200") { + if (deviceInfo.model === "WL200") { this.setState({ connectionStatus: true, }); @@ -373,11 +371,16 @@ class ConnectionBluetoot extends Component { getBLEDeviceServices(this.props.bluetoothInfo.deviceId) .then((res) => { console.log("特征值", res); - let bluetoothInfo = this.props.bluetoothInfo; - bluetoothInfo.servicesuuid = res.servicesuuid; - bluetoothInfo.characteristicsuuid1 = res.characteristicsuuid1; - bluetoothInfo.characteristicsuuid0 = res.characteristicsuuid0; - this.props.setBluetoothInfo(bluetoothInfo); + let params = { + deviceId: this.props.bluetoothInfo.deviceId, + servicesuuid: res.servicesuuid, + characteristicsuuid1: res.characteristicsuuid1, + characteristicsuuid0: res.characteristicsuuid0, + }; + + console.log("getBLEDeviceServices", params); + // 获取并修改蓝牙特征值 + this.props.setBluetoothInfo(params); setTimeout(() => { this.notifyBLECharacteristicValueChange(); @@ -385,7 +388,7 @@ class ConnectionBluetoot extends Component { }) .catch((err) => { let { errno, errMsg } = err; - console.info("getBLEDeviceServices error =>", err); + console.log("getBLEDeviceServices error =>", err); this.failErrorCode(errno, errMsg); }); } @@ -395,7 +398,6 @@ class ConnectionBluetoot extends Component { console.log("7.通知BLE特征值更改"); const { yiqiInfo: deviceInfo } = this.props; const bluetoothInfo = this.props.bluetoothInfo; - console.log("bluetoothInfo", bluetoothInfo); notifyBLECharacteristicValueChange({ deviceId: bluetoothInfo.deviceId, servicesuuid: bluetoothInfo.servicesuuid, @@ -405,9 +407,12 @@ class ConnectionBluetoot extends Component { .then((ress) => { let { errno, errMsg } = ress; if (errno == 0) { + // 订阅特征码变化 Taro.onBLECharacteristicValueChange((value) => { - console.info("onBLECharacteristicValueChange value => ", value); + // 配对成功进入? + console.log("onBLECharacteristicValueChange value => ", value); let str = ab2hex(value.value); //转为16进制字符串 + console.log("转为16进制字符串 str", str); let connectionStatus = [ "FR200", "WL200", @@ -415,228 +420,132 @@ class ConnectionBluetoot extends Component { "FR390", "M01", ].includes(deviceInfo.model); - const isFRDevice = ["FR200", "FR380", "FR390"].includes( - deviceInfo.model - ); - if (isFRDevice) { - this.setState({ - connectionStatus, - }); - log.info( - commandMap.reciviedBLECommand, - `仪器模式: ${deviceInfo.model}`, - value - ); - filterBleData(str).forEach((item) => { - console.log("设备响应数据===》", item); - if (item.indexOf(`dbf0a8010155`) !== -1) { - //配对成功 - log.info("蓝牙配对成功"); - clearInterval(sendPairingTimer); - this.setState({ islian: true }); - - console.log("获取设备版本号"); - this.sendGetVersion(); - sendgetversionTimer = setInterval(() => { - this.sendGetVersion(); - }, 1000); - } - if (item.indexOf("dbf0a0030b") !== -1) { - // 版本号获取成功 - clearInterval(sendgetversionTimer); - let v1 = String(hex2int(str.substring(10, 12))).padStart( - 2, - "0" - ); - let v2 = String(hex2int(str.substring(12, 14))).padStart( - 2, - "0" - ); - let v3 = String(hex2int(str.substring(14, 16))).padStart( - 2, - "0" - ); - let versionInfo = { - v1, - v2, - v3, - version: `${v1}${v2}${v3}`, - }; - this.setState({ versionInfo }); - console.log("版本号:" + versionInfo.version); - log.info( - commandMap.versionInfoCG, - `connection_guide, ${deviceInfo.type}:${versionInfo.version}` - ); - if ( - deviceInfo.model == "FR380" || - deviceInfo.model == "FR390" - ) { - console.log("跳转护理页"); - // this.triggerEvent("offlineChange", this.state); - this.offlineChange(this.state); - } else { - if (this.state.isgetoffline) { - // 获取离线记录 - console.log("获取离线记录(总)"); - this.sendofflistSummary(); - } else { - console.log("跳转护理页"); - // that.triggerEvent("offlineChange", this.state); - this.offlineChange(this.state); - } - } - } - - if (item.indexOf("dbf0a0020b") !== -1) { - //离线护理记录(总)获取成功 - // 先获取记录总条数,再获取详细 - console.log("获取离线记录总条数====>", item); - log.info( - commandMap.finishOfflineData, - `接收到总的离线记录=》${item}` - ); - // this.state.offlineDataindex = - // 7 || Number(item.substring(24, 2)); - let offlineDataindex = 7 || Number(item.substring(24, 2)); - this.setState({ offlineDataindex }); - if (this.state.offlineDataindex > 0) { - this.sendofflist(); - } else { - // this.triggerEvent("offlineChange", that.data); - this.offlineChange(this.state); - } - } - if (item.indexOf("dbf0a00211") !== -1) { - //设备响应离线护理记录(细) - log.info( - commandMap.finishOfflineData, - "接收到详细离线记录, 准备进入sendofflist" - ); - this.sendOfflistPost(str); - this.sendofflist(); - } - - if (item.indexOf("dbf0a001006dde") !== -1) { - // 同步时间 - // that.sendAsyncTime() - } - }); - } else { - let jsonStatus: any = null; - let querySubDeviceArrayBuffer; - if (deviceInfo.model == "WL200") { - // querySubDeviceArrayBuffer = deviceToolKitInstanceWL200.toBleCommand(bleCommandSamples.querySubDevice); - // jsonStatus = deviceToolKitInstanceWL200.toJsonStatus(value.value); - jsonStatus = deviceToolKitInstanceM01.toJsonStatus(value.value); - querySubDeviceArrayBuffer = - deviceToolKitInstanceM01.toBleCommand( - bleCommandSamples.querySubDevice as any - ); // todo - } else if (deviceInfo.model == "M01") { - jsonStatus = deviceToolKitInstanceM01.toJsonStatus(value.value); - querySubDeviceArrayBuffer = - deviceToolKitInstanceM01.toBleCommand( - bleCommandSamples.querySubDevice as any - ); - } - log.info( - commandMap.reciviedBLECommand, - `仪器模式: ${deviceInfo.model}`, - jsonStatus + let jsonStatus: any = null; + let querySubDeviceArrayBuffer; + if (deviceInfo.model == "WL200") { + // querySubDeviceArrayBuffer = + // deviceToolKitInstanceWL200.toBleCommand( + // bleCommandSamples.querySubDevice as any + // ); + // jsonStatus = deviceToolKitInstanceWL200.toJsonStatus( + // value.value + // ); + jsonStatus = deviceToolKitInstanceM01.toJsonStatus(value.value); + querySubDeviceArrayBuffer = deviceToolKitInstanceM01.toBleCommand( + bleCommandSamples.querySubDevice as any + ); // todo + } else if (deviceInfo.model == "M01") { + jsonStatus = deviceToolKitInstanceM01.toJsonStatus(value.value); + querySubDeviceArrayBuffer = deviceToolKitInstanceM01.toBleCommand( + bleCommandSamples.querySubDevice as any ); - if (jsonStatus?.commandType === "BleMatch") { - switch (jsonStatus?.bleCommandType) { - case "SendMatchCode": - if (jsonStatus.matchedSuccess) { - console.log("蓝牙配对成功"); - clearInterval(sendPairingTimer); - if (overTimer) clearTimeout(overTimer); - if (this.state.connectionSuccess) return; - this.setState({ - connectionSuccess: true, - connectionStatus, - }); - // 暂时不需要查询是否连接子设备, 直接进入查询版本信息 - this.detectVersionUpdate(); - /*if(deviceInfo.type == instrumentTypeEnum.M01) { + } + // log.info( + // commandMap.reciviedBLECommand, + // `仪器模式: ${deviceInfo.model}`, + // jsonStatus + // ); + console.log( + commandMap.reciviedBLECommand, + `仪器模式: ${deviceInfo.model}`, + jsonStatus + ); + console.log("jsonStatus", jsonStatus); + if (jsonStatus?.commandType === "BleMatch") { + switch (jsonStatus?.bleCommandType) { + case "SendMatchCode": + if (jsonStatus.matchedSuccess) { + console.log("BleMatch蓝牙配对成功"); + clearInterval(sendPairingTimer); + if (overTimer) clearTimeout(overTimer); + this.setState({ + connectionSuccess: true, + connectionStatus, + islian: true, // 不需要离线记录,但暂未完全删除这部分逻辑,所以直接设为true + }); + this.detectVersionUpdate(); + // todo 连接成功需删除离线记录,暂时未缓存离线记录 + if (this.state.connectionSuccess) return; + // 暂时不需要查询是否连接子设备, 直接进入查询版本信息 + // this.detectVersionUpdate(); + /*if(deviceInfo.type == instrumentTypeEnum.M01) { this.detectVersionUpdate() } else { this.sendQuerySubDevice(querySubDeviceArrayBuffer) }*/ + } + break; + case "BleStatusSync": + if (jsonStatus.connectMessage?.connectType == "CONNECTED") { + switch (jsonStatus.connectMessage?.deviceName) { + case OtaDeviceTypeEnum.WE100: + case OtaDeviceTypeEnum.FACIALMASK: + console.log("面膜连上了 value => ", jsonStatus); + this.detectVersionUpdate(); + break; + case OtaDeviceTypeEnum.WL200: + console.log("面罩连上了 value => ", jsonStatus); + this.detectVersionUpdate(); + break; + default: + break; } - break; - case "BleStatusSync": - if (jsonStatus.connectMessage?.connectType == "CONNECTED") { - switch (jsonStatus.connectMessage?.deviceName) { - case OtaDeviceTypeEnum.WE100: - case OtaDeviceTypeEnum.FACIALMASK: - console.log("面膜连上了 value => ", jsonStatus); - this.detectVersionUpdate(); - break; - case OtaDeviceTypeEnum.WL200: - console.log("面罩连上了 value => ", jsonStatus); - this.detectVersionUpdate(); - break; - default: - break; - } - } - console.info("BleStatusSync value => ", jsonStatus); - break; - case "QueryMatchStatus": - console.info("QueryMatchStatus value => ", jsonStatus); - break; - default: - break; - } - } else if (jsonStatus?.commandType === "InfoQuery") { - switch (jsonStatus.infoQueryType) { - case "versionInfo": - if (this.state.hasVersionInfo) return; - clearTimeout(isGetVersionTimer); - this.setState({ - hasVersionInfo: true, // 已返回版本信息 - connectionStatus: true, - subDeviceConnectedStatus: true, - synchronousStatus: true, - }); - const deviceVersionNo = jsonStatus.versionNo; - const latestVersionNo = deviceInfo.iot_versions; - // const isNeedToUpdateBl = isNeedToUpdate(deviceVersionNo, latestVersionNo) - // 判断是否需要升级 - // M01和WL200 不需要在这里进行蓝牙更新 - // if (isNeedToUpdateBl) { - // const pages = getCurrentPages(); - // const matchPageList = [{ - // route: 'pages/MatrixWL200/pages/index/index' - // },{ - // route: 'pages/MatrixM01/pages/index/index' - // }]; - // const hadOpen = checkSameKey(pages, matchPageList, 'route'); - // if (!hadOpen) { - // this.triggerEvent("pairingChange", { deviceVersionNo }); - this.pairingChange({ deviceVersionNo }); - // } - // } else { - // this.sendSyncRecording() - // } - break; - case "offlineClockSummary": - clearTimeout(isGetSyncRecordingTimer); - if (this.state.hasSyncRecord) return; - this.setState({ - hasSyncRecord: true, - synchronousStatus: true, - }); - console.info("offlineClockSummary value =>", jsonStatus); - // this.triggerEvent("pairingChange", this.state); - this.pairingChange(this.state); - // TODO 查询离线记录结果 - default: - break; - } + } + console.log("BleStatusSync value => ", jsonStatus); + break; + case "QueryMatchStatus": + console.log("QueryMatchStatus value => ", jsonStatus); + break; + default: + break; + } + } else if (jsonStatus?.commandType === "InfoQuery") { + console.log("查询版本信息", jsonStatus); + switch (jsonStatus.infoQueryType) { + case "versionInfo": + if (this.state.hasVersionInfo) return; + clearTimeout(isGetVersionTimer); + this.setState({ + hasVersionInfo: true, // 已返回版本信息 + connectionStatus: true, + subDeviceConnectedStatus: true, + synchronousStatus: true, + }); + const deviceVersionNo = jsonStatus.versionNo; + const latestVersionNo = deviceInfo.iot_versions; + // const isNeedToUpdateBl = isNeedToUpdate(deviceVersionNo, latestVersionNo) + // 判断是否需要升级 + // M01和WL200 不需要在这里进行蓝牙更新 + // if (isNeedToUpdateBl) { + // const pages = getCurrentPages(); + // const matchPageList = [{ + // route: 'pages/MatrixWL200/pages/index/index' + // },{ + // route: 'pages/MatrixM01/pages/index/index' + // }]; + // const hadOpen = checkSameKey(pages, matchPageList, 'route'); + // if (!hadOpen) { + // this.triggerEvent("pairingChange", { deviceVersionNo }); + this.pairingChange({ deviceVersionNo }); + // } + // } else { + // this.sendSyncRecording() + // } + break; + case "offlineClockSummary": + clearTimeout(isGetSyncRecordingTimer); + if (this.state.hasSyncRecord) return; + this.setState({ + hasSyncRecord: true, + synchronousStatus: true, + }); + console.log("offlineClockSummary value =>", jsonStatus); + // this.triggerEvent("pairingChange", this.state); + this.pairingChange(this.state); + // TODO 查询离线记录结果 + default: + break; } } }); @@ -648,7 +557,7 @@ class ConnectionBluetoot extends Component { * type3 we100 * type4 FR380 */ - console.log("发送配对码"); + console.log("发送配对码", deviceInfo.model); if (deviceInfo.model == "FR200") { if (sendPairingTimer) clearInterval(sendPairingTimer); sendPairingTimer = setInterval(() => { @@ -657,6 +566,7 @@ class ConnectionBluetoot extends Component { } else if (deviceInfo.model == "WL200" || deviceInfo.model == "M01") { if (sendPairingTimer) clearInterval(sendPairingTimer); sendPairingTimer = setInterval(() => { + console.log("test WL200"); this.sendPairingSignal(); }, 1000); } else if ( @@ -672,7 +582,7 @@ class ConnectionBluetoot extends Component { overTimer = setTimeout(() => { if (this.state.islian) { console.log("超时跳转护理页"); - log.info("超时跳转护理页"); + // log.info("超时跳转护理页"); // 已配对成功,其它操作导致超时未跳转则直接跳转 // this.triggerEvent("offlineChange", this.state); this.offlineChange(this.state); @@ -696,7 +606,8 @@ class ConnectionBluetoot extends Component { sendGetVersion() { const { yiqiInfo: deviceInfo } = this.props; const isFRDevice = ["FR200", "FR380", "FR390"].includes(deviceInfo.model); - log.info(commandMap.sendVersionCommand, `仪器:${deviceInfo.type}`); + // log.info(commandMap.sendVersionCommand, `仪器:${deviceInfo.model}`); + console.log(commandMap.sendVersionCommand, `仪器:${deviceInfo.model}`); if (isFRDevice) { writeBLECharacteristicValue({ //发送获取仪器版本号 @@ -710,7 +621,7 @@ class ConnectionBluetoot extends Component { // const otaDeviceType = deviceInfo.type == instrumentTypeEnum.WL200 ? OtaDeviceTypeEnum.WL200 : OtaDeviceTypeEnum.WE100; // 通过发箍连 都用we100 const otaDeviceType = - deviceInfo.type == InstrumentTypeEnum.WL200 + deviceInfo.model == InstrumentTypeEnum.WL200 ? OtaDeviceTypeEnum.WE100 : OtaDeviceTypeEnum.WE100; const versionCommand = { @@ -719,7 +630,7 @@ class ConnectionBluetoot extends Component { otaDeviceType, }; const value = - deviceInfo.type == InstrumentTypeEnum.WL200 + deviceInfo.model == InstrumentTypeEnum.WL200 ? deviceToolKitInstanceM01.toBleCommand(versionCommand as any) : deviceToolKitInstanceM01.toBleCommand(versionCommand as any); // const value = deviceInfo.type == instrumentTypeEnum.WL200 ? deviceToolKitInstanceWL200.toBleCommand(versionCommand) : deviceToolKitInstanceM01.toBleCommand(versionCommand); @@ -732,7 +643,7 @@ class ConnectionBluetoot extends Component { // log.info() if (this.state.offlineDataindex == this.state.offlineDataList.length) { console.log("离线记录获取完成"); - log.info(commandMap.finishOfflineData, this.state.offlineDataList); + // log.info(commandMap.finishOfflineData, this.state.offlineDataList); /**** * 发送同步时间 * ****/ @@ -747,7 +658,7 @@ class ConnectionBluetoot extends Component { return false; } console.log("发送获取离线记录(细)指令"); - log.info(commandMap.finishOfflineData, "发送获取离线记录(细)指令"); + // log.info(commandMap.finishOfflineData, "发送获取离线记录(细)指令"); writeBLECharacteristicValue({ //发送获取离线记录 deviceId: this.props.bluetoothInfo.deviceId, @@ -762,7 +673,7 @@ class ConnectionBluetoot extends Component { let str = "DBF0A00200"; console.log("发送离线记录汇总指令 ==》", str); this.setState({ offlineDataList: [] }); // 置空重查离线记录 - log.info(commandMap.finishOfflineData, `发送获取离线记录(总)指令`); + // log.info(commandMap.finishOfflineData, `发送获取离线记录(总)指令`); writeBLECharacteristicValue({ //发送获取离线记录 deviceId: this.props.bluetoothInfo.deviceId, @@ -773,9 +684,12 @@ class ConnectionBluetoot extends Component { }); } + /** 9.发送配对码 */ sendPairingSignal() { + console.log("9.发送配对码 sendPairingSignal"); const { yiqiInfo: deviceInfo } = this.props; - log.info(commandMap.sendMatchCode, `仪器:${deviceInfo.type}发送匹配码`); + // log.info(commandMap.sendMatchCode, `仪器:${deviceInfo.model}发送匹配码`); + console.log(commandMap.sendMatchCode, `仪器:${deviceInfo.model}发送匹配码`); let matchArrayBuffer: any = null; switch (deviceInfo.model) { case InstrumentTypeEnum.FR200: @@ -784,7 +698,12 @@ class ConnectionBluetoot extends Component { ); break; case InstrumentTypeEnum.WL200: - matchArrayBuffer = deviceToolKitInstanceWL200.toBleCommand( + console.log("WL200无法配对,只能用M01"); + console.log("正在发送WL200", bleCommandSamples.match); + // matchArrayBuffer = deviceToolKitInstanceWL200.toBleCommand( + // bleCommandSamples.match as any + // ); + matchArrayBuffer = deviceToolKitInstanceM01.toBleCommand( bleCommandSamples.match as any ); break; @@ -814,15 +733,17 @@ class ConnectionBluetoot extends Component { default: break; } - if (matchArrayBuffer) - sendCommand({ value: matchArrayBuffer }) - .then(() => {}) - .catch((e) => { - // 下发配对指令失败,走重连操作 - clearInterval(sendPairingTimer); - // wx.closeBLEConnection(); - this.createBLEConnection(); - }); + if (matchArrayBuffer) console.log("matchArrayBuffer", matchArrayBuffer); + sendCommand({ value: matchArrayBuffer }) + .then((res) => { + console.log("matchArrayBuffer res", res); + }) + .catch((e) => { + // 下发配对指令失败,走重连操作 + clearInterval(sendPairingTimer); + // wx.closeBLEConnection(); + this.createBLEConnection(); + }); } /** 发送记录 */ @@ -900,7 +821,7 @@ class ConnectionBluetoot extends Component { errorCode(errno, errMsg) { clearInterval(searchBluetootTimers); clearInterval(sendgetversionTimer); - console.info("errorCode err => ", errno, errMsg); + // console.info("errorCode err => ", errno, errMsg); if (errno == 10001 || errno == 10009) { let t2 = errno == 10001 @@ -974,10 +895,11 @@ class ConnectionBluetoot extends Component { } failErrorCode(errno, errMsg) { - console.info("failErrorCode err => ", errno, errMsg); + console.log("failErrorCode err => ", errno, errMsg); clearInterval(searchBluetootTimers); clearInterval(sendgetversionTimer); - log.info("连接仪器失败", errno, errMsg); + // log.info("连接仪器失败", errno, errMsg); + console.log("连接仪器失败", errno, errMsg); let errorText = ""; switch (errno) { case 1500101: @@ -1080,6 +1002,8 @@ class ConnectionBluetoot extends Component { // this.sendSyncRecording() // }, 5000); } + + /** 发送同步记录 */ sendSyncRecording() { const { yiqiInfo: deviceInfo } = this.props; const versionCommand = { @@ -1109,6 +1033,11 @@ class ConnectionBluetoot extends Component { this.props.confirm("confirm"); }; + onReconnect = () => { + console.log("onReconnect"); + // this.props.confirm("confirm"); + }; + pairingChange = (data) => { this.props.pairingChange(data); }; @@ -1118,17 +1047,21 @@ class ConnectionBluetoot extends Component { }; render() { - let { name, isConnection, connectionStatus } = this.state; + let { name, isConnection, connectionStatus, connectionSuccess, error } = + this.state; let { yiqiInfo } = this.props; return ( {name} diff --git a/src/components/bluetoot/connection/test.js b/src/components/bluetoot/connection/test.js index 6e2df78..0c6ec0f 100644 --- a/src/components/bluetoot/connection/test.js +++ b/src/components/bluetoot/connection/test.js @@ -1,66 +1,66 @@ /**蓝牙命令合集*/ export const bleCommandSamples = { - /**发送配对码*/ - match: { - commandType: "BleMatch", - bleCommandType: "SendMatchCode", - }, - /**查询附属设备的配对状态*/ - querySubDevice: { - commandType: "BleMatch", - bleCommandType: "QueryMatchStatus", - }, - /**查询设备状态指令*/ - queryDeviceStatus: { - commandType: "DeviceStatusSync", - deviceSyncCommandType: 'queryDeviceStatus' - }, - /**查询版本指令*/ - queryDeviceVersionStatus: { - commandType: "InfoQuery", - infoQueryType: 'versionInfo', - otaDeviceType: '' - }, - /**查询当前记录*/ - queryCurrentMaskReportInfo: { - commandType: "InfoQuery", - infoQueryType: 'currentMaskReportInfo' - } + /**发送配对码*/ + match: { + commandType: "BleMatch", + bleCommandType: "SendMatchCode", + }, + /**查询附属设备的配对状态*/ + querySubDevice: { + commandType: "BleMatch", + bleCommandType: "QueryMatchStatus", + }, + /**查询设备状态指令*/ + queryDeviceStatus: { + commandType: "DeviceStatusSync", + deviceSyncCommandType: "queryDeviceStatus", + }, + /**查询版本指令*/ + queryDeviceVersionStatus: { + commandType: "InfoQuery", + infoQueryType: "versionInfo", + otaDeviceType: "", + }, + /**查询当前记录*/ + queryCurrentMaskReportInfo: { + commandType: "InfoQuery", + infoQueryType: "currentMaskReportInfo", + }, }; /**控制设备命令合集*/ export const deviceCommandSamples = { - /**控制设备暂停 pause暂停 working启动 end关闭*/ - pause:{ - commandType: "DeviceControl", - workStatus: "pause", - }, - standby:{ - commandType: "DeviceControl", - workStatus: "standby", - }, - end:{ - commandType: "DeviceControl", - workStatus: "end", - }, - /* - * powerfulSoothing 强效舒缓 01 - * Stability 维稳维护 02 - * Brighten 均色提亮 03 - * FirmSkin 紧致淡纹 04 - * Custom 自定义模式 05 - * WaterLightEssence 水光精华模式 11 - * ShapeBeautyEssence 塑颜精华模式 12 - * DiyFacial DIY面膜模式 13 - * FacialMaskCustom 面膜定制模式 1A - */ - work:{ - commandType: "DeviceControl", - workStatus: "working", - workMode: "", - }, - gear:{ - commandType: "DeviceControl", - partitionStatus: [{gear: 1},{gear: 1},{gear: 1},{gear: 1},] - } + /**控制设备暂停 pause暂停 working启动 end关闭*/ + pause: { + commandType: "DeviceControl", + workStatus: "pause", + }, + standby: { + commandType: "DeviceControl", + workStatus: "standby", + }, + end: { + commandType: "DeviceControl", + workStatus: "end", + }, + /* + * powerfulSoothing 强效舒缓 01 + * Stability 维稳维护 02 + * Brighten 均色提亮 03 + * FirmSkin 紧致淡纹 04 + * Custom 自定义模式 05 + * WaterLightEssence 水光精华模式 11 + * ShapeBeautyEssence 塑颜精华模式 12 + * DiyFacial DIY面膜模式 13 + * FacialMaskCustom 面膜定制模式 1A + */ + work: { + commandType: "DeviceControl", + workStatus: "working", + workMode: "", + }, + gear: { + commandType: "DeviceControl", + partitionStatus: [{ gear: 1 }, { gear: 1 }, { gear: 1 }, { gear: 1 }], + }, }; 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 a30d7f1..5dd5b43 100644 --- a/src/components/bluetoot/device-connection-popup/device-connection-popup.less +++ b/src/components/bluetoot/device-connection-popup/device-connection-popup.less @@ -1,3 +1,8 @@ +.common-box { + width: 670rpx; + height: 1150rpx; + box-sizing: border-box; +} .site-popup-content-box { margin: 0; } @@ -33,17 +38,6 @@ box-sizing: border-box; } -.upload-tips-common-box { - padding: 50rpx 20rpx 44rpx 20rpx; - .tips-message { - margin-top: 30rpx; - text-align: center; - font-size: 28rpx; - line-height: 45rpx; - color: #666; - } -} - .popup-btn-one { display: flex; margin-top: 60rpx; @@ -62,3 +56,65 @@ font-family: PingFang SC; } } + +.block, +.block2 { + display: flex; + align-items: center; + position: relative; + width: 100%; + box-sizing: border-box; + display: flex; + column-gap: 30rpx; + // padding-top: 10px; + margin: 0 auto 10px; + text-align: center; + .icon { + /* margin-top: 5rpx; */ + width: 36rpx; + min-width: 36rpx; + height: 36rpx; + image { + width: 100%; + height: 100%; + vertical-align: middle; + } + } +} +.block { + margin-top: 80rpx; +} +.block2 { + margin-top: 40rpx; +} + +.images, +.videos { + display: block; + width: 600rpx; + height: 600rpx; + border-radius: 30rpx; + // width: 100%; + // height: 100%; + overflow: hidden; +} + +.error-block { + display: block; + text-align: center; + color: #030000; + .tip1 { + margin-top: 80rpx; + font-size: 28rpx; + font-weight: 400; + } + .tip2 { + margin-top: 40rpx; + font-size: 28rpx; + font-weight: 400; + } +} + +.device-popup-btns { + margin-top: 60rpx; +} 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 953791c..e227570 100644 --- a/src/components/bluetoot/device-connection-popup/device-connection-popup.tsx +++ b/src/components/bluetoot/device-connection-popup/device-connection-popup.tsx @@ -30,7 +30,6 @@ export default class DeviceConnectPopup extends Component { super(props); this.state = { name: "蓝牙提示弹窗", - current: 0, toRight: false, isClick: false, }; @@ -60,14 +59,32 @@ export default class DeviceConnectPopup extends Component { this.props.confirm(); }; + onReconnect = () => { + this.props.reconnect(); + }; + onClickStop = (e) => { e.stopPropagation(); }; + isImage = (url) => { + if (url) { + if (url.includes(".mp4")) { + return false; + } + } + return true; + }; + render() { - let { isShow, data, isLarge, title, connectionStatus, isConnection } = - this.props; - let { current } = this.state; + let { + isShow, + data, + // connectionStatus, + isConnection, + connectionSuccess, + error, + } = this.props; return ( @@ -84,72 +101,119 @@ export default class DeviceConnectPopup extends Component { className="at-icon at-icon-close site-close" onClick={this.onClose} > - - - {data.bluetoothConnectingTitle} - - - ); diff --git a/src/pages/iotCarePlan/iotCarePlan.less b/src/pages/iotCarePlan/iotCarePlan.less new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/iotCarePlan/iotCarePlan.tsx b/src/pages/iotCarePlan/iotCarePlan.tsx new file mode 100644 index 0000000..1ee277a --- /dev/null +++ b/src/pages/iotCarePlan/iotCarePlan.tsx @@ -0,0 +1,54 @@ +import Taro from "@tarojs/taro"; +import classnames from "classnames"; + +import { Component, PropsWithChildren, useEffect, useState } from "react"; +import { Block, View, Text, Image, Input, Button } from "@tarojs/components"; + +/*** redux ***/ +import { connect } from "react-redux"; +import { userRefresh, tokenRefresh } from "@/store/features/userInfo"; +/*** redux end ***/ + +import Navbar from "@/components/navbar/navbar"; + +import "./iotCarePlan.less"; + +class IotCarePlan extends Component { + constructor(props) { + super(props); + this.state = { + name: "iotCarePlan", + }; + } + + async onLoad() {} + componentDidMount() {} + + componentWillUnmount() {} + + componentDidShow() {} + + componentDidHide() {} + + async initData() {} + + render() { + let { name } = this.state; + return ( + + + {name} + + ); + } +} + +const mapStateToProps = (state) => ({ + // background: state.navigation.background, +}); +const mapDispatchToProps = (dispatch) => ({ + // userRefresh(data) { + // dispatch(userRefresh(data)); + // }, +}); +export default connect(mapStateToProps, mapDispatchToProps)(IotCarePlan); diff --git a/src/store/features/deviceInfo.js b/src/store/features/deviceInfo.js index e84d158..71b3f76 100644 --- a/src/store/features/deviceInfo.js +++ b/src/store/features/deviceInfo.js @@ -6,7 +6,7 @@ const deviceInfoReducer = createSlice({ name: "deviceinfo", // store的名字 initialState: { bluetoothInfo: { - deviceId: "5FF5FD4F-9EF9-3CB6-AD89-F915B55E5DE9", // 先测试一下 + deviceId: "", // 先测试一下 servicesuuid: "", characteristicsuuid0: "", characteristicsuuid1: "", @@ -19,8 +19,6 @@ const deviceInfoReducer = createSlice({ }, setBluetoothInfo(state, { payload }) { console.log("setBluetoothInfo payload", payload); - // state.bluetoothInfo = JSON.parse(JSON.stringify(payload)); - // console.log("state.bluetoothInfo", state.bluetoothInfo); state.bluetoothInfo.deviceId = payload.deviceId; if (payload.servicesuuid) { state.bluetoothInfo.servicesuuid = payload.servicesuuid; @@ -36,6 +34,7 @@ const deviceInfoReducer = createSlice({ } }, setDeviceId(state, { payload }) { + console.log("setDeviceId state", state); console.log("setDeviceId payload", payload); state.bluetoothInfo.deviceId = payload.deviceId; }, diff --git a/src/utils/bluetoothWXAPI.js b/src/utils/bluetoothWXAPI.js index a882f1f..bad6d4c 100644 --- a/src/utils/bluetoothWXAPI.js +++ b/src/utils/bluetoothWXAPI.js @@ -1,6 +1,5 @@ import Taro from "@tarojs/taro"; import store from "../store"; -const deviceInfo = store.getState().deviceInfo; import { msg, back, showModal, go, loading } from "./traoAPI"; // const app = getApp(); @@ -155,6 +154,7 @@ export const writeBLECharacteristicValue = (info, completeCallback) => { }; export const sendCommand = (info) => { + const deviceInfo = store.getState().deviceInfo; return new Promise((reslove, reject) => { Taro.writeBLECharacteristicValue({ deviceId: deviceInfo.bluetoothInfo.deviceId, @@ -162,7 +162,6 @@ export const sendCommand = (info) => { characteristicId: deviceInfo.bluetoothInfo.characteristicsuuid0, value: info.value, success(res) { - console.log(info.value); reslove(res); }, fail(err) { diff --git a/src/utils/log.js b/src/utils/log.js index ec555d3..20be338 100644 --- a/src/utils/log.js +++ b/src/utils/log.js @@ -1,30 +1,38 @@ -var log = wx.getRealtimeLogManager ? wx.getRealtimeLogManager() : null +import Taro from "@tarojs/taro"; -module.exports = { +// var logger = Taro.getRealtimeLogManager ? Taro.getRealtimeLogManager() : null; +var logger = Taro.getRealtimeLogManager(); + +const log = { debug() { - if (!log) return - log.debug.apply(log, arguments) + if (!logger) return; + logger.debug.apply(logger, arguments); }, info() { - if (!log) return - log.info.apply(log, arguments) + if (!logger) return; + console.log("logger.info", logger.info, arguments); + logger.info.apply(logger, arguments); }, warn() { - if (!log) return - log.warn.apply(log, arguments) + if (!logger) return; + logger.warn.apply(logger, arguments); }, error() { - if (!log) return - log.error.apply(log, arguments) + if (!logger) return; + logger.error.apply(logger, arguments); + }, + setFilterMsg(msg) { + // 从基础库2.7.3开始支持 + if (!logger || !logger.setFilterMsg) return; + if (typeof msg !== "string") return; + logger.setFilterMsg(msg); }, - setFilterMsg(msg) { // 从基础库2.7.3开始支持 - if (!log || !log.setFilterMsg) return - if (typeof msg !== 'string') return - log.setFilterMsg(msg) + addFilterMsg(msg) { + // 从基础库2.8.1开始支持 + if (!logger || !logger.addFilterMsg) return; + if (typeof msg !== "string") return; + logger.addFilterMsg(msg); }, - addFilterMsg(msg) { // 从基础库2.8.1开始支持 - if (!log || !log.addFilterMsg) return - if (typeof msg !== 'string') return - log.addFilterMsg(msg) - } -} \ No newline at end of file +}; + +export default log; diff --git a/src/utils/request.js b/src/utils/request.js index 559820f..4ceed53 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -13,13 +13,13 @@ import formdata from "./wxFormdata/formData"; import store from "../store"; import { tokenRefresh } from "../store/features/userInfo"; -const global = store.getState().globalStore; const global_requestUrlList = []; // 全局:正在请求的url地址,防止多次点击 // api调用失败重试次数 let api_retry_count = 0; export const Ajax = (params) => { + const global = store.getState().globalStore; const app = Taro.getApp(); const domain = global.domain; // Taro.showLoading({ @@ -51,7 +51,7 @@ export const Ajax = (params) => { }, data: params.data, success(res) { - console.log("res", res); + // console.log("res", res); if (res.data.code == 401 || res.data.code == 403) { // 自动重新登录 Taro.removeStorageSync("token"); 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 03/11] =?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} - - - )} - + + + {data.bluetoothConnectingContent} + + + )} - - {connectionSuccess ? ( - + {connectionSuccess ? ( + + - 正在为您启动今日护理场景 - - ) : ( - + + 正在为您启动今日护理场景 + + ) : ( + + - - 正在为您启动今日护理场景 - - - )} - + + + 正在为您启动今日护理场景 + + + )} @@ -185,13 +189,13 @@ export default class DeviceConnectPopup extends Component { )} {error && ( - + {data.bluetoothConnectFailTitle} - + ); } diff --git a/src/pages/iotCarePlan/iotCarePlan.less b/src/pages/iotCarePlan/iotCarePlan.less index c38ba08..271c249 100644 --- a/src/pages/iotCarePlan/iotCarePlan.less +++ b/src/pages/iotCarePlan/iotCarePlan.less @@ -2,6 +2,7 @@ padding: 20rpx 30rpx; background: #f8f8f8; box-sizing: border-box; + min-height: calc(100vh - 180rpx); .banner-box { position: relative; display: block; @@ -53,3 +54,105 @@ // background-color: #fff; } } + +.iot-btn-start { + width: 690rpx; + height: 90rpx; + line-height: 90rpx; + text-align: center; + color: #fff; + font-size: 32rpx; + background-color: #ccc; + border-radius: 45rpx; + &.is-connect { + background-color: #000; + } +} + +.footer { + position: fixed; + bottom: 0; + z-index: 99; + display: flex; + align-items: baseline; + width: 100%; + height: 153rpx; + background: #ffffff; + box-shadow: 0rpx -3rpx 7rpx 1rpx rgba(173, 191, 207, 0.21); + padding-bottom: env(safe-area-inset-bottom); + box-sizing: border-box; + .btn { + width: 690rpx; + height: 90rpx; + background: #000; + border-radius: 45rpx; + color: #fff; + line-height: 90rpx; + text-align: center; + margin: 21rpx 49rpx 42rpx 30rpx; + font-size: 32rpx; + } + + .text { + display: flex; + align-items: center; + font-size: 32rpx; + font-weight: bold; + color: #000; + } + + .btn-disable { + background-color: #ccc !important; /* 设置按钮背景颜色为灰色 */ + color: #fff !important; /* 设置按钮文字颜色为白色 */ + border-color: #ccc !important; /* 设置按钮边框颜色为灰色 */ + } + + .switch-btn-box { + width: 100vw; + display: flex; + align-items: center; + margin-top: 34rpx; + .btn-item { + height: 70rpx; + display: flex; + flex: 1; + align-items: center; + justify-content: center; + .btn-icon { + width: 36rpx; + height: 36rpx; + margin-right: 18rpx; + } + .btn-text { + font-size: 32rpx; + font-family: PingFang SC; + font-weight: bold; + color: #000000; + } + } + .border-right { + border-right: 1px solid #ddd; + } + } +} + +.battery_icon { + width: 8rpx; + height: 20rpx; + border-radius: 5rpx; + & + .battery_icon { + margin-left: 8rpx; + } +} + +.v1 { + background: linear-gradient(0deg, #efdcc2 0%, #fff2df 100%); +} + +.v2 { + background: #f8f8f8; +} + +.v3 { + background: linear-gradient(0deg, #ff4646, #ff6b6b, #f86f6f, #ff9494); +} diff --git a/src/pages/iotCarePlan/iotCarePlan.tsx b/src/pages/iotCarePlan/iotCarePlan.tsx index 94ff5a5..a2b9f5c 100644 --- a/src/pages/iotCarePlan/iotCarePlan.tsx +++ b/src/pages/iotCarePlan/iotCarePlan.tsx @@ -35,9 +35,15 @@ class IotCarePlan extends Component { super(props); this.state = { name: "iotCarePlan", - musicStatus: false, // 声音播放状态 + isMusicPlay: false, // 声音播放状态 + isConnectionBlutoot: false, // 是否已连接蓝牙 + isShowNurse: false, // 是否开始并显示护理 + isStopNurse: false, // 是否暂停护理 + isEndNurse: false, // 是否结束护理 ModeList: [], + ModeType: "all", // all visor cabin yimeish + activeModeItem: {}, // 当前选中模式 }; } @@ -70,25 +76,54 @@ class IotCarePlan extends Component { } }; + changeMusicStatus = () => { + let { isMusicPlay } = this.state; + this.setState({ isMusicPlay: !isMusicPlay }); + }; + + onStartNurse = async () => { + this.stepNext(); + }; + + modeCurrentFun = async (data) => { + console.log("modeCurrentFun", data); + this.setState({ activeModeItem: data }); + }; + + stepNext = () => { + // //0未定义(全部) 1面罩模式 2舱体模式 3医美术后 + let modeArray = ["all", "visor", "cabin", "yimeish"]; + let modeClass = this.state.activeModeItem.modeClass; + this.setState({ ModeType: modeArray[modeClass] }); + }; + render() { - let { name, musicStatus, ModeList } = this.state; + let { + name, + isMusicPlay, + ModeList, + ModeType, + isConnectionBlutoot, + isShowNurse, + isStopNurse, + } = this.state; return ( - - {musicStatus ? ( + + {isMusicPlay ? ( ) : ( )} @@ -99,12 +134,86 @@ class IotCarePlan extends Component { 护理时间:10:00 - WE200电量 + WE200电量: + + + + + - + + + + {isShowNurse && ( + + + 模式功效 + + {/* {{basicModeList[modelActiveIndex].desc}} */} + + + + 当前输出技术 + + + + + + + + + )} + + + {!isShowNurse && ( + + {isConnectionBlutoot ? ( + + 开始护理 + + ) : ( + + 开始护理 + + )} + + )} + {isShowNurse && ( + + + {isStopNurse ? ( + + ) : ( + + )} + + 暂停光照 + + + + 结束护理 + + + )} From f3d8949cc8257c7c5b09bb8f464c43b1f32c722e Mon Sep 17 00:00:00 2001 From: blak-kong <546598185@qq.com> Date: Tue, 6 Feb 2024 17:31:39 +0800 Subject: [PATCH 06/11] =?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.tsx | 2 +- src/components/popup/popup-countdown.less | 79 +++++++++ src/components/popup/popup-countdown.tsx | 96 +++++++++++ src/pages/index/index.tsx | 3 +- .../iotCarePlan/components/Footer/index.less | 0 .../iotCarePlan/components/Footer/index.tsx | 90 +++++++++++ .../components/ModeContent/index.less | 57 +++++++ .../components/ModeContent/index.tsx | 51 ++++++ .../iotCarePlan/components/ModeList/index.tsx | 15 +- src/pages/iotCarePlan/iotCarePlan.tsx | 151 +++++++++--------- src/pages/user/user.tsx | 2 +- src/store/features/userInfo.js | 3 + 12 files changed, 466 insertions(+), 83 deletions(-) create mode 100644 src/components/popup/popup-countdown.less create mode 100644 src/components/popup/popup-countdown.tsx create mode 100644 src/pages/iotCarePlan/components/Footer/index.less create mode 100644 src/pages/iotCarePlan/components/Footer/index.tsx create mode 100644 src/pages/iotCarePlan/components/ModeContent/index.less create mode 100644 src/pages/iotCarePlan/components/ModeContent/index.tsx diff --git a/src/app.tsx b/src/app.tsx index f8e1d69..610524b 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -24,7 +24,7 @@ class App extends Component { return; } - go("/pages/iotCarePlan/iotCarePlan"); + // go("/pages/iotCarePlan/iotCarePlan"); // go("/pages/instrument_clickin_upload/index"); // go("/pages/instrument/intro"); // Taro.switchTab({ diff --git a/src/components/popup/popup-countdown.less b/src/components/popup/popup-countdown.less new file mode 100644 index 0000000..5b33adf --- /dev/null +++ b/src/components/popup/popup-countdown.less @@ -0,0 +1,79 @@ +.countdown-box { + width: 400rpx; + height: 400rpx; + padding: 0; + .countdown-title { + margin-top: 52rpx; + margin-bottom: 60rpx; + font-size: 36rpx; + font-family: PingFang SC; + font-weight: bold; + color: #030000; + line-height: 60rpx; + } + .countdown-content { + display: flex; + justify-content: center; + } +} + +.countdown-popup-loading { + position: relative; +} + +.countdown-popup-loading-time { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + width: 50rpx; + height: 50rpx; + line-height: 50rpx; + margin: auto; + font-size: 54rpx; + text-align: center; + color: #ecf0f3; + font-weight: bold; +} + +.ui-loading__bg { + position: relative; + width: 160rpx; + height: 160rpx; + border-radius: 50%; + background-color: #ecf0f3; + /* background-image: conic-gradient(#3CACFF 100%,#000 0%); */ +} +.ui-loading__bg::before { + content: ""; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + width: 140rpx; + height: 140rpx; + border-radius: 50%; + background-color: #fff; +} + +.ui-loading { + position: absolute; + width: 160rpx; + height: 160rpx; + border-radius: 50%; + background: transparent; + box-sizing: border-box; + border: 10rpx solid #3cacff; + clip-path: polygon(0% 0%, 25% 0%, 50% 50%, 0% 25%); + animation: rotate 1s linear infinite; +} + +@keyframes rotate { + from { + transform: rotateZ(0deg); + } + to { + transform: rotateZ(360deg); + } +} diff --git a/src/components/popup/popup-countdown.tsx b/src/components/popup/popup-countdown.tsx new file mode 100644 index 0000000..4b93551 --- /dev/null +++ b/src/components/popup/popup-countdown.tsx @@ -0,0 +1,96 @@ +import classnames from "classnames"; +import { Component } from "react"; + +import { Block, View, PageMeta } from "@tarojs/components"; + +import { Popup } from "@antmjs/vantui"; + +import "./popup.less"; +import "./popup-countdown.less"; + +/** props + * isShow 是否显示 + * isClose 右上角关闭图标 + * type: 1注册 + * @confirm 关闭回调 + */ +export default class PopupCountdown extends Component { + constructor(props) { + super(props); + this.state = { + name: "倒计时", + }; + } + + async onLoad() {} + componentDidMount() {} + + componentWillUnmount() {} + + componentDidShow() {} + + componentDidHide() {} + + async initData() {} + + onClose = () => { + this.props.close(); + }; + + onConfirm = () => { + this.props.confirm(); + }; + + onClickStop = (e) => { + e.stopPropagation(); + }; + + render() { + let { isShow, isClose, countdown } = this.props; + return ( + + + + {isClose && ( + + )} + + + 启动倒计时 + + + + + + + + {countdown >= 0 && ( + + {countdown} + + )} + + + + + + + ); + } +} diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index 2d34b91..bab8405 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -484,6 +484,7 @@ class Index extends Component { } }; + /** 查询是否可以绑定 */ isBindingSerial = async () => { Taro.showLoading({ title: "请求中...", @@ -503,7 +504,7 @@ class Index extends Component { } Taro.hideLoading(); }; - // 绑定仪器 + /** 调用接口绑定仪器 */ bindingInstrument = async () => { Taro.showLoading({ title: "请求中...", diff --git a/src/pages/iotCarePlan/components/Footer/index.less b/src/pages/iotCarePlan/components/Footer/index.less new file mode 100644 index 0000000..e69de29 diff --git a/src/pages/iotCarePlan/components/Footer/index.tsx b/src/pages/iotCarePlan/components/Footer/index.tsx new file mode 100644 index 0000000..b380f92 --- /dev/null +++ b/src/pages/iotCarePlan/components/Footer/index.tsx @@ -0,0 +1,90 @@ +import Taro from "@tarojs/taro"; +import classnames from "classnames"; +import { Block, View, Image, Text } from "@tarojs/components"; +import { useState, useEffect } from "react"; +import "./index.less"; + +interface Props { + isConnectionBlutoot: boolean; + isShowNurse: boolean; + isStopNurse: boolean; + onEmitStartNurse: Function; // 每次点击item,回调事件和数据给父组件 + onEmitSwitchChange: Function; + onEmitEndPlan: Function; +} +function Index({ + isConnectionBlutoot, + isShowNurse, + isStopNurse, + onEmitStartNurse, + onEmitSwitchChange, + onEmitEndPlan, +}: Props) { + const onStartNurse = () => { + onEmitStartNurse(); + }; + + const onSwitchChange = () => { + onEmitSwitchChange(); + }; + + const onEndPlan = () => { + onEmitEndPlan(); + }; + + return ( + + + {!isShowNurse && ( + + {isConnectionBlutoot ? ( + + 开始护理 + + ) : ( + + 开始护理 + + )} + + )} + {isShowNurse && ( + + + {isStopNurse ? ( + + + 暂停光照 + + ) : ( + + + 开始光照 + + )} + + + + + 结束护理 + + + )} + + + ); +} + +export default Index; diff --git a/src/pages/iotCarePlan/components/ModeContent/index.less b/src/pages/iotCarePlan/components/ModeContent/index.less new file mode 100644 index 0000000..a991d6f --- /dev/null +++ b/src/pages/iotCarePlan/components/ModeContent/index.less @@ -0,0 +1,57 @@ +.modelInfo-box { + width: 690rpx; + margin: 26rpx auto 0; + padding: 37rpx 35rpx; + background-color: #fff; + box-sizing: border-box; + border-radius: 30rpx; + overflow: visible; + margin-bottom: 150rpx; + .modelInfo-line { + margin-bottom: 50rpx; + &:last-child { + margin-bottom: 0; + .modelInfo-title { + margin-bottom: 6rpx; + } + } + .modelInfo-title { + margin-bottom: 24rpx; + font-size: 28rpx; + font-weight: bold; + line-height: 1; + color: #000; + } + + .modelInfo-effect { + font-size: 26rpx; + line-height: 1; + color: #000; + } + + .modelInfo-light-box { + display: flex; + flex-wrap: wrap; + .modelInfo-light-item { + display: flex; + align-items: center; + margin-right: 40rpx; + margin-top: 20rpx; + /*margin-bottom: 20rpx;*/ + } + + .modelInfo-light-color { + width: 12rpx; + height: 12rpx; + margin-right: 10rpx; + background-color: #f2c95b; + border-radius: 50%; + } + + .modelInfo-light-colorname { + font-size: 26rpx; + line-height: 1; + } + } + } +} diff --git a/src/pages/iotCarePlan/components/ModeContent/index.tsx b/src/pages/iotCarePlan/components/ModeContent/index.tsx new file mode 100644 index 0000000..e34cf02 --- /dev/null +++ b/src/pages/iotCarePlan/components/ModeContent/index.tsx @@ -0,0 +1,51 @@ +import Taro from "@tarojs/taro"; +import classnames from "classnames"; +import { Block, View, ScrollView, Image } from "@tarojs/components"; +import { useState, useEffect } from "react"; +import "./index.less"; + +interface Props { + isShowNurse: boolean; + ActiveModeItem: any; +} +function Index({ isShowNurse, ActiveModeItem }: Props) { + const ModeColor = { + "590nm": "#CF231D", + "630nm": "#CF231D", + "830nm": "#9C1D17", + }; + return ( + + {isShowNurse && ( + + + 模式功效 + {ActiveModeItem.modeDesc} + + + 当前输出技术 + + {ActiveModeItem.combineData.map((item) => { + return ( + + + + {item.effectContent}({item.technologyInfo}) + + + ); + })} + + + + )} + + ); +} + +export default Index; diff --git a/src/pages/iotCarePlan/components/ModeList/index.tsx b/src/pages/iotCarePlan/components/ModeList/index.tsx index d1d4f0c..8bce79c 100644 --- a/src/pages/iotCarePlan/components/ModeList/index.tsx +++ b/src/pages/iotCarePlan/components/ModeList/index.tsx @@ -7,22 +7,23 @@ import "./index.less"; interface Props { ModeList: any; ModeType: string; // all visor cabin yimeish + ActiveModeItem: any; onEmit: Function; // 每次点击item,回调事件和数据给父组件 } -function Index({ ModeList, ModeType, onEmit }: Props) { +function Index({ ModeList, ModeType, ActiveModeItem, onEmit }: Props) { let VisorList = ModeList.filter((item) => item.modeClass === 1); // 面罩模式 let CabinList = ModeList.filter((item) => item.modeClass === 2); // 舱体模式 let YimeishList = ModeList.filter((item) => item.modeClass === 3); // 医美术后 - const [ModeID, setModeID] = useState(""); - const [activeID, setActiveID] = useState(""); + const [ModeID, setModeID] = useState("mode_" + ActiveModeItem.id); + const [activeID, setActiveID] = useState(ActiveModeItem.id); + + console.log("ModeID", ModeID, activeID); const yimeishClick = (item) => { onEmit(item); - useEffect(() => { - setActiveID(item.id); - setModeID("mode_" + item.id); - }); + setActiveID(item.id); + setModeID("mode_" + item.id); }; const cabinClick = (item) => { diff --git a/src/pages/iotCarePlan/iotCarePlan.tsx b/src/pages/iotCarePlan/iotCarePlan.tsx index a2b9f5c..b249e03 100644 --- a/src/pages/iotCarePlan/iotCarePlan.tsx +++ b/src/pages/iotCarePlan/iotCarePlan.tsx @@ -20,10 +20,13 @@ import { connect } from "react-redux"; /* 公共组件 */ import Navbar from "@/components/navbar/navbar"; +import PopupCountdown from "@/components/popup/popup-countdown"; /* 公共组件 END */ /* 本页组件 */ import ModeListView from "./components/ModeList/index"; +import ModeContent from "./components/ModeContent/index"; +import Footer from "./components/Footer"; /* 本页组件 END */ import { getStorageSync, setStorageSync } from "@/utils/traoAPI"; @@ -41,9 +44,14 @@ class IotCarePlan extends Component { isStopNurse: false, // 是否暂停护理 isEndNurse: false, // 是否结束护理 + // 模式列表 ModeList: [], ModeType: "all", // all visor cabin yimeish - activeModeItem: {}, // 当前选中模式 + ActiveModeItem: {}, // 当前选中模式 + + // 倒计时 + isShowCountdown: false, + countdown: 6, }; } @@ -72,7 +80,18 @@ class IotCarePlan extends Component { }; let res = await InstrumentInfo.modeInfoList(params); if (res.data.code === 200) { - this.setState({ ModeList: res.data.data }); + if (res.data.data.length > 0) { + this.setState({ + ActiveModeItem: res.data.data[0], + ModeList: res.data.data, + }); + + setTimeout(() => { + console.log("ActiveModeItem", this.state.ActiveModeItem); + }); + } else { + this.setState({ ModeList: res.data.data }); + } } }; @@ -81,20 +100,37 @@ class IotCarePlan extends Component { this.setState({ isMusicPlay: !isMusicPlay }); }; + // 开始护理按钮:点击开始,页面进行到下一步 onStartNurse = async () => { this.stepNext(); + return; + let { isConnectionBlutoot } = this.state; + if (isConnectionBlutoot) { + this.stepNext(); + } else { + // todo 提示未连接蓝牙 + } + }; + onSwitchChange = async () => { + // todo + let { isStopNurse } = this.state; + this.setState({ isStopNurse: !isStopNurse }); + }; + onEndPlan = async () => { + // todo }; modeCurrentFun = async (data) => { console.log("modeCurrentFun", data); - this.setState({ activeModeItem: data }); + this.setState({ ActiveModeItem: data }); }; stepNext = () => { // //0未定义(全部) 1面罩模式 2舱体模式 3医美术后 let modeArray = ["all", "visor", "cabin", "yimeish"]; - let modeClass = this.state.activeModeItem.modeClass; + let modeClass = this.state.ActiveModeItem.modeClass; this.setState({ ModeType: modeArray[modeClass] }); + this.setState({ isShowNurse: true }); }; render() { @@ -106,10 +142,14 @@ class IotCarePlan extends Component { isConnectionBlutoot, isShowNurse, isStopNurse, + ActiveModeItem, + isShowCountdown, + countdown, } = this.state; return ( + @@ -128,7 +168,20 @@ class IotCarePlan extends Component { /> )} - - {isShowNurse && ( - - - 模式功效 - - {/* {{basicModeList[modelActiveIndex].desc}} */} - - - - 当前输出技术 - - - - - - - - - )} - - - {!isShowNurse && ( - - {isConnectionBlutoot ? ( - - 开始护理 - - ) : ( - - 开始护理 - - )} - - )} - {isShowNurse && ( - - - {isStopNurse ? ( - - ) : ( - - )} - - 暂停光照 - - - - 结束护理 - - - )} - +