[AI Generated]: feat(*): 对接v3设备列表及成员管理接口,补全字段并接入蓝牙连接状态
This commit is contained in:
@@ -30,6 +30,8 @@ interface DeviceRecord {
|
||||
remark: string | null
|
||||
relationType: string | null
|
||||
sex_dictText: string
|
||||
/** 设备连接信息 JSON 字符串,与登录接口返回格式一致 */
|
||||
connectDeviceInfo: string
|
||||
}
|
||||
|
||||
/** 展示用设备项 */
|
||||
@@ -76,11 +78,11 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
/* 点击「成员管理」→ 跳转成员管理页 */
|
||||
/* 点击「成员管理」→ 跳转成员管理页,传 SN;userId 由目标页从缓存读取 */
|
||||
onTapMember(e: WechatMiniprogram.TouchEvent) {
|
||||
const id = e.currentTarget.dataset.id as string
|
||||
const sn = e.currentTarget.dataset.sn as string
|
||||
wx.navigateTo({
|
||||
url: `/pages/equipmentMember/equipmentMember?id=${id}`
|
||||
url: `/pages/equipmentMember/equipmentMember?sn=${sn}`
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
@@ -36,14 +36,14 @@
|
||||
<block wx:if="{{ item.connected }}">
|
||||
<!-- 已连接:单按钮居中 -->
|
||||
<view class="card-actions card-actions-single">
|
||||
<view class="btn-ghost-full" data-id="{{ item.id }}" bind:tap="onTapMember">成员管理</view>
|
||||
<view class="btn-ghost-full" data-sn="{{ item.scaleDeviceId }}" bind:tap="onTapMember">成员管理</view>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<!-- 未连接:双按钮 连接 / 成员管理 -->
|
||||
<view class="card-actions card-actions-double">
|
||||
<view class="btn-ghost-half" data-id="{{ item.id }}" bind:tap="onTapConnect">连接</view>
|
||||
<view class="btn-ghost-half" data-id="{{ item.id }}" bind:tap="onTapMember">成员管理</view>
|
||||
<view class="btn-ghost-half" data-sn="{{ item.scaleDeviceId }}" bind:tap="onTapMember">成员管理</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user