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
+33 -37
View File
@@ -294,43 +294,39 @@ Page({
const mac = formatMac(sn) const mac = formatMac(sn)
const bat = deviceInfo?.devicePower != null ? String(deviceInfo.devicePower / 100) : '' const bat = deviceInfo?.devicePower != null ? String(deviceInfo.devicePower / 100) : ''
let remain = dataList.length const list = dataList.map((data) => ({
dataList.forEach((data) => { sn,
const payload: Record<string, any> = { type,
sn, mac,
type, bat,
mac, userid: data.memberId || mainUserId,
bat, dateStr: data.dateStr ?? '',
userid: data.memberId || mainUserId, weight: (data.weight ?? 0) / 100,
dateStr: data.dateStr ?? '', heartRate: data.heartRate ?? 0,
weight: (data.weight ?? 0) / 100, impedance: data.impedance ?? 0,
heartRate: data.heartRate ?? 0, // memberId: data.memberId ?? '',
impedance: data.impedance ?? 0, isEnd: data.isEnd ?? false,
memberId: data.memberId ?? '', z20KhzLeftArmEnCode: data.z20KhzLeftArmEnCode ?? 0,
isEnd: data.isEnd ?? false, z20KhzRightArmEnCode: data.z20KhzRightArmEnCode ?? 0,
z20KhzLeftArmEnCode: data.z20KhzLeftArmEnCode ?? 0, z20KhzLeftLegEnCode: data.z20KhzLeftLegEnCode ?? 0,
z20KhzRightArmEnCode: data.z20KhzRightArmEnCode ?? 0, z20KhzRightLegEnCode: data.z20KhzRightLegEnCode ?? 0,
z20KhzLeftLegEnCode: data.z20KhzLeftLegEnCode ?? 0, z20KhzTrunkEnCode: data.z20KhzTrunkEnCode ?? 0,
z20KhzRightLegEnCode: data.z20KhzRightLegEnCode ?? 0, z100KhzLeftArmEnCode: data.z100KhzLeftArmEnCode ?? 0,
z20KhzTrunkEnCode: data.z20KhzTrunkEnCode ?? 0, z100KhzRightArmEnCode: data.z100KhzRightArmEnCode ?? 0,
z100KhzLeftArmEnCode: data.z100KhzLeftArmEnCode ?? 0, z100KhzLeftLegEnCode: data.z100KhzLeftLegEnCode ?? 0,
z100KhzRightArmEnCode: data.z100KhzRightArmEnCode ?? 0, z100KhzRightLegEnCode: data.z100KhzRightLegEnCode ?? 0,
z100KhzLeftLegEnCode: data.z100KhzLeftLegEnCode ?? 0, z100KhzTrunkEnCode: data.z100KhzTrunkEnCode ?? 0,
z100KhzRightLegEnCode: data.z100KhzRightLegEnCode ?? 0, }))
z100KhzTrunkEnCode: data.z100KhzTrunkEnCode ?? 0,
} uploadHistoryData({ list })
uploadHistoryData(payload) .then(() => {
.then(() => { console.log('[数据补传] 上传成功')
console.log('[数据补传] 上传成功:', payload) done?.()
}) })
.catch(() => { .catch(() => {
console.error('[数据补传] 上传失败:', payload) console.error('[数据补传] 上传失败')
}) done?.()
.finally(() => { })
remain--
if (remain === 0) done?.()
})
})
}, },
onTapAdd() { onTapAdd() {
+14 -9
View File
@@ -13,14 +13,19 @@
</view> </view>
<view class="list"> <view class="list">
<scroll-view class="scrollView" scroll-y> <block wx:if="{{ questions && questions.length }}">
<block wx:for="{{ questions }}" wx:key="id"> <scroll-view class="scrollView" scroll-y>
<view class="question" bind:tap="onTapQuestion" data-id="{{ item.id }}"> <block wx:for="{{ questions }}" wx:key="id">
<view class="dot"></view> <view class="question" bind:tap="onTapQuestion" data-id="{{ item.id }}">
<view class="question-title">{{ item.title }}</view> <view class="dot"></view>
<view class="arrow"></view> <view class="question-title">{{ item.title }}</view>
</view> <view class="arrow"></view>
</block> </view>
</scroll-view> </block>
</scroll-view>
</block>
<block wx:else>
<empty-data containerStyle="margin: 100rpx 0 200rpx;" />
</block>
</view> </view>
</view> </view>
+1
View File
@@ -113,6 +113,7 @@
width: 100%; width: 100%;
height: 110rpx; height: 110rpx;
font-size: 32rpx; font-size: 32rpx;
font-weight: bolder;
text-align: center; text-align: center;
line-height: 110rpx; line-height: 110rpx;
border-radius: 24rpx; border-radius: 24rpx;
@@ -67,7 +67,7 @@ const markSynced = (data: { sn: string; list: string[] }) =>
/** 删除设备成员 */ /** 删除设备成员 */
const deleteMember = (id: string) => const deleteMember = (id: string) =>
del('weighingScale/v2/del/user', { id }, { loading: false }) del('weighingScale/v6/del/user', { id }, { loading: false })
/** equipment 页传入的目标设备 */ /** equipment 页传入的目标设备 */
let targetDevice: { sn: string; deviceId: string; name: string; connected: boolean; connectDeviceInfo: string } | null = null let targetDevice: { sn: string; deviceId: string; name: string; connected: boolean; connectDeviceInfo: string } | null = null