[AI Generated]: feat(*): 对接登录token存储、设备列表自动连接及成员管理蓝牙状态实时同步
This commit is contained in:
@@ -171,7 +171,14 @@ Page({
|
||||
|
||||
wx.showLoading({ title: '连接中...', mask: true })
|
||||
lefuService.connect(raw)
|
||||
lefuService.onConnectState((state) => {
|
||||
if (state === lefuService.BLUE_STATE.CONNECTFAILED) {
|
||||
wx.hideLoading()
|
||||
wx.showToast({ title: '连接失败,请重试', icon: 'none' })
|
||||
}
|
||||
})
|
||||
lefuService.onDeviceConnect(() => {
|
||||
wx.setStorageSync('connectDeviceInfo', { ...raw.raw, scaleDeviceName: raw.raw.name })
|
||||
const list = this.data.deviceList.map((item, i) => ({
|
||||
...item,
|
||||
connected: i === index,
|
||||
|
||||
Reference in New Issue
Block a user