# openDocuments **Repository Path**: Rinaloving/open-documents ## Basic Information - **Project Name**: openDocuments - **Description**: 对外接口文档 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-09-29 - **Last Updated**: 2024-09-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # openDocuments #### 介绍 星康医疗 `Uniapp` 插件接口文档 #### 基础接口 ###### 获取周围蓝牙 * 方法名 `getBleAround` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | | ||| | | * 返回示例 ```json 向日葵小姐。的小米电视 S Pro 75 Mini LED|4C:24:CE:1B:F5:10,isa.switch.kg01hl|B4:60:ED:97:EB:01,null|77:83:58:1C:49:50,AIb56805534e|30:C0:1B:29:3C:71,lumi.curtain.acn006|EC:4D:3E:D8:85:08,midea|FC:DF:00:69:8B:FF,A40231000023|A4:02:31:00:00:23,realtek LPN|EC:4D:3E:D2:A6:B9,null|62:A8:5C:40:0D:F3,DESKTOP-NO9T1D1|F8:9E:94:F7:76:18,Mi Smart Band 6|C1:0A:17:0E:0D:27,Mesh Mi Switch 2|6C:D3:EE:49:51:6A,null|77:2A:C3:8A:CB:13,Mesh Mi Outlet|EC:4D:3E:C6:93:F5,realtek LPN|B4:60:ED:97:5B:C2,Mesh Mi Switch|6C:D3:EE:49:36:8B,null|B4:60:ED:07:DE:C9,qmi.plug.psv3|68:AB:BC:0B:14:E3,Mi |E1:6B:6A:FF:1D:75,qmi.plug.psv3|68:AB:BC:15:3C:65,null|FC:46:28:44:7C:D4,BYD BLE3|E7:DC:E9:42:88:ED ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |accessToken |string| 管理员token | |msg |string| 返回消息 | * 调用示例 ```javascript getBleAround(){ console.log("获取周围蓝牙") if (this.$refs.refRealEcgView) { this.$refs.refRealEcgView.getBleAround(res => { console.log(JSON.stringify(res)) }) } }, ``` * 事件回调 ```javascript plus.globalEvent.addEventListener('detailDeviceEvent', (e) =>{ var res = JSON.stringify(e.detail) console.log('detailDeviceEvent:'+res); //this.bluName = JSON.stringify(e.detail) }); plus.globalEvent.addEventListener('totalDeviceEvent', (e) =>{ //var res = JSON.stringify(e) console.log('totalDeviceEvent:'+e.detail); }); ``` ###### 连接设备 * 方法名 `connectToDevice` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | bleAddress| 是 |String|| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |accessToken |string| 管理员token | |msg |string| 返回消息 | * 调用示例 ```javascript connectToDevice() { console.log("connectToDevice 进入了"); // Prepare options to send const options = { bleAddress: "A40231000023"// No need to stringify, as it will be handled by UniJS }; // Call the native method using the ref if (this.$refs.refRealEcgView) { // 直接传递 options,而不是 [options] this.$refs.refRealEcgView.connectTheDevice(options, res => { console.log("回调结果: ", JSON.stringify(res)); if (res.code === "200") { console.log("Show grid 更新成功"); } else { console.error("Show grid 更新失败:", res.msg); } }); } } ``` * 事件回调 ```javascript plus.globalEvent.addEventListener('onDeviceConnecting', (e) =>{ console.log('onDeviceConnecting:'+JSON.stringify(e.detail)); }); plus.globalEvent.addEventListener('onDeviceConnected', (e) =>{ console.log('onDeviceConnected:'+JSON.stringify(e.detail)); }); plus.globalEvent.addEventListener('onDeviceFailedToConnect', (e) =>{ console.log('onDeviceFailedToConnect:'+JSON.stringify(e.detail)); }); plus.globalEvent.addEventListener('onDeviceReady', (e) =>{ console.log('onDeviceReady:'+JSON.stringify(e.detail)); }); ``` * 回调结果 ```json onDeviceConnecting:"A4:02:31:00:00:23" onDeviceConnected:"A4:02:31:00:00:23" onDeviceReady:"A4:02:31:00:00:23" ``` ###### 获取系统软件版本 * 方法名 `getSysVersion` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | bleAddress| 是 |String|| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |code|string| code | |msg |string| 返回消息 | * 调用示例 ```javascript getSysVersion(){ console.log("getSysVersion 进入了") if (this.$refs.refRealEcgView) { this.$refs.refRealEcgView.getSysVersion(res => { console.log(JSON.stringify(res)) }) } } ``` * 事件回调 ```javascript plus.globalEvent.addEventListener('onSysVersion', (e) =>{ var res = JSON.stringify(e.detail) console.log('系统版本:'+JSON.stringify(e.detail)); }); ``` * 回调结果 ```json {} ``` ###### 获取系统配置 * 方法名 `getSysConfig` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | | ||| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |code|string| code | |msg |string| 返回消息 | * 调用示例 ```javascript getSysConfig(){ console.log("getSysConfig进入了") if (this.$refs.refRealEcgView) { this.$refs.refRealEcgView.getSysConfig(res => { console.log(JSON.stringify(res)) }) } } ``` * 事件回调 ```javascript plus.globalEvent.addEventListener('onSysConfig', (e) =>{ var res = JSON.stringify(e.detail) console.log('系统配置:'+JSON.stringify(e.detail)); }); ``` * 回调结果 ```json {"hpf":0,"connections":0,"storageMode":0,"dockTransferMode":0,"lossless":false,"breath":0,"zoom":false,"pacemaker":false,"btTransferMode":0,"stability":0,"pfnFilter":0,"autoFreeUp":false,"channelTime":0,"lpf":0,"channel":0,"fileFilter":0} ``` ###### 获取设备自检状态 * 方法名 `getCheckStatus` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | | ||| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |code |string| code | |msg |string| 返回消息 | * 调用示例 ```javascript getCheckStatus(){ console.log("getCheckStatus进入了") if (this.$refs.refRealEcgView) { this.$refs.refRealEcgView.getCheckStatus(res => { console.log(JSON.stringify(res)) }) } } ``` * 事件回调 ```javascript plus.globalEvent.addEventListener('onCheckStatus', (e) =>{ var res = JSON.stringify(e.detail) console.log('系统自检状态:'+JSON.stringify(e.detail)); }); ``` * 回调结果 ```json {"rtcException":false,"geSensorException":false,"storageException":false} ``` ###### 获取报警开关状态 * 方法名 `getAlarmStatus` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | | ||| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |accessToken |string| 管理员token | |msg |string| 返回消息 | * 调用示例 ```javascript getAlarmStatus(){ console.log("getAlarmStatus进入了") if (this.$refs.refRealEcgView) { this.$refs.refRealEcgView.getAlarmStatus(res => { console.log(JSON.stringify(res)) }) } } ``` * 事件回调 ```javascript plus.globalEvent.addEventListener('onAlarmStatus', (e) =>{ var res = JSON.stringify(e.detail) console.log('获取报警状态:'+JSON.stringify(e.detail)); }); ``` * 回调结果 ```json {"vibrationEnabled":false,"holterLightEnabled":false,"leadAlarm":0,"btLightEnabled":false,"stability":0,"storageAlarm":0,"batteryAlarm":0,"lightEnabled":false} ``` ###### 设置用户ID * 方法名 `setUserId` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | | ||| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |accessToken |string| 管理员token | |msg |string| 返回消息 | * 调用示例 ```javascript setUserId(){ console.log("setUserId 进入了"); const options = { userId: "tom" // 传递布尔值,控制是否显示网格 }; if (this.$refs.refRealEcgView) { // 直接传递 options,而不是 [options] this.$refs.refRealEcgView.setUserId(options, res => { console.log("回调结果: ", JSON.stringify(res)); if (res.code === "200") { console.log("setUserId 更新成功"); } else { console.error("setUserId 更新失败:", res.msg); } }); } } ``` ###### 获取用户ID * 方法名 `getUserId` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | | ||| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |accessToken |string| 管理员token | |msg |string| 返回消息 | * 调用示例 ```javascript getUserId(){ console.log("getUserId进入了") if (this.$refs.refRealEcgView) { this.$refs.refRealEcgView.getUserId(res => { console.log(JSON.stringify(res)) }) } } ``` * 事件回调 ```javascript plus.globalEvent.addEventListener('onUserId', (e) =>{ var res = JSON.stringify(e.detail) console.log('获取用户ID:'+JSON.stringify(e.detail)); }); ``` * 回调结果 ```json {} ``` ###### 获取系统状态 * 方法名 `getSystemStatus` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | | ||| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |accessToken |string| 管理员token | |msg |string| 返回消息 | * 调用示例 ```javascript getSystemStatus(){ console.log("getSystemStatus进入了") if (this.$refs.refRealEcgView) { this.$refs.refRealEcgView.getSystemStatus(res => { console.log(JSON.stringify(res)) }) } } ``` * 事件回调 ```javascript plus.globalEvent.addEventListener('onSysStatus', (e) =>{ var res = JSON.stringify(e.detail) console.log('获取系统状态:'+JSON.stringify(e.detail)); }); ``` * 回调结果 ```json {"status":0,"btStatus":false,"holterSupport":false,"battery":0,"storage":0,"storageStatus":0,"dock":0,"channelOff":true,"channelStatus":0,"4G":false,"type":0,"remain":0} ``` ###### 同步设备时间 * 方法名 `syncTime` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | | ||| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |accessToken |string| 管理员token | |msg |string| 返回消息 | * 调用示例 ```javascript syncTime(){ console.log("syncTime进入了") if (this.$refs.refRealEcgView) { this.$refs.refRealEcgView.syncTime(res => { console.log(JSON.stringify(res)) }) } } ``` * 事件回调 ```javascript plus.globalEvent.addEventListener('onDeviceTime', (e) =>{ var res = JSON.stringify(e.detail) console.log('设备时间:'+JSON.stringify(e.detail)); }); ``` * 回调结果 ```json {"time":0} ``` ###### 获取设置设备时间 * 方法名 `getDeviceTime` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | | ||| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |accessToken |string| 管理员token | |msg |string| 返回消息 | * 调用示例 ```javascript getDeviceTime(){ console.log("getDeviceTime进入了") if (this.$refs.refRealEcgView) { this.$refs.refRealEcgView.getDeviceTime(res => { console.log(JSON.stringify(res)) }) } } ``` * 事件回调 ```javascript plus.globalEvent.addEventListener('onDeviceTime', (e) =>{ var res = JSON.stringify(e.detail) console.log('设备时间:'+JSON.stringify(e.detail)); }); ``` * 回调结果 ```json {"time":0} ``` *** #### `RealTimeEcgView` 心电图控件接口 ###### 是否显示心电背景格子(默认显示) * 方法名 `setShowGrid` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | | ||| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |accessToken |string| 管理员token | |msg |string| 返回消息 | * 调用示例 ```javascript setShowGrid() { console.log("setShowGrid 进入了"); const options = { showGrid: false // 传递布尔值,控制是否显示网格 }; if (this.$refs.refRealEcgView) { // 直接传递 options,而不是 [options] this.$refs.refRealEcgView.setShowGrid(options, res => { console.log("回调结果: ", JSON.stringify(res)); if (res.code === "200") { console.log("Show grid 更新成功"); } else { console.error("Show grid 更新失败:", res.msg); } }); } } ``` ###### 设置心电波形走速(默认25mm/s)12.5、25、50 * 方法名 `setShowGrid` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | | ||| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |accessToken |string| 管理员token | |msg |string| 返回消息 | * 调用示例 ```javascript setEcgSpeed() { console.log("setEcgSpeed 进入了"); const options = { speed: 50 // 设置心电波形走速(默认25mm/s)12.5、25、50 }; if (this.$refs.refRealEcgView) { // 直接传递 options,而不是 [options] this.$refs.refRealEcgView.setEcgSpeed(options, res => { console.log("回调结果: ", JSON.stringify(res)); if (res.code === "200") { console.log("setEcgSpeed 更新成功"); } else { console.error("setEcgSpeed 更新失败:", res.msg); } }); } } ``` ###### 设置增益(默认1mv) 0.5、1、2、4 * 方法名 `setShowGrid` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | | ||| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |code |string| 返回码 | |msg |string| 返回消息 | * 调用示例 ```javascript setGain() { console.log("setGain 进入了"); const options = { xGain: 0.5 // 设置增益(默认1mv) 0.5、1、2、4 }; if (this.$refs.refRealEcgView) { // 直接传递 options,而不是 [options] this.$refs.refRealEcgView.setGain(options, res => { console.log("回调结果: ", JSON.stringify(res)); if (res.code === "200") { console.log("setGain 更新成功"); } else { console.error("setGain 更新失败:", res.msg); } }); } } ``` ###### 添加显示波形数据(参数心电数据包对象) * 方法名 `addData` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | | ||| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |code |string| 返回码 | |msg |string| 返回消息 | * 调用示例 ```javascript setEcgData() { console.log("setEcgData 进入了"); const ecgPack = { event: 0, time: Date.now(), id: 134027, resps: [], invalidMark: false, channelStatus: 0, head: { ecgBytes: 2, stability: 0, samplingRate: 125, ecgPackSize: 544, respSamplingRate: 0, adu: 200, channelLength: 125, valid: true, version: 1, channelTime: 1000, respAdu: 0, sourceType: "321Patch", channel: 2, respChannel: 0, markSize: 16, sourceSN: "321Patch" }, heartRateValid: false, workoutType: 0, heartRate: 0, pacemaker: false, scale: 0, qrs: [], pfnFilter: 50, respiratoryValid: false, valid: true, channelOff: true, respiratoryRate: 0, ecgsList: [ Array(125).fill(0), // 示例数据 Array(125).fill(0), Array(125).fill(0), Array(125).fill(0), Array(125).fill(0), Array(125).fill(0) // ...继续添加数据 ], pacing: Array(125).fill(false), // 示例数据 orientation: 0 }; const options = { ecgPack: JSON.stringify(ecgPack) // 将 ecgPack 转换为 JSON 字符串传递 }; if (this.$refs.refRealEcgView) { this.$refs.refRealEcgView.addData(options, res => { console.log("回调结果: ", JSON.stringify(res)); if (res.code === "200") { console.log("ECG 数据添加成功"); } else { console.error("添加 ECG 数据时发生错误:", res.msg); } }); } } ``` ###### 心电波形颜色 * 方法名 `setShowGrid` * 参数 |参数名|必填|类型|默认值|合法值|说明| |:----- |:-----|:----- |:-----|:----- |----- | color|是 |String|| | #FFC0CB | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |code |string| 返回码 | |msg |string| 返回消息 | * 调用示例 ```javascript setEcgColor(){ console.log("setEcgColor 进入了"); const options = { color: "#FFC0CB" // 设置增益(默认1mv) 0.5、1、2、4 }; if (this.$refs.refRealEcgView) { // 直接传递 options,而不是 [options] this.$refs.refRealEcgView.setEcgColor(options, res => { console.log("回调结果: ", JSON.stringify(res)); if (res.code === "200") { console.log("setEcgColor 更新成功"); } else { console.error("setEcgColor 更新失败:", res.msg); } }); } } ``` ###### 大格子线条颜色,默认Color.parseColor("#B4B4B5") * 方法名 `setBigGridLineColor` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | color|是 |String|| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |code |string| 返回码 | |msg |string| 返回消息 | * 调用示例 ```javascript setBigGridLineColor(){ console.log("setBigGridLineColor进入了"); const options = { color: "#FFC0CB" // }; if (this.$refs.refRealEcgView) { // 直接传递 options,而不是 [options] this.$refs.refRealEcgView.setBigGridLineColor(options, res => { console.log("回调结果: ", JSON.stringify(res)); if (res.code === "200") { console.log("setBigGridLineColor更新成功"); } else { console.error("setBigGridLineColor更新失败:", res.msg); } }); } } ``` ###### 小格子线条颜色,默认Color.parseColor("#f0f0f0") * 方法名 `setSmallGridLineColor` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | color|是 |String|| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |code |string| 返回码 | |msg |string| 返回消息 | * 调用示例 ```javascript setSmallGridLineColor(){ console.log("setSmallGridLineColor进入了"); const options = { color: "#FFC0CB" // }; if (this.$refs.refRealEcgView) { // 直接传递 options,而不是 [options] this.$refs.refRealEcgView.setBigGridLineColor(options, res => { console.log("回调结果: ", JSON.stringify(res)); if (res.code === "200") { console.log("setSmallGridLineColor更新成功"); } else { console.error("setSmallGridLineColor更新失败:", res.msg); } }); } } ``` ###### 显示小格子(用于单独控制是否显示小格子)默认显示 * 方法名 `setShowGrid` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | | ||| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |accessToken |string| 管理员token | |msg |string| 返回消息 | * 调用示例 ```javascript setShowSmallGrid() { console.log("setShowSmallGrid进入了"); const options = { showSmallGrid: false // 传递布尔值,控制是否显示网格 }; if (this.$refs.refRealEcgView) { // 直接传递 options,而不是 [options] this.$refs.refRealEcgView.setShowSmallGrid(options, res => { console.log("回调结果: ", JSON.stringify(res)); if (res.code === "200") { console.log("setShowSmallGrid 更新成功"); } else { console.error("setShowSmallGrid 更新失败:", res.msg); } }); } } ``` ###### 定标符号颜色,默认Color.GRAY * 方法名 `setGainLineColor` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | | ||| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |accessToken |string| 管理员token | |msg |string| 返回消息 | * 调用示例 ```javascript setGainLineColor() { console.log("setGainLineColor进入了"); const options = { mGainColor: "#FFC0CB" // }; if (this.$refs.refRealEcgView) { // 直接传递 options,而不是 [options] this.$refs.refRealEcgView.setGainLineColor(options, res => { console.log("回调结果: ", JSON.stringify(res)); if (res.code === "200") { console.log("setGainLineColor更新成功"); } else { console.error("setGainLineColor更新失败:", res.msg); } }); } } ``` ###### 是否显示定标符号(默认显示) * 方法名 `setShowGain` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | | ||| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |accessToken |string| 管理员token | |msg |string| 返回消息 | * 调用示例 ```javascript setShowGain() { console.log("setShowGain进入了"); const options = { showGain: false // }; if (this.$refs.refRealEcgView) { // 直接传递 options,而不是 [options] this.$refs.refRealEcgView.setShowGain(options, res => { console.log("回调结果: ", JSON.stringify(res)); if (res.code === "200") { console.log("setShowGain更新成功"); } else { console.error("setShowGain更新失败:", res.msg); } }); } } ``` ###### 断开设备 * 方法名 `disconnectDevice` * 参数 |参数名|必填|类型|默认值|合法直|说明| |:----- |:-----|:----- |:-----|:----- |----- | | ||| | | * 返回示例 ```json {"code":"200","msg":"success"} ``` * 返回参数说明 |参数名|类型|说明| |:----- |:-----|----- |accessToken |string| 管理员token | |msg |string| 返回消息 | * 调用示例 ```javascript disconnectDevice() { console.log("disconnectDevice 进入了"); // Prepare options to send // Call the native method using the ref if (this.$refs.refRealEcgView) { // 直接传递 options,而不是 [options] this.$refs.refRealEcgView.connectTheDevice(res => { console.log("回调结果: ", JSON.stringify(res)); if (res.code === "200") { console.log("disconnectDevice 更新成功"); } else { console.error("disconnectDevice 更新失败:", res.msg); } }); } } ```