feat: 数据补传改为整包上传,帮助中心补空状态
- equipment 数据补传一次上传整个列表(list 参数),注释掉 memberId - helpCenter 问题列表补空数据展示 - userManagement 删除成员接口 v2 调整为 v6 - my 页面按钮字体加粗 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
c4bde77fd1
commit
548c26cad5
@@ -294,9 +294,7 @@ 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) => {
|
|
||||||
const payload: Record<string, any> = {
|
|
||||||
sn,
|
sn,
|
||||||
type,
|
type,
|
||||||
mac,
|
mac,
|
||||||
@@ -306,7 +304,7 @@ Page({
|
|||||||
weight: (data.weight ?? 0) / 100,
|
weight: (data.weight ?? 0) / 100,
|
||||||
heartRate: data.heartRate ?? 0,
|
heartRate: data.heartRate ?? 0,
|
||||||
impedance: data.impedance ?? 0,
|
impedance: data.impedance ?? 0,
|
||||||
memberId: data.memberId ?? '',
|
// memberId: data.memberId ?? '',
|
||||||
isEnd: data.isEnd ?? false,
|
isEnd: data.isEnd ?? false,
|
||||||
z20KhzLeftArmEnCode: data.z20KhzLeftArmEnCode ?? 0,
|
z20KhzLeftArmEnCode: data.z20KhzLeftArmEnCode ?? 0,
|
||||||
z20KhzRightArmEnCode: data.z20KhzRightArmEnCode ?? 0,
|
z20KhzRightArmEnCode: data.z20KhzRightArmEnCode ?? 0,
|
||||||
@@ -318,18 +316,16 @@ Page({
|
|||||||
z100KhzLeftLegEnCode: data.z100KhzLeftLegEnCode ?? 0,
|
z100KhzLeftLegEnCode: data.z100KhzLeftLegEnCode ?? 0,
|
||||||
z100KhzRightLegEnCode: data.z100KhzRightLegEnCode ?? 0,
|
z100KhzRightLegEnCode: data.z100KhzRightLegEnCode ?? 0,
|
||||||
z100KhzTrunkEnCode: data.z100KhzTrunkEnCode ?? 0,
|
z100KhzTrunkEnCode: data.z100KhzTrunkEnCode ?? 0,
|
||||||
}
|
}))
|
||||||
uploadHistoryData(payload)
|
|
||||||
|
uploadHistoryData({ list })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
console.log('[数据补传] 上传成功:', payload)
|
console.log('[数据补传] 上传成功')
|
||||||
|
done?.()
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
console.error('[数据补传] 上传失败:', payload)
|
console.error('[数据补传] 上传失败')
|
||||||
})
|
done?.()
|
||||||
.finally(() => {
|
|
||||||
remain--
|
|
||||||
if (remain === 0) done?.()
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="list">
|
<view class="list">
|
||||||
|
<block wx:if="{{ questions && questions.length }}">
|
||||||
<scroll-view class="scrollView" scroll-y>
|
<scroll-view class="scrollView" scroll-y>
|
||||||
<block wx:for="{{ questions }}" wx:key="id">
|
<block wx:for="{{ questions }}" wx:key="id">
|
||||||
<view class="question" bind:tap="onTapQuestion" data-id="{{ item.id }}">
|
<view class="question" bind:tap="onTapQuestion" data-id="{{ item.id }}">
|
||||||
@@ -22,5 +23,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
</block>
|
||||||
|
<block wx:else>
|
||||||
|
<empty-data containerStyle="margin: 100rpx 0 200rpx;" />
|
||||||
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user