1. bug修复
@ -4,7 +4,7 @@
|
||||
<view class="item" @click="() => $refs.modalInput.open()">
|
||||
<view class="item-title">姓名</view>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -39,13 +39,6 @@
|
||||
onLoad(async options => {
|
||||
if (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 => {
|
||||
if (data.status === 0) {
|
||||
@ -74,20 +67,11 @@
|
||||
} else if (data.status === 0xff) {
|
||||
$basic.backAndToast('添加失败,请重试')
|
||||
} else if (data.status === 0xfe) {
|
||||
uni.showToast({
|
||||
title: '管理员已满',
|
||||
icon: 'none'
|
||||
})
|
||||
$basic.backAndToast('管理员已满')
|
||||
} else if (data.status === 0xfd) {
|
||||
uni.showToast({
|
||||
title: '用户已满',
|
||||
icon: 'none'
|
||||
})
|
||||
$basic.backAndToast('用户已满')
|
||||
} else if (data.status === 0xfc) {
|
||||
uni.showToast({
|
||||
title: '卡片已满',
|
||||
icon: 'none'
|
||||
})
|
||||
$basic.backAndToast('卡片已满')
|
||||
} else if (data.status === 0xfb) {
|
||||
uni.showToast({
|
||||
title: '卡片已存在',
|
||||
@ -95,6 +79,14 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
const { code } = await $bluetooth.registerAuthentication(params)
|
||||
|
||||
if (code === 0) {
|
||||
text.value = '已连接到锁,请将卡靠近锁的读卡区'
|
||||
} else if (code === -21) {
|
||||
$basic.backAndToast('请先打开蓝牙')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -76,20 +76,11 @@
|
||||
if (data.status === 0xff) {
|
||||
$basic.backAndToast('添加失败,请重试')
|
||||
} else if (data.status === 0xfe) {
|
||||
uni.showToast({
|
||||
title: '管理员已满',
|
||||
icon: 'none'
|
||||
})
|
||||
$basic.backAndToast('管理员已满')
|
||||
} else if (data.status === 0xfd) {
|
||||
uni.showToast({
|
||||
title: '用户已满',
|
||||
icon: 'none'
|
||||
})
|
||||
$basic.backAndToast('用户已满')
|
||||
} else if (data.status === 0xfc) {
|
||||
uni.showToast({
|
||||
title: '人脸已满',
|
||||
icon: 'none'
|
||||
})
|
||||
$basic.backAndToast('人脸已满')
|
||||
} else if (data.status === 0xfb) {
|
||||
uni.showToast({
|
||||
title: '人脸已存在',
|
||||
@ -103,13 +94,16 @@
|
||||
const ready = async () => {
|
||||
showProcess.value = true
|
||||
const { code } = await $bluetooth.registerAuthentication(params.value)
|
||||
if (code !== 0) {
|
||||
$basic.backAndToast('操作失败,请重试')
|
||||
if (code === 0) {
|
||||
/* empty */
|
||||
} else if (code === -21) {
|
||||
$basic.backAndToast('请先打开蓝牙')
|
||||
}
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
uni.$off('registerFaceConfirm')
|
||||
uni.$off('registerFaceProcess')
|
||||
if (!bindFlag.value) {
|
||||
$bluetooth.registerAuthenticationCancel({
|
||||
type: 'face',
|
||||
|
||||
@ -40,16 +40,6 @@
|
||||
onLoad(async options => {
|
||||
if (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 => {
|
||||
if (data.status === 0) {
|
||||
bindFlag.value = true
|
||||
@ -82,20 +72,11 @@
|
||||
} else if (data.status === 0xff) {
|
||||
$basic.backAndToast('添加失败,请重试')
|
||||
} else if (data.status === 0xfe) {
|
||||
uni.showToast({
|
||||
title: '管理员已满',
|
||||
icon: 'none'
|
||||
})
|
||||
$basic.backAndToast('管理员已满')
|
||||
} else if (data.status === 0xfd) {
|
||||
uni.showToast({
|
||||
title: '用户已满',
|
||||
icon: 'none'
|
||||
})
|
||||
$basic.backAndToast('用户已满')
|
||||
} else if (data.status === 0xfc) {
|
||||
uni.showToast({
|
||||
title: '指纹已满',
|
||||
icon: 'none'
|
||||
})
|
||||
$basic.backAndToast('指纹已满')
|
||||
} else if (data.status === 0xfb) {
|
||||
uni.showToast({
|
||||
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(() => {
|
||||
uni.$off('registerFingerprintConfirm')
|
||||
uni.$off('registerFingerprintProcess')
|
||||
if (!bindFlag.value) {
|
||||
$bluetooth.registerAuthenticationCancel({
|
||||
type: 'fingerprint',
|
||||
|
||||
@ -36,13 +36,6 @@
|
||||
onLoad(async options => {
|
||||
if (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 => {
|
||||
if (data.status === 0) {
|
||||
@ -71,20 +64,11 @@
|
||||
} else if (data.status === 0xff) {
|
||||
$basic.backAndToast('添加失败,请重试')
|
||||
} else if (data.status === 0xfe) {
|
||||
uni.showToast({
|
||||
title: '管理员已满',
|
||||
icon: 'none'
|
||||
})
|
||||
$basic.backAndToast('管理员已满')
|
||||
} else if (data.status === 0xfd) {
|
||||
uni.showToast({
|
||||
title: '用户已满',
|
||||
icon: 'none'
|
||||
})
|
||||
$basic.backAndToast('用户已满')
|
||||
} else if (data.status === 0xfc) {
|
||||
uni.showToast({
|
||||
title: '掌静脉已满',
|
||||
icon: 'none'
|
||||
})
|
||||
$basic.backAndToast('掌静脉已满')
|
||||
} else if (data.status === 0xfb) {
|
||||
uni.showToast({
|
||||
title: '掌静脉已存在',
|
||||
@ -92,6 +76,14 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
const { code } = await $bluetooth.registerAuthentication(params)
|
||||
|
||||
if (code === 0) {
|
||||
text.value = '已连接到锁,请自然张开手掌,掌心对准摄像头'
|
||||
} else if (code === -21) {
|
||||
$basic.backAndToast('请先打开蓝牙')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -39,13 +39,6 @@
|
||||
onLoad(async options => {
|
||||
if (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 => {
|
||||
if (data.status === 0) {
|
||||
@ -74,20 +67,11 @@
|
||||
} else if (data.status === 0xff) {
|
||||
$basic.backAndToast('添加失败,请重试')
|
||||
} else if (data.status === 0xfe) {
|
||||
uni.showToast({
|
||||
title: '管理员已满',
|
||||
icon: 'none'
|
||||
})
|
||||
$basic.backAndToast('管理员已满')
|
||||
} else if (data.status === 0xfd) {
|
||||
uni.showToast({
|
||||
title: '用户已满',
|
||||
icon: 'none'
|
||||
})
|
||||
$basic.backAndToast('用户已满')
|
||||
} else if (data.status === 0xfc) {
|
||||
uni.showToast({
|
||||
title: '遥控已满',
|
||||
icon: 'none'
|
||||
})
|
||||
$basic.backAndToast('遥控已满')
|
||||
} else if (data.status === 0xfb) {
|
||||
uni.showToast({
|
||||
title: '遥控已存在',
|
||||
@ -95,6 +79,14 @@
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
const { code } = await $bluetooth.registerAuthentication(params)
|
||||
|
||||
if (code === 0) {
|
||||
text.value = '已连接到锁,请按遥控'
|
||||
} else if (code === -21) {
|
||||
$basic.backAndToast('请先打开蓝牙')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()">
|
||||
<view class="item-title">姓名</view>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -291,7 +291,7 @@
|
||||
}
|
||||
|
||||
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) {
|
||||
data.list[i].timeText =
|
||||
timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') +
|
||||
|
||||
@ -43,6 +43,9 @@
|
||||
@change="changeAdmin('permanent', $event)"
|
||||
></LockSwitch>
|
||||
</view>
|
||||
<view class="text-sm text-#262626 mt-3 mx-4">
|
||||
授权管理员拥有操作这把锁的重要权限,请确保只发给你信任的人
|
||||
</view>
|
||||
<view class="button mt-5" @click="create('permanent')">发送</view>
|
||||
</swiper-item>
|
||||
<swiper-item :style="{ height: deviceInfo.windowHeight - 44 + 'px' }">
|
||||
@ -84,6 +87,9 @@
|
||||
@change="changeAdmin('temporary', $event)"
|
||||
></LockSwitch>
|
||||
</view>
|
||||
<view class="text-sm text-#262626 mt-3 mx-4">
|
||||
授权管理员拥有操作这把锁的重要权限,请确保只发给你信任的人
|
||||
</view>
|
||||
<view class="button mt-5" @click="create('temporary')">发送</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()">
|
||||
<view class="item-title">姓名</view>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -292,7 +292,7 @@
|
||||
}
|
||||
|
||||
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) {
|
||||
data.list[i].timeText =
|
||||
timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') +
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()">
|
||||
<view class="item-title">姓名</view>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -291,7 +291,7 @@
|
||||
}
|
||||
|
||||
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) {
|
||||
data.list[i].timeText =
|
||||
timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') +
|
||||
|
||||
@ -3,7 +3,9 @@
|
||||
<view class="item" @click="() => $refs.modalInput.open()">
|
||||
<view class="item-title" style="width: 350rpx">姓名</view>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
@ -97,7 +99,11 @@
|
||||
>{{ $lock.currentKeyInfo.keyStatus === 110405 ? '解冻' : '冻结' }}</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']"
|
||||
@click="authorize"
|
||||
>{{ $lock.currentKeyInfo.keyRight === 1 ? '取消授权管理员' : '授权管理员' }}</view
|
||||
|
||||
@ -57,7 +57,7 @@
|
||||
class="menu-main-view"
|
||||
@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
|
||||
@ -65,7 +65,7 @@
|
||||
class="menu-main-view"
|
||||
@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
|
||||
@ -99,10 +99,7 @@
|
||||
class="menu-main-view"
|
||||
@click="routeJump({ name: 'faceList' })"
|
||||
>
|
||||
<image
|
||||
class="menu-main-image transform-scale-125"
|
||||
src="/static/images/icon_face.png"
|
||||
></image>
|
||||
<image class="menu-main-image" src="/static/images/icon_face.png"></image>
|
||||
<view>人脸</view>
|
||||
</view>
|
||||
<view
|
||||
@ -322,6 +319,11 @@
|
||||
this.backAndToast('单次钥匙已在被使用后删除', 1)
|
||||
}
|
||||
}
|
||||
} else if (code === 7) {
|
||||
uni.showToast({
|
||||
title: `钥匙过期`,
|
||||
icon: 'none'
|
||||
})
|
||||
} else if (code === 13) {
|
||||
uni.showToast({
|
||||
title: `钥匙当前不可用`,
|
||||
@ -523,10 +525,9 @@
|
||||
margin-bottom: 48rpx;
|
||||
|
||||
.menu-main-image {
|
||||
filter: sepia(100%) saturate(10000%) hue-rotate(180deg) brightness(0.1);
|
||||
margin-bottom: 10rpx;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()">
|
||||
<view class="item-title">姓名</view>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -296,7 +296,7 @@
|
||||
}
|
||||
|
||||
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) {
|
||||
data.list[i].timeText =
|
||||
timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') +
|
||||
|
||||
@ -18,7 +18,9 @@
|
||||
<view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()">
|
||||
<view class="item-title">姓名</view>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<view>
|
||||
<view class="flex items-center h-[60px] mx-3 font-bold">
|
||||
<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">
|
||||
<up-icon
|
||||
:label="timeText"
|
||||
@ -16,7 +16,7 @@
|
||||
</picker>
|
||||
</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
|
||||
:value="index"
|
||||
mode="selector"
|
||||
@ -35,6 +35,14 @@
|
||||
></up-icon>
|
||||
</picker>
|
||||
</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>
|
||||
<scroll-view
|
||||
v-if="deviceInfo"
|
||||
@ -149,6 +157,15 @@
|
||||
videoContext.requestFullScreen({ direction: 0 })
|
||||
}
|
||||
|
||||
const tip = () => {
|
||||
uni.showModal({
|
||||
title: '操作记录未显示',
|
||||
content: '锁未联网,开门记录无法实时上传,可以点击同步记录进行读取',
|
||||
showCancel: false,
|
||||
confirmText: '我知道了'
|
||||
})
|
||||
}
|
||||
|
||||
const previewImage = url => {
|
||||
uni.previewImage({
|
||||
urls: [url]
|
||||
@ -316,6 +333,10 @@
|
||||
}
|
||||
|
||||
const syncRecord = async () => {
|
||||
const netWork = await $basic.getNetworkType()
|
||||
if (!netWork) {
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '同步中'
|
||||
})
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<view class="item" style="margin-top: 2rpx" @click="() => $refs.modalInput.open()">
|
||||
<view class="item-title">姓名</view>
|
||||
<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>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -294,7 +294,7 @@
|
||||
}
|
||||
|
||||
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) {
|
||||
data.list[i].timeText =
|
||||
timeFormat(data.list[i].startDate, 'yyyy-mm-dd hh:MM') +
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="bg-#faecc9 text-#bc9839 text-24rpx text-center h-40px line-height-40px"
|
||||
>锁未联网,开门记录无法实时上传,可以点击同步记录进行读取
|
||||
</view>
|
||||
<scroll-view
|
||||
v-if="deviceInfo"
|
||||
scroll-y="true"
|
||||
@ -159,6 +162,10 @@
|
||||
}
|
||||
|
||||
const syncRecord = async () => {
|
||||
const netWork = await $basic.getNetworkType()
|
||||
if (!netWork) {
|
||||
return
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '同步中'
|
||||
})
|
||||
|
||||
|
Before Width: | Height: | Size: 758 B After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 909 B After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 460 B After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2.1 KiB |
BIN
static/images/icon_key.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
BIN
static/images/icon_password_green.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 1.4 KiB |
@ -2404,7 +2404,7 @@ export const useBluetoothStore = defineStore('ble', {
|
||||
console.log('写入未执行', this.bluetoothStatus)
|
||||
this.getBluetoothStatus()
|
||||
return {
|
||||
code: -1
|
||||
code: -21
|
||||
}
|
||||
}
|
||||
|
||||
@ -2592,26 +2592,6 @@ export const useBluetoothStore = defineStore('ble', {
|
||||
},
|
||||
// 获取操作记录
|
||||
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) {
|
||||
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 logsCount = 10
|
||||
|
||||