feat: 数据补传改为整包上传,帮助中心补空状态

- equipment 数据补传一次上传整个列表(list 参数),注释掉 memberId
- helpCenter 问题列表补空数据展示
- userManagement 删除成员接口 v2 调整为 v6
- my 页面按钮字体加粗

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
17792275749
2026-08-26 09:07:35 +08:00
co-authored by Claude Opus 4.7
parent c4bde77fd1
commit 548c26cad5
4 changed files with 49 additions and 47 deletions
+9 -13
View File
@@ -294,9 +294,7 @@ Page({
const mac = formatMac(sn)
const bat = deviceInfo?.devicePower != null ? String(deviceInfo.devicePower / 100) : ''
let remain = dataList.length
dataList.forEach((data) => {
const payload: Record<string, any> = {
const list = dataList.map((data) => ({
sn,
type,
mac,
@@ -306,7 +304,7 @@ Page({
weight: (data.weight ?? 0) / 100,
heartRate: data.heartRate ?? 0,
impedance: data.impedance ?? 0,
memberId: data.memberId ?? '',
// memberId: data.memberId ?? '',
isEnd: data.isEnd ?? false,
z20KhzLeftArmEnCode: data.z20KhzLeftArmEnCode ?? 0,
z20KhzRightArmEnCode: data.z20KhzRightArmEnCode ?? 0,
@@ -318,18 +316,16 @@ Page({
z100KhzLeftLegEnCode: data.z100KhzLeftLegEnCode ?? 0,
z100KhzRightLegEnCode: data.z100KhzRightLegEnCode ?? 0,
z100KhzTrunkEnCode: data.z100KhzTrunkEnCode ?? 0,
}
uploadHistoryData(payload)
}))
uploadHistoryData({ list })
.then(() => {
console.log('[数据补传] 上传成功:', payload)
console.log('[数据补传] 上传成功')
done?.()
})
.catch(() => {
console.error('[数据补传] 上传失败:', payload)
})
.finally(() => {
remain--
if (remain === 0) done?.()
})
console.error('[数据补传] 上传失败')
done?.()
})
},
@@ -13,6 +13,7 @@
</view>
<view class="list">
<block wx:if="{{ questions && questions.length }}">
<scroll-view class="scrollView" scroll-y>
<block wx:for="{{ questions }}" wx:key="id">
<view class="question" bind:tap="onTapQuestion" data-id="{{ item.id }}">
@@ -22,5 +23,9 @@
</view>
</block>
</scroll-view>
</block>
<block wx:else>
<empty-data containerStyle="margin: 100rpx 0 200rpx;" />
</block>
</view>
</view>
+1
View File
@@ -113,6 +113,7 @@
width: 100%;
height: 110rpx;
font-size: 32rpx;
font-weight: bolder;
text-align: center;
line-height: 110rpx;
border-radius: 24rpx;
@@ -67,7 +67,7 @@ const markSynced = (data: { sn: string; list: string[] }) =>
/** 删除设备成员 */
const deleteMember = (id: string) =>
del('weighingScale/v2/del/user', { id }, { loading: false })
del('weighingScale/v6/del/user', { id }, { loading: false })
/** equipment 页传入的目标设备 */
let targetDevice: { sn: string; deviceId: string; name: string; connected: boolean; connectDeviceInfo: string } | null = null