fix: 修复picker的UI bug 修复上传数据的逻辑bug

This commit is contained in:
fanpeng 2025-07-08 10:24:49 +08:00
parent 61b32567e6
commit 2e23eaadd7
6 changed files with 9 additions and 10 deletions

View File

@ -51,7 +51,6 @@
:defaultIndex="picker"
title="选择时间"
keyName="name"
:itemHeight="70"
:visibleItemCount="5"
@close="show = false"
@cancel="show = false"

View File

@ -68,7 +68,6 @@
:show="showRecordingTime"
:columns="recordingTimeList"
keyName="name"
:itemHeight="70"
title="有人出现时录像"
:visibleItemCount="5"
:defaultIndex="[recordingTimeIndex]"
@ -80,7 +79,6 @@
:show="showDetectionDistance"
:columns="detectionDistanceList"
title="人体侦测距离"
:itemHeight="70"
:visibleItemCount="5"
keyName="name"
:defaultIndex="[detectionDistanceIndex]"

View File

@ -61,7 +61,6 @@
:defaultIndex="[distanceIndex]"
title="感应距离"
keyName="name"
:itemHeight="70"
:visibleItemCount="5"
@close="showDistance = false"
@cancel="showDistance = false"
@ -73,7 +72,6 @@
:defaultIndex="[enErrUnlock]"
title="防误开"
keyName="name"
:itemHeight="70"
:visibleItemCount="5"
@close="showEnErrUnlock = false"
@cancel="showEnErrUnlock = false"

View File

@ -61,7 +61,6 @@
<up-picker
:show="show"
:columns="columns"
:itemHeight="70"
:visibleItemCount="5"
:defaultIndex="[value - 1]"
@close="show = false"

View File

@ -51,7 +51,6 @@
uid: $user.userInfo.uid.toString(),
countReq: 10
})
console.log('code value :', code)
if (code === 0) {
if (typeList[progress.value] === 'setting') {
const { code: resultCode } = await lockDataUploadRequest({
@ -59,7 +58,7 @@
uploadType: 1,
records: data.list
})
uni.hideLoading()
pending.value = false
$bluetooth.closeBluetoothConnection()
if (resultCode === 0) {
@ -77,11 +76,13 @@
}
$bluetooth.updateCurrentLockSetting(data)
}
uni.hideLoading()
uni.showToast({
title: '上传成功',
icon: 'none'
})
} else {
uni.hideLoading()
uni.showToast({
title: '上传失败,请重试',
icon: 'none'
@ -90,6 +91,12 @@
return
}
list.value = list.value.concat(data.list)
if (list.value.length === 0) {
page.value = 0
list.value = []
progress.value++
return await asyncData(true)
}
if (data.size === 10) {
page.value++
} else {

View File

@ -58,7 +58,6 @@
title="开始时间"
mode="time"
:defaultIndex="startIndex"
:itemHeight="70"
:visibleItemCount="5"
@close="showStartTime = false"
@cancel="showStartTime = false"
@ -70,7 +69,6 @@
title="结束时间"
mode="time"
:defaultIndex="endIndex"
:itemHeight="70"
:visibleItemCount="5"
@close="showEndTime = false"
@cancel="showEndTime = false"