1. bug修复

This commit is contained in:
范鹏 2025-02-22 09:44:58 +08:00
parent c895912432
commit 9846ff0cc1
33 changed files with 143 additions and 139 deletions

View File

@ -4,7 +4,7 @@
<view class="item" @click="() => $refs.modalInput.open()"> <view class="item" @click="() => $refs.modalInput.open()">
<view class="item-title">姓名</view> <view class="item-title">姓名</view>
<view class="flex items-center"> <view class="flex items-center">
<view class="item-content mr-2">{{ info.keyName }}</view> <view class="item-content mr-2 max-w-550 break-all">{{ info.keyName }}</view>
<up-icon name="arrow-right"></up-icon> <up-icon name="arrow-right"></up-icon>
</view> </view>
</view> </view>

View File

@ -39,13 +39,6 @@
onLoad(async options => { onLoad(async options => {
if (options.card) { if (options.card) {
const params = JSON.parse(options.card) const params = JSON.parse(options.card)
const { code } = await $bluetooth.registerAuthentication(params)
if (code === 0) {
text.value = '已连接到锁,请将卡靠近锁的读卡区'
} else {
$basic.backAndToast('操作失败,请重试')
}
uni.$on('registerCardConfirm', async data => { uni.$on('registerCardConfirm', async data => {
if (data.status === 0) { if (data.status === 0) {
@ -74,20 +67,11 @@
} else if (data.status === 0xff) { } else if (data.status === 0xff) {
$basic.backAndToast('添加失败,请重试') $basic.backAndToast('添加失败,请重试')
} else if (data.status === 0xfe) { } else if (data.status === 0xfe) {
uni.showToast({ $basic.backAndToast('管理员已满')
title: '管理员已满',
icon: 'none'
})
} else if (data.status === 0xfd) { } else if (data.status === 0xfd) {
uni.showToast({ $basic.backAndToast('用户已满')
title: '用户已满',
icon: 'none'
})
} else if (data.status === 0xfc) { } else if (data.status === 0xfc) {
uni.showToast({ $basic.backAndToast('卡片已满')
title: '卡片已满',
icon: 'none'
})
} else if (data.status === 0xfb) { } else if (data.status === 0xfb) {
uni.showToast({ uni.showToast({
title: '卡片已存在', title: '卡片已存在',
@ -95,6 +79,14 @@
}) })
} }
}) })
const { code } = await $bluetooth.registerAuthentication(params)
if (code === 0) {
text.value = '已连接到锁,请将卡靠近锁的读卡区'
} else if (code === -21) {
$basic.backAndToast('请先打开蓝牙')
}
} }
}) })

View File

@ -76,20 +76,11 @@
if (data.status === 0xff) { if (data.status === 0xff) {
$basic.backAndToast('添加失败,请重试') $basic.backAndToast('添加失败,请重试')
} else if (data.status === 0xfe) { } else if (data.status === 0xfe) {
uni.showToast({ $basic.backAndToast('管理员已满')
title: '管理员已满',
icon: 'none'
})
} else if (data.status === 0xfd) { } else if (data.status === 0xfd) {
uni.showToast({ $basic.backAndToast('用户已满')
title: '用户已满',
icon: 'none'
})
} else if (data.status === 0xfc) { } else if (data.status === 0xfc) {
uni.showToast({ $basic.backAndToast('人脸已满')
title: '人脸已满',
icon: 'none'
})
} else if (data.status === 0xfb) { } else if (data.status === 0xfb) {
uni.showToast({ uni.showToast({
title: '人脸已存在', title: '人脸已存在',
@ -103,13 +94,16 @@
const ready = async () => { const ready = async () => {
showProcess.value = true showProcess.value = true
const { code } = await $bluetooth.registerAuthentication(params.value) const { code } = await $bluetooth.registerAuthentication(params.value)
if (code !== 0) { if (code === 0) {
$basic.backAndToast('操作失败,请重试') /* empty */
} else if (code === -21) {
$basic.backAndToast('请先打开蓝牙')
} }
} }
onUnmounted(() => { onUnmounted(() => {
uni.$off('registerFaceConfirm') uni.$off('registerFaceConfirm')
uni.$off('registerFaceProcess')
if (!bindFlag.value) { if (!bindFlag.value) {
$bluetooth.registerAuthenticationCancel({ $bluetooth.registerAuthenticationCancel({
type: 'face', type: 'face',

View File

@ -40,16 +40,6 @@
onLoad(async options => { onLoad(async options => {
if (options.info) { if (options.info) {
const params = JSON.parse(options.info) const params = JSON.parse(options.info)
const { code, data } = await $bluetooth.registerAuthentication(params)
if (code === 0) {
text.value = '请将您的手指按下'
maxProcess.value = data.maxProcess
showProcess.value = true
} else {
$basic.backAndToast('操作失败,请重试')
}
uni.$on('registerFingerprintConfirm', async data => { uni.$on('registerFingerprintConfirm', async data => {
if (data.status === 0) { if (data.status === 0) {
bindFlag.value = true bindFlag.value = true
@ -82,20 +72,11 @@
} else if (data.status === 0xff) { } else if (data.status === 0xff) {
$basic.backAndToast('添加失败,请重试') $basic.backAndToast('添加失败,请重试')
} else if (data.status === 0xfe) { } else if (data.status === 0xfe) {
uni.showToast({ $basic.backAndToast('管理员已满')
title: '管理员已满',
icon: 'none'
})
} else if (data.status === 0xfd) { } else if (data.status === 0xfd) {
uni.showToast({ $basic.backAndToast('用户已满')
title: '用户已满',
icon: 'none'
})
} else if (data.status === 0xfc) { } else if (data.status === 0xfc) {
uni.showToast({ $basic.backAndToast('指纹已满')
title: '指纹已满',
icon: 'none'
})
} else if (data.status === 0xfb) { } else if (data.status === 0xfb) {
uni.showToast({ uni.showToast({
title: '指纹已存在', title: '指纹已存在',
@ -103,11 +84,21 @@
}) })
} }
}) })
const { code, data } = await $bluetooth.registerAuthentication(params)
if (code === 0) {
text.value = '请将您的手指按下'
maxProcess.value = data.maxProcess
showProcess.value = true
} else if (code === -21) {
$basic.backAndToast('请先打开蓝牙')
}
} }
}) })
onUnmounted(() => { onUnmounted(() => {
uni.$off('registerFingerprintConfirm') uni.$off('registerFingerprintConfirm')
uni.$off('registerFingerprintProcess')
if (!bindFlag.value) { if (!bindFlag.value) {
$bluetooth.registerAuthenticationCancel({ $bluetooth.registerAuthenticationCancel({
type: 'fingerprint', type: 'fingerprint',

View File

@ -36,13 +36,6 @@
onLoad(async options => { onLoad(async options => {
if (options.info) { if (options.info) {
const params = JSON.parse(options.info) const params = JSON.parse(options.info)
const { code } = await $bluetooth.registerAuthentication(params)
if (code === 0) {
text.value = '已连接到锁,请自然张开手掌,掌心对准摄像头'
} else {
$basic.backAndToast('操作失败,请重试')
}
uni.$on('registerPalmVeinConfirm', async data => { uni.$on('registerPalmVeinConfirm', async data => {
if (data.status === 0) { if (data.status === 0) {
@ -71,20 +64,11 @@
} else if (data.status === 0xff) { } else if (data.status === 0xff) {
$basic.backAndToast('添加失败,请重试') $basic.backAndToast('添加失败,请重试')
} else if (data.status === 0xfe) { } else if (data.status === 0xfe) {
uni.showToast({ $basic.backAndToast('管理员已满')
title: '管理员已满',
icon: 'none'
})
} else if (data.status === 0xfd) { } else if (data.status === 0xfd) {
uni.showToast({ $basic.backAndToast('用户已满')
title: '用户已满',
icon: 'none'
})
} else if (data.status === 0xfc) { } else if (data.status === 0xfc) {
uni.showToast({ $basic.backAndToast('掌静脉已满')
title: '掌静脉已满',
icon: 'none'
})
} else if (data.status === 0xfb) { } else if (data.status === 0xfb) {
uni.showToast({ uni.showToast({
title: '掌静脉已存在', title: '掌静脉已存在',
@ -92,6 +76,14 @@
}) })
} }
}) })
const { code } = await $bluetooth.registerAuthentication(params)
if (code === 0) {
text.value = '已连接到锁,请自然张开手掌,掌心对准摄像头'
} else if (code === -21) {
$basic.backAndToast('请先打开蓝牙')
}
} }
}) })

View File

@ -39,13 +39,6 @@
onLoad(async options => { onLoad(async options => {
if (options.info) { if (options.info) {
const params = JSON.parse(options.info) const params = JSON.parse(options.info)
const { code } = await $bluetooth.registerAuthentication(params)
if (code === 0) {
text.value = '已连接到锁,请按遥控'
} else {
$basic.backAndToast('操作失败,请重试')
}
uni.$on('registerRemoteConfirm', async data => { uni.$on('registerRemoteConfirm', async data => {
if (data.status === 0) { if (data.status === 0) {
@ -74,20 +67,11 @@
} else if (data.status === 0xff) { } else if (data.status === 0xff) {
$basic.backAndToast('添加失败,请重试') $basic.backAndToast('添加失败,请重试')
} else if (data.status === 0xfe) { } else if (data.status === 0xfe) {
uni.showToast({ $basic.backAndToast('管理员已满')
title: '管理员已满',
icon: 'none'
})
} else if (data.status === 0xfd) { } else if (data.status === 0xfd) {
uni.showToast({ $basic.backAndToast('用户已满')
title: '用户已满',
icon: 'none'
})
} else if (data.status === 0xfc) { } else if (data.status === 0xfc) {
uni.showToast({ $basic.backAndToast('遥控已满')
title: '遥控已满',
icon: 'none'
})
} else if (data.status === 0xfb) { } else if (data.status === 0xfb) {
uni.showToast({ uni.showToast({
title: '遥控已存在', title: '遥控已存在',
@ -95,6 +79,14 @@
}) })
} }
}) })
const { code } = await $bluetooth.registerAuthentication(params)
if (code === 0) {
text.value = '已连接到锁,请按遥控'
} else if (code === -21) {
$basic.backAndToast('请先打开蓝牙')
}
} }
}) })

View File

@ -8,7 +8,7 @@
<view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()"> <view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()">
<view class="item-title">姓名</view> <view class="item-title">姓名</view>
<view class="flex items-center"> <view class="flex items-center">
<view class="item-content mr-2">{{ info.cardName }}</view> <view class="item-content mr-2 max-w-550 break-all">{{ info.cardName }}</view>
<up-icon name="arrow-right"></up-icon> <up-icon name="arrow-right"></up-icon>
</view> </view>
</view> </view>

View File

@ -291,7 +291,7 @@
} }
if (data.list[i].cardType === 1) { if (data.list[i].cardType === 1) {
data.list[i].timeText = timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') + ' 永久' data.list[i].timeText = timeFormat(data.list[i].createDate, 'yyyy-mm-dd hh:MM') + ' 永久'
} else if (data.list[i].cardType === 2) { } else if (data.list[i].cardType === 2) {
data.list[i].timeText = data.list[i].timeText =
timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') + timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') +

View File

@ -43,6 +43,9 @@
@change="changeAdmin('permanent', $event)" @change="changeAdmin('permanent', $event)"
></LockSwitch> ></LockSwitch>
</view> </view>
<view class="text-sm text-#262626 mt-3 mx-4">
授权管理员拥有操作这把锁的重要权限请确保只发给你信任的人
</view>
<view class="button mt-5" @click="create('permanent')">发送</view> <view class="button mt-5" @click="create('permanent')">发送</view>
</swiper-item> </swiper-item>
<swiper-item :style="{ height: deviceInfo.windowHeight - 44 + 'px' }"> <swiper-item :style="{ height: deviceInfo.windowHeight - 44 + 'px' }">
@ -84,6 +87,9 @@
@change="changeAdmin('temporary', $event)" @change="changeAdmin('temporary', $event)"
></LockSwitch> ></LockSwitch>
</view> </view>
<view class="text-sm text-#262626 mt-3 mx-4">
授权管理员拥有操作这把锁的重要权限请确保只发给你信任的人
</view>
<view class="button mt-5" @click="create('temporary')">发送</view> <view class="button mt-5" @click="create('temporary')">发送</view>
</swiper-item> </swiper-item>
</swiper> </swiper>

View File

@ -8,7 +8,7 @@
<view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()"> <view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()">
<view class="item-title">姓名</view> <view class="item-title">姓名</view>
<view class="flex items-center"> <view class="flex items-center">
<view class="item-content mr-2">{{ info.faceName }}</view> <view class="item-content mr-2 max-w-550 break-all">{{ info.faceName }}</view>
<up-icon name="arrow-right"></up-icon> <up-icon name="arrow-right"></up-icon>
</view> </view>
</view> </view>

View File

@ -292,7 +292,7 @@
} }
if (data.list[i].faceType === 1) { if (data.list[i].faceType === 1) {
data.list[i].timeText = timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') + ' 永久' data.list[i].timeText = timeFormat(data.list[i].createDate, 'yyyy-mm-dd hh:MM') + ' 永久'
} else if (data.list[i].faceType === 2) { } else if (data.list[i].faceType === 2) {
data.list[i].timeText = data.list[i].timeText =
timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') + timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') +

View File

@ -8,7 +8,7 @@
<view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()"> <view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()">
<view class="item-title">姓名</view> <view class="item-title">姓名</view>
<view class="flex items-center"> <view class="flex items-center">
<view class="item-content mr-2">{{ info.fingerprintName }}</view> <view class="item-content mr-2 max-w-550 break-all">{{ info.fingerprintName }}</view>
<up-icon name="arrow-right"></up-icon> <up-icon name="arrow-right"></up-icon>
</view> </view>
</view> </view>

View File

@ -291,7 +291,7 @@
} }
if (data.list[i].fingerprintType === 1) { if (data.list[i].fingerprintType === 1) {
data.list[i].timeText = timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') + ' 永久' data.list[i].timeText = timeFormat(data.list[i].createDate, 'yyyy-mm-dd hh:MM') + ' 永久'
} else if (data.list[i].fingerprintType === 2) { } else if (data.list[i].fingerprintType === 2) {
data.list[i].timeText = data.list[i].timeText =
timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') + timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') +

View File

@ -3,7 +3,9 @@
<view class="item" @click="() => $refs.modalInput.open()"> <view class="item" @click="() => $refs.modalInput.open()">
<view class="item-title" style="width: 350rpx">姓名</view> <view class="item-title" style="width: 350rpx">姓名</view>
<view class="flex items-center"> <view class="flex items-center">
<view class="item-content mr-2">{{ $lock.currentKeyInfo.keyName }}</view> <view class="item-content mr-2 max-w-550 break-all">{{
$lock.currentKeyInfo.keyName
}}</view>
<up-icon name="arrow-right"></up-icon> <up-icon name="arrow-right"></up-icon>
</view> </view>
</view> </view>
@ -97,7 +99,11 @@
>{{ $lock.currentKeyInfo.keyStatus === 110405 ? '解冻' : '冻结' }}</view >{{ $lock.currentKeyInfo.keyStatus === 110405 ? '解冻' : '冻结' }}</view
> >
<view <view
v-if="$lock.currentKeyInfo.keyType !== 3 && $lock.currentKeyInfo.keyType !== 4" v-if="
$bluetooth.currentLockInfo.userType === 110301 &&
$lock.currentKeyInfo.keyType !== 3 &&
$lock.currentKeyInfo.keyType !== 4
"
:class="[$lock.currentKeyInfo.keyRight === 1 ? 'text-red' : 'text-#63b8af']" :class="[$lock.currentKeyInfo.keyRight === 1 ? 'text-red' : 'text-#63b8af']"
@click="authorize" @click="authorize"
>{{ $lock.currentKeyInfo.keyRight === 1 ? '取消授权管理员' : '授权管理员' }}</view >{{ $lock.currentKeyInfo.keyRight === 1 ? '取消授权管理员' : '授权管理员' }}</view

View File

@ -57,7 +57,7 @@
class="menu-main-view" class="menu-main-view"
@click="routeJump({ name: 'keyList' })" @click="routeJump({ name: 'keyList' })"
> >
<image class="menu-main-image" src="/static/images/tabbar_key_select.png"></image> <image class="menu-main-image" src="/static/images/icon_key.png"></image>
<view>电子钥匙</view> <view>电子钥匙</view>
</view> </view>
<view <view
@ -65,7 +65,7 @@
class="menu-main-view" class="menu-main-view"
@click="routeJump({ name: 'passwordList' })" @click="routeJump({ name: 'passwordList' })"
> >
<image class="menu-main-image" src="/static/images/icon_lock_transparent.png"></image> <image class="menu-main-image" src="/static/images/icon_password_green.png"></image>
<view>密码</view> <view>密码</view>
</view> </view>
<view <view
@ -99,10 +99,7 @@
class="menu-main-view" class="menu-main-view"
@click="routeJump({ name: 'faceList' })" @click="routeJump({ name: 'faceList' })"
> >
<image <image class="menu-main-image" src="/static/images/icon_face.png"></image>
class="menu-main-image transform-scale-125"
src="/static/images/icon_face.png"
></image>
<view>人脸</view> <view>人脸</view>
</view> </view>
<view <view
@ -322,6 +319,11 @@
this.backAndToast('单次钥匙已在被使用后删除', 1) this.backAndToast('单次钥匙已在被使用后删除', 1)
} }
} }
} else if (code === 7) {
uni.showToast({
title: `钥匙过期`,
icon: 'none'
})
} else if (code === 13) { } else if (code === 13) {
uni.showToast({ uni.showToast({
title: `钥匙当前不可用`, title: `钥匙当前不可用`,
@ -523,10 +525,9 @@
margin-bottom: 48rpx; margin-bottom: 48rpx;
.menu-main-image { .menu-main-image {
filter: sepia(100%) saturate(10000%) hue-rotate(180deg) brightness(0.1);
margin-bottom: 10rpx; margin-bottom: 10rpx;
width: 40rpx; width: 60rpx;
height: 40rpx; height: 60rpx;
} }
} }
} }

View File

@ -8,7 +8,7 @@
<view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()"> <view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()">
<view class="item-title">姓名</view> <view class="item-title">姓名</view>
<view class="flex items-center"> <view class="flex items-center">
<view class="item-content mr-2">{{ info.palmVeinName }}</view> <view class="item-content mr-2 max-w-550 break-all">{{ info.palmVeinName }}</view>
<up-icon name="arrow-right"></up-icon> <up-icon name="arrow-right"></up-icon>
</view> </view>
</view> </view>

View File

@ -296,7 +296,7 @@
} }
if (data.list[i].palmVeinType === 1) { if (data.list[i].palmVeinType === 1) {
data.list[i].timeText = timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') + ' 永久' data.list[i].timeText = timeFormat(data.list[i].createDate, 'yyyy-mm-dd hh:MM') + ' 永久'
} else if (data.list[i].palmVeinType === 2) { } else if (data.list[i].palmVeinType === 2) {
data.list[i].timeText = data.list[i].timeText =
timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') + timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') +

View File

@ -18,7 +18,9 @@
<view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()"> <view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()">
<view class="item-title">姓名</view> <view class="item-title">姓名</view>
<view class="flex items-center"> <view class="flex items-center">
<view class="item-content mr-2">{{ $lock.currentPasswordInfo.keyboardPwdName }}</view> <view class="item-content mr-2 max-w-550 break-all">{{
$lock.currentPasswordInfo.keyboardPwdName
}}</view>
<up-icon name="arrow-right"></up-icon> <up-icon name="arrow-right"></up-icon>
</view> </view>
</view> </view>

View File

@ -2,7 +2,7 @@
<view> <view>
<view class="flex items-center h-[60px] mx-3 font-bold"> <view class="flex items-center h-[60px] mx-3 font-bold">
<view>日期</view> <view>日期</view>
<view class="bg-[rgba(0,0,0,0.5)] rounded-full px-2 py-1.5 mr-5"> <view class="bg-[rgba(0,0,0,0.35)] rounded-full px-2 py-1.5 mr-5">
<picker :value="timeText" mode="date" @change="changeDate"> <picker :value="timeText" mode="date" @change="changeDate">
<up-icon <up-icon
:label="timeText" :label="timeText"
@ -16,7 +16,7 @@
</picker> </picker>
</view> </view>
<view>事件</view> <view>事件</view>
<view class="bg-[rgba(0,0,0,0.5)] rounded-full px-2 py-1.5 mr-1"> <view class="bg-[rgba(0,0,0,0.35)] rounded-full px-2 py-1.5 mr-1">
<picker <picker
:value="index" :value="index"
mode="selector" mode="selector"
@ -35,6 +35,14 @@
></up-icon> ></up-icon>
</picker> </picker>
</view> </view>
<view class="ml-a">
<up-icon
name="question-circle-fill"
@click="tip"
size="52"
color="rgba(0,0,0,0.35)"
></up-icon>
</view>
</view> </view>
<scroll-view <scroll-view
v-if="deviceInfo" v-if="deviceInfo"
@ -149,6 +157,15 @@
videoContext.requestFullScreen({ direction: 0 }) videoContext.requestFullScreen({ direction: 0 })
} }
const tip = () => {
uni.showModal({
title: '操作记录未显示',
content: '锁未联网,开门记录无法实时上传,可以点击同步记录进行读取',
showCancel: false,
confirmText: '我知道了'
})
}
const previewImage = url => { const previewImage = url => {
uni.previewImage({ uni.previewImage({
urls: [url] urls: [url]
@ -316,6 +333,10 @@
} }
const syncRecord = async () => { const syncRecord = async () => {
const netWork = await $basic.getNetworkType()
if (!netWork) {
return
}
uni.showLoading({ uni.showLoading({
title: '同步中' title: '同步中'
}) })

View File

@ -8,7 +8,7 @@
<view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()"> <view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()">
<view class="item-title">姓名</view> <view class="item-title">姓名</view>
<view class="flex items-center"> <view class="flex items-center">
<view class="item-content mr-2">{{ info.remoteName }}</view> <view class="item-content mr-2 max-w-550 break-all">{{ info.remoteName }}</view>
<up-icon name="arrow-right"></up-icon> <up-icon name="arrow-right"></up-icon>
</view> </view>
</view> </view>

View File

@ -294,7 +294,7 @@
} }
if (data.list[i].remoteType === 1) { if (data.list[i].remoteType === 1) {
data.list[i].timeText = timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') + ' 永久' data.list[i].timeText = timeFormat(data.list[i].createDate, 'yyyy-mm-dd hh:MM') + ' 永久'
} else if (data.list[i].remoteType === 2) { } else if (data.list[i].remoteType === 2) {
data.list[i].timeText = data.list[i].timeText =
timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') + timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') +

View File

@ -1,5 +1,8 @@
<template> <template>
<view> <view>
<view class="bg-#faecc9 text-#bc9839 text-24rpx text-center h-40px line-height-40px"
>锁未联网开门记录无法实时上传可以点击同步记录进行读取
</view>
<scroll-view <scroll-view
v-if="deviceInfo" v-if="deviceInfo"
scroll-y="true" scroll-y="true"
@ -159,6 +162,10 @@
} }
const syncRecord = async () => { const syncRecord = async () => {
const netWork = await $basic.getNetworkType()
if (!netWork) {
return
}
uni.showLoading({ uni.showLoading({
title: '同步中' title: '同步中'
}) })

Binary file not shown.

Before

Width:  |  Height:  |  Size: 758 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 909 B

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 460 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
static/images/icon_key.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -2404,7 +2404,7 @@ export const useBluetoothStore = defineStore('ble', {
console.log('写入未执行', this.bluetoothStatus) console.log('写入未执行', this.bluetoothStatus)
this.getBluetoothStatus() this.getBluetoothStatus()
return { return {
code: -1 code: -21
} }
} }
@ -2592,26 +2592,6 @@ export const useBluetoothStore = defineStore('ble', {
}, },
// 获取操作记录 // 获取操作记录
async syncRecord(params) { async syncRecord(params) {
const { uid, keyId } = params
const { code, data, message } = await this.syncSingleRecord({
uid,
keyId
})
if (code === 0) {
if (data?.count === 10) {
return await this.syncSingleRecord({
uid,
keyId
})
}
return { code, data, message }
}
return { code, data, message }
},
// 获取单次操作记录
async syncSingleRecord(data) {
// 确认蓝牙状态正常 // 确认蓝牙状态正常
if (this.bluetoothStatus !== 0) { if (this.bluetoothStatus !== 0) {
console.log('写入未执行', this.bluetoothStatus) console.log('写入未执行', this.bluetoothStatus)
@ -2649,6 +2629,26 @@ export const useBluetoothStore = defineStore('ble', {
} }
} }
const { uid, keyId } = params
const { code, data, message } = await this.syncSingleRecord({
uid,
keyId
})
if (code === 0) {
if (data?.count === 10) {
return await this.syncSingleRecord({
uid,
keyId
})
}
return { code, data, message }
}
return { code, data, message }
},
// 获取单次操作记录
async syncSingleRecord(data) {
const { keyId, uid } = data const { keyId, uid } = data
const logsCount = 10 const logsCount = 10