fix: 修复picker的UI bug 修复上传数据的逻辑bug
This commit is contained in:
parent
61b32567e6
commit
2e23eaadd7
@ -51,7 +51,6 @@
|
|||||||
:defaultIndex="picker"
|
:defaultIndex="picker"
|
||||||
title="选择时间"
|
title="选择时间"
|
||||||
keyName="name"
|
keyName="name"
|
||||||
:itemHeight="70"
|
|
||||||
:visibleItemCount="5"
|
:visibleItemCount="5"
|
||||||
@close="show = false"
|
@close="show = false"
|
||||||
@cancel="show = false"
|
@cancel="show = false"
|
||||||
|
|||||||
@ -68,7 +68,6 @@
|
|||||||
:show="showRecordingTime"
|
:show="showRecordingTime"
|
||||||
:columns="recordingTimeList"
|
:columns="recordingTimeList"
|
||||||
keyName="name"
|
keyName="name"
|
||||||
:itemHeight="70"
|
|
||||||
title="有人出现时录像"
|
title="有人出现时录像"
|
||||||
:visibleItemCount="5"
|
:visibleItemCount="5"
|
||||||
:defaultIndex="[recordingTimeIndex]"
|
:defaultIndex="[recordingTimeIndex]"
|
||||||
@ -80,7 +79,6 @@
|
|||||||
:show="showDetectionDistance"
|
:show="showDetectionDistance"
|
||||||
:columns="detectionDistanceList"
|
:columns="detectionDistanceList"
|
||||||
title="人体侦测距离"
|
title="人体侦测距离"
|
||||||
:itemHeight="70"
|
|
||||||
:visibleItemCount="5"
|
:visibleItemCount="5"
|
||||||
keyName="name"
|
keyName="name"
|
||||||
:defaultIndex="[detectionDistanceIndex]"
|
:defaultIndex="[detectionDistanceIndex]"
|
||||||
|
|||||||
@ -61,7 +61,6 @@
|
|||||||
:defaultIndex="[distanceIndex]"
|
:defaultIndex="[distanceIndex]"
|
||||||
title="感应距离"
|
title="感应距离"
|
||||||
keyName="name"
|
keyName="name"
|
||||||
:itemHeight="70"
|
|
||||||
:visibleItemCount="5"
|
:visibleItemCount="5"
|
||||||
@close="showDistance = false"
|
@close="showDistance = false"
|
||||||
@cancel="showDistance = false"
|
@cancel="showDistance = false"
|
||||||
@ -73,7 +72,6 @@
|
|||||||
:defaultIndex="[enErrUnlock]"
|
:defaultIndex="[enErrUnlock]"
|
||||||
title="防误开"
|
title="防误开"
|
||||||
keyName="name"
|
keyName="name"
|
||||||
:itemHeight="70"
|
|
||||||
:visibleItemCount="5"
|
:visibleItemCount="5"
|
||||||
@close="showEnErrUnlock = false"
|
@close="showEnErrUnlock = false"
|
||||||
@cancel="showEnErrUnlock = false"
|
@cancel="showEnErrUnlock = false"
|
||||||
|
|||||||
@ -61,7 +61,6 @@
|
|||||||
<up-picker
|
<up-picker
|
||||||
:show="show"
|
:show="show"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:itemHeight="70"
|
|
||||||
:visibleItemCount="5"
|
:visibleItemCount="5"
|
||||||
:defaultIndex="[value - 1]"
|
:defaultIndex="[value - 1]"
|
||||||
@close="show = false"
|
@close="show = false"
|
||||||
|
|||||||
@ -51,7 +51,6 @@
|
|||||||
uid: $user.userInfo.uid.toString(),
|
uid: $user.userInfo.uid.toString(),
|
||||||
countReq: 10
|
countReq: 10
|
||||||
})
|
})
|
||||||
console.log('code value :', code)
|
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
if (typeList[progress.value] === 'setting') {
|
if (typeList[progress.value] === 'setting') {
|
||||||
const { code: resultCode } = await lockDataUploadRequest({
|
const { code: resultCode } = await lockDataUploadRequest({
|
||||||
@ -59,7 +58,7 @@
|
|||||||
uploadType: 1,
|
uploadType: 1,
|
||||||
records: data.list
|
records: data.list
|
||||||
})
|
})
|
||||||
uni.hideLoading()
|
|
||||||
pending.value = false
|
pending.value = false
|
||||||
$bluetooth.closeBluetoothConnection()
|
$bluetooth.closeBluetoothConnection()
|
||||||
if (resultCode === 0) {
|
if (resultCode === 0) {
|
||||||
@ -77,11 +76,13 @@
|
|||||||
}
|
}
|
||||||
$bluetooth.updateCurrentLockSetting(data)
|
$bluetooth.updateCurrentLockSetting(data)
|
||||||
}
|
}
|
||||||
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '上传成功',
|
title: '上传成功',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '上传失败,请重试',
|
title: '上传失败,请重试',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@ -90,6 +91,12 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
list.value = list.value.concat(data.list)
|
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) {
|
if (data.size === 10) {
|
||||||
page.value++
|
page.value++
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -58,7 +58,6 @@
|
|||||||
title="开始时间"
|
title="开始时间"
|
||||||
mode="time"
|
mode="time"
|
||||||
:defaultIndex="startIndex"
|
:defaultIndex="startIndex"
|
||||||
:itemHeight="70"
|
|
||||||
:visibleItemCount="5"
|
:visibleItemCount="5"
|
||||||
@close="showStartTime = false"
|
@close="showStartTime = false"
|
||||||
@cancel="showStartTime = false"
|
@cancel="showStartTime = false"
|
||||||
@ -70,7 +69,6 @@
|
|||||||
title="结束时间"
|
title="结束时间"
|
||||||
mode="time"
|
mode="time"
|
||||||
:defaultIndex="endIndex"
|
:defaultIndex="endIndex"
|
||||||
:itemHeight="70"
|
|
||||||
:visibleItemCount="5"
|
:visibleItemCount="5"
|
||||||
@close="showEndTime = false"
|
@close="showEndTime = false"
|
||||||
@cancel="showEndTime = false"
|
@cancel="showEndTime = false"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user