feat(equipment): 数据补传读取并上传历史数据
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
d59aad4f44
commit
3dea0382f7
@@ -457,6 +457,18 @@ class LeFuService {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取设备端指定用户的历史测量数据(数据补传)
|
||||
* 请求该用户的历史记录,结果通过回调返回
|
||||
*/
|
||||
fetchHistoryData(userId: string, cb?: (list: any[]) => void): void {
|
||||
if (!this._activeProtocol) return
|
||||
this._activeProtocol.dataFetchHistoryData({ userID: userId }, (res: any) => {
|
||||
console.log(TAG, 'dataFetchHistoryData:', res)
|
||||
cb?.(res ?? [])
|
||||
})
|
||||
}
|
||||
|
||||
// ─── 私有:保活与重连 ───────────────────────
|
||||
/** 启动保活心跳:文档建议每 10s 发送一次 keepAlive,防止设备主动断开 */
|
||||
private _startKeepAlive(): void {
|
||||
|
||||
Reference in New Issue
Block a user