diff --git a/pages/adminDetail/adminDetail.vue b/pages/adminDetail/adminDetail.vue
index 86cdd16..f0bf2a0 100644
--- a/pages/adminDetail/adminDetail.vue
+++ b/pages/adminDetail/adminDetail.vue
@@ -4,7 +4,7 @@
$refs.modalInput.open()">
姓名
- {{ info.keyName }}
+ {{ info.keyName }}
diff --git a/pages/bindCard/bindCard.vue b/pages/bindCard/bindCard.vue
index 13ee45b..ad9b4ef 100644
--- a/pages/bindCard/bindCard.vue
+++ b/pages/bindCard/bindCard.vue
@@ -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('请先打开蓝牙')
+ }
}
})
diff --git a/pages/bindFace/bindFace.vue b/pages/bindFace/bindFace.vue
index cd25ba4..6fa3055 100644
--- a/pages/bindFace/bindFace.vue
+++ b/pages/bindFace/bindFace.vue
@@ -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',
diff --git a/pages/bindFingerprint/bindFingerprint.vue b/pages/bindFingerprint/bindFingerprint.vue
index fb20e38..567fe60 100644
--- a/pages/bindFingerprint/bindFingerprint.vue
+++ b/pages/bindFingerprint/bindFingerprint.vue
@@ -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',
diff --git a/pages/bindPalmVein/bindPalmVein.vue b/pages/bindPalmVein/bindPalmVein.vue
index 0fe8f95..fe25956 100644
--- a/pages/bindPalmVein/bindPalmVein.vue
+++ b/pages/bindPalmVein/bindPalmVein.vue
@@ -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('请先打开蓝牙')
+ }
}
})
diff --git a/pages/bindRemote/bindRemote.vue b/pages/bindRemote/bindRemote.vue
index 3e9c442..77b740b 100644
--- a/pages/bindRemote/bindRemote.vue
+++ b/pages/bindRemote/bindRemote.vue
@@ -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('请先打开蓝牙')
+ }
}
})
diff --git a/pages/cardDetail/cardDetail.vue b/pages/cardDetail/cardDetail.vue
index e85af47..54a9cca 100644
--- a/pages/cardDetail/cardDetail.vue
+++ b/pages/cardDetail/cardDetail.vue
@@ -8,7 +8,7 @@
$refs.modalInput.open()">
姓名
- {{ info.cardName }}
+ {{ info.cardName }}
diff --git a/pages/cardList/cardList.vue b/pages/cardList/cardList.vue
index d6a8af2..e83df99 100644
--- a/pages/cardList/cardList.vue
+++ b/pages/cardList/cardList.vue
@@ -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') +
diff --git a/pages/createAdmin/createAdmin.vue b/pages/createAdmin/createAdmin.vue
index 4dce58a..d08fcd1 100644
--- a/pages/createAdmin/createAdmin.vue
+++ b/pages/createAdmin/createAdmin.vue
@@ -43,6 +43,9 @@
@change="changeAdmin('permanent', $event)"
>
+
+ 授权管理员拥有操作这把锁的重要权限,请确保只发给你信任的人
+
发送
@@ -84,6 +87,9 @@
@change="changeAdmin('temporary', $event)"
>
+
+ 授权管理员拥有操作这把锁的重要权限,请确保只发给你信任的人
+
发送
diff --git a/pages/faceDetail/faceDetail.vue b/pages/faceDetail/faceDetail.vue
index f134e6f..8cbafd6 100644
--- a/pages/faceDetail/faceDetail.vue
+++ b/pages/faceDetail/faceDetail.vue
@@ -8,7 +8,7 @@
$refs.modalInput.open()">
姓名
- {{ info.faceName }}
+ {{ info.faceName }}
diff --git a/pages/faceList/faceList.vue b/pages/faceList/faceList.vue
index fd466a4..faaecb4 100644
--- a/pages/faceList/faceList.vue
+++ b/pages/faceList/faceList.vue
@@ -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') +
diff --git a/pages/fingerprintDetail/fingerprintDetail.vue b/pages/fingerprintDetail/fingerprintDetail.vue
index 3ea94ef..a92bb14 100644
--- a/pages/fingerprintDetail/fingerprintDetail.vue
+++ b/pages/fingerprintDetail/fingerprintDetail.vue
@@ -8,7 +8,7 @@
$refs.modalInput.open()">
姓名
- {{ info.fingerprintName }}
+ {{ info.fingerprintName }}
diff --git a/pages/fingerprintList/fingerprintList.vue b/pages/fingerprintList/fingerprintList.vue
index 2c4b910..4b08c85 100644
--- a/pages/fingerprintList/fingerprintList.vue
+++ b/pages/fingerprintList/fingerprintList.vue
@@ -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') +
diff --git a/pages/keyDetail/keyDetail.vue b/pages/keyDetail/keyDetail.vue
index c456307..361cfd1 100644
--- a/pages/keyDetail/keyDetail.vue
+++ b/pages/keyDetail/keyDetail.vue
@@ -3,7 +3,9 @@
$refs.modalInput.open()">
姓名
- {{ $lock.currentKeyInfo.keyName }}
+ {{
+ $lock.currentKeyInfo.keyName
+ }}
@@ -97,7 +99,11 @@
>{{ $lock.currentKeyInfo.keyStatus === 110405 ? '解冻' : '冻结' }}
{{ $lock.currentKeyInfo.keyRight === 1 ? '取消授权管理员' : '授权管理员' }}
-
+
电子钥匙
-
+
密码
-
+
人脸
$refs.modalInput.open()">
姓名
- {{ info.palmVeinName }}
+ {{ info.palmVeinName }}
diff --git a/pages/palmVeinList/palmVeinList.vue b/pages/palmVeinList/palmVeinList.vue
index d7164fb..1ebf087 100644
--- a/pages/palmVeinList/palmVeinList.vue
+++ b/pages/palmVeinList/palmVeinList.vue
@@ -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') +
diff --git a/pages/passwordDetail/passwordDetail.vue b/pages/passwordDetail/passwordDetail.vue
index bd8f9ed..aba3be3 100644
--- a/pages/passwordDetail/passwordDetail.vue
+++ b/pages/passwordDetail/passwordDetail.vue
@@ -18,7 +18,9 @@
$refs.modalInput.open()">
姓名
- {{ $lock.currentPasswordInfo.keyboardPwdName }}
+ {{
+ $lock.currentPasswordInfo.keyboardPwdName
+ }}
diff --git a/pages/recordList/recordList.vue b/pages/recordList/recordList.vue
index 3b37f6e..8da5c28 100644
--- a/pages/recordList/recordList.vue
+++ b/pages/recordList/recordList.vue
@@ -2,7 +2,7 @@
日期:
-
+
事件:
-
+
+
+
+
{
+ 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: '同步中'
})
diff --git a/pages/remoteDetail/remoteDetail.vue b/pages/remoteDetail/remoteDetail.vue
index 722efad..cf7a967 100644
--- a/pages/remoteDetail/remoteDetail.vue
+++ b/pages/remoteDetail/remoteDetail.vue
@@ -8,7 +8,7 @@
$refs.modalInput.open()">
姓名
- {{ info.remoteName }}
+ {{ info.remoteName }}
diff --git a/pages/remoteList/remoteList.vue b/pages/remoteList/remoteList.vue
index ed6ab92..b5b9860 100644
--- a/pages/remoteList/remoteList.vue
+++ b/pages/remoteList/remoteList.vue
@@ -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') +
diff --git a/pages/typeRecordList/typeRecordList.vue b/pages/typeRecordList/typeRecordList.vue
index 93a9a72..bda52ee 100644
--- a/pages/typeRecordList/typeRecordList.vue
+++ b/pages/typeRecordList/typeRecordList.vue
@@ -1,5 +1,8 @@
+ 锁未联网,开门记录无法实时上传,可以点击同步记录进行读取
+
{
+ const netWork = await $basic.getNetworkType()
+ if (!netWork) {
+ return
+ }
uni.showLoading({
title: '同步中'
})
diff --git a/static/images/icon_admin_black.png b/static/images/icon_admin_black.png
index 825bc88..25c8961 100644
Binary files a/static/images/icon_admin_black.png and b/static/images/icon_admin_black.png differ
diff --git a/static/images/icon_card.png b/static/images/icon_card.png
index 1355daf..fd4f81c 100644
Binary files a/static/images/icon_card.png and b/static/images/icon_card.png differ
diff --git a/static/images/icon_face.png b/static/images/icon_face.png
index ce6b9fd..70b7034 100644
Binary files a/static/images/icon_face.png and b/static/images/icon_face.png differ
diff --git a/static/images/icon_fingerprint.png b/static/images/icon_fingerprint.png
index 6ec6147..bce2eae 100644
Binary files a/static/images/icon_fingerprint.png and b/static/images/icon_fingerprint.png differ
diff --git a/static/images/icon_key.png b/static/images/icon_key.png
new file mode 100644
index 0000000..d97edf8
Binary files /dev/null and b/static/images/icon_key.png differ
diff --git a/static/images/icon_palm_vein.png b/static/images/icon_palm_vein.png
index 018050b..4ff12ad 100644
Binary files a/static/images/icon_palm_vein.png and b/static/images/icon_palm_vein.png differ
diff --git a/static/images/icon_password_green.png b/static/images/icon_password_green.png
new file mode 100644
index 0000000..9175277
Binary files /dev/null and b/static/images/icon_password_green.png differ
diff --git a/static/images/icon_record.png b/static/images/icon_record.png
index 3050172..ff18169 100644
Binary files a/static/images/icon_record.png and b/static/images/icon_record.png differ
diff --git a/static/images/icon_remote.png b/static/images/icon_remote.png
index 3bf9398..7dc223b 100644
Binary files a/static/images/icon_remote.png and b/static/images/icon_remote.png differ
diff --git a/static/images/icon_setting.png b/static/images/icon_setting.png
index 6834c06..c3a28a6 100644
Binary files a/static/images/icon_setting.png and b/static/images/icon_setting.png differ
diff --git a/stores/bluetooth.js b/stores/bluetooth.js
index 6b2572a..8800d12 100644
--- a/stores/bluetooth.js
+++ b/stores/bluetooth.js
@@ -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