diff --git a/api/fingerprint.js b/api/fingerprint.js
index 3eeff52..eafe01e 100644
--- a/api/fingerprint.js
+++ b/api/fingerprint.js
@@ -55,3 +55,12 @@ export function getFingerprintRequest(data) {
data
})
}
+
+// 获取胁迫指纹列表
+export function getCoercedListRequest(data) {
+ return request({
+ url: '/fingerprint/getCoercedList',
+ method: 'POST',
+ data
+ })
+}
diff --git a/api/lock.js b/api/lock.js
index cc58004..9a15f3e 100644
--- a/api/lock.js
+++ b/api/lock.js
@@ -37,3 +37,12 @@ export function deleteLockRequest(data) {
data
})
}
+
+// 锁用户列表
+export function lockUserListRequest(data) {
+ return request({
+ url: '/lock/lockKeysList',
+ method: 'POST',
+ data
+ })
+}
diff --git a/api/setting.js b/api/setting.js
index f8c8a62..d172262 100644
--- a/api/setting.js
+++ b/api/setting.js
@@ -73,3 +73,57 @@ export function lockDataUploadRequest(data) {
data
})
}
+
+// 获取锁通知设置
+export function getLockNoticeSettingRequest(data) {
+ return request({
+ url: '/lockSetting/getLockNoticeSetting',
+ method: 'POST',
+ data
+ })
+}
+
+// 更新锁通知设置
+export function updateLockNoticeSettingRequest(data) {
+ return request({
+ url: '/lockSetting/updateLockNoticeSetting',
+ method: 'POST',
+ data
+ })
+}
+
+// 获取通知列表
+export function getNoticeListRequest(data) {
+ return request({
+ url: '/lockNoticeSettingAccount/list',
+ method: 'POST',
+ data
+ })
+}
+
+// 更新通知
+export function updateNoticeRequest(data) {
+ return request({
+ url: '/lockNoticeSettingAccount/update',
+ method: 'POST',
+ data
+ })
+}
+
+// 删除通知
+export function deleteNoticeRequest(data) {
+ return request({
+ url: '/lockNoticeSettingAccount/delete',
+ method: 'POST',
+ data
+ })
+}
+
+// 添加通知
+export function addNoticeRequest(data) {
+ return request({
+ url: '/lockNoticeSettingAccount/add',
+ method: 'POST',
+ data
+ })
+}
diff --git a/api/user.js b/api/user.js
index eef6c04..2ea0a3e 100644
--- a/api/user.js
+++ b/api/user.js
@@ -101,3 +101,11 @@ export function updateTimezoneOffsetRequest(data) {
})
}
+// 获取url
+export function getWebUrlRequest(data) {
+ return request({
+ url: '/v2/service/getPackageUrl',
+ method: 'POST',
+ data
+ })
+}
diff --git a/constant/keyType.js b/constant/keyType.js
new file mode 100644
index 0000000..b72e204
--- /dev/null
+++ b/constant/keyType.js
@@ -0,0 +1,30 @@
+export const keysType = {
+ 1: {
+ name: '电子钥匙',
+ icon: '/static/images/icon_user.png'
+ },
+ 2: {
+ name: '密码',
+ icon: '/static/images/icon_password.png'
+ },
+ 3: {
+ name: '指纹',
+ icon: '/static/images/icon_fingerprint_white.png'
+ },
+ 4: {
+ name: '卡',
+ icon: '/static/images/icon_card_white.png'
+ },
+ 5: {
+ name: '人脸',
+ icon: '/static/images/icon_face_white.png'
+ },
+ 6: {
+ name: '掌静脉',
+ icon: '/static/images/icon_palm_vein_white.png'
+ },
+ 7: {
+ name: '遥控',
+ icon: '/static/images/icon_remote_white.png'
+ }
+}
diff --git a/pages.json b/pages.json
index b5b8379..f689b07 100644
--- a/pages.json
+++ b/pages.json
@@ -400,6 +400,90 @@
"navigationBarTitleText": "上传数据",
"disableScroll": true
}
+ },
+ {
+ "path": "pages/openDirection/openDirection",
+ "style": {
+ "navigationBarTitleText": "开门方向设置",
+ "disableScroll": true
+ }
+ },
+ {
+ "path": "pages/motorTorsion/motorTorsion",
+ "style": {
+ "navigationBarTitleText": "电机功率设置",
+ "disableScroll": true
+ }
+ },
+ {
+ "path": "pages/catEye/catEye",
+ "style": {
+ "navigationBarTitleText": "猫眼设置",
+ "disableScroll": true
+ }
+ },
+ {
+ "path": "pages/messageReminder/messageReminder",
+ "style": {
+ "navigationBarTitleText": "消息提醒",
+ "disableScroll": true
+ }
+ },
+ {
+ "path": "pages/openDoorNotice/openDoorNotice",
+ "style": {
+ "navigationBarTitleText": "家人到家",
+ "disableScroll": true
+ }
+ },
+ {
+ "path": "pages/noticeDetail/noticeDetail",
+ "style": {
+ "navigationBarTitleText": "家人详情",
+ "disableScroll": true
+ }
+ },
+ {
+ "path": "pages/lockUser/lockUser",
+ "style": {
+ "navigationBarTitleText": "锁用户",
+ "disableScroll": true
+ }
+ },
+ {
+ "path": "pages/noticeWay/noticeWay",
+ "style": {
+ "navigationBarTitleText": "提醒方式",
+ "disableScroll": true
+ }
+ },
+ {
+ "path": "pages/notOpenDoor/notOpenDoor",
+ "style": {
+ "navigationBarTitleText": "N天未开门",
+ "disableScroll": true
+ }
+ },
+ {
+ "path": "pages/lowElecNotice/lowElecNotice",
+ "style": {
+ "navigationBarTitleText": "低电量提醒",
+ "disableScroll": true
+ }
+ },
+ {
+ "path": "pages/coercionOpenDoor/coercionOpenDoor",
+ "style": {
+ "navigationBarTitleText": "胁迫开门",
+ "disableScroll": true
+ }
+ },
+ {
+ "path": "pages/coercionFingerprint/coercionFingerprint",
+ "style": {
+ "navigationBarTitleText": "指纹列表",
+ "disableScroll": true
+ }
}
],
"globalStyle": {
diff --git a/pages/catEye/catEye.vue b/pages/catEye/catEye.vue
new file mode 100644
index 0000000..16c4023
--- /dev/null
+++ b/pages/catEye/catEye.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
diff --git a/pages/coercionFingerprint/coercionFingerprint.vue b/pages/coercionFingerprint/coercionFingerprint.vue
new file mode 100644
index 0000000..10e5176
--- /dev/null
+++ b/pages/coercionFingerprint/coercionFingerprint.vue
@@ -0,0 +1,329 @@
+
+
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+
+
+ {{ item?.name }}
+
+ {{ item?.timeText }}
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+
+
+
+
+
+
+
diff --git a/pages/coercionOpenDoor/coercionOpenDoor.vue b/pages/coercionOpenDoor/coercionOpenDoor.vue
new file mode 100644
index 0000000..3eb76a6
--- /dev/null
+++ b/pages/coercionOpenDoor/coercionOpenDoor.vue
@@ -0,0 +1,159 @@
+
+
+
+ 当被胁迫要求强行开锁时,使用胁迫指纹会触发报警,报警消息会推送给管理员,该功能需要锁联网
+
+
+
+
+ 暂无数据
+
+
+
+
+
+ {{ item.settingValue.remark }}
+ {{
+ keysType[item.settingValue.openDoorType].name
+ }}
+
+
+
+
+
+
+ 胁迫指纹
+
+
+
+
+
+
+
diff --git a/pages/createPassword/createPassword.vue b/pages/createPassword/createPassword.vue
index 77be4d1..d6cf61b 100644
--- a/pages/createPassword/createPassword.vue
+++ b/pages/createPassword/createPassword.vue
@@ -441,7 +441,6 @@
}
const { code, data } = await $bluetooth.setLockPassword(params)
if (code === 0 && data.status === 0) {
- console.log(1111, data)
const { code: requestCode, message } = await addCustomPasswordRequest({
lockId: $bluetooth.currentLockInfo.lockId,
isCoerced: 2,
diff --git a/pages/lockUser/lockUser.vue b/pages/lockUser/lockUser.vue
new file mode 100644
index 0000000..838a5ee
--- /dev/null
+++ b/pages/lockUser/lockUser.vue
@@ -0,0 +1,392 @@
+
+
+
+
+
+
+
+
+
+ 暂无数据
+
+
+
+
+
+
+
+ {{ item?.name }}
+
+ {{ item?.timeText }}
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+
+
+
+
+
+
+
diff --git a/pages/lowElecNotice/lowElecNotice.vue b/pages/lowElecNotice/lowElecNotice.vue
new file mode 100644
index 0000000..890f25d
--- /dev/null
+++ b/pages/lowElecNotice/lowElecNotice.vue
@@ -0,0 +1,135 @@
+
+
+
+ 打开提醒后,当锁电量低于20%、10%、5%,系统会给指定对象发送提醒消息。电量读取方式:网关读取或APP读取。
+
+
+
+ 低电量提醒
+
+
+
+
+
+ 提醒方式
+
+
+
+
+ APP推送
+ 管理员
+
+
+
+ {{ list.type === 'mail' ? '邮件提醒' : '短信提醒' }}
+
+
+ {{ item.account }}
+
+
+
+
+
+
+ 保存
+
+
+
+
+
+
+
diff --git a/pages/messageReminder/messageReminder.vue b/pages/messageReminder/messageReminder.vue
new file mode 100644
index 0000000..0e06339
--- /dev/null
+++ b/pages/messageReminder/messageReminder.vue
@@ -0,0 +1,140 @@
+
+
+
+
+ 开门通知
+
+
+
+ N天未开门
+
+ {{
+ $bluetooth.currentLockNoticeSetting.dayNotOpenDoorState ? '已启用' : '未启用'
+ }}
+
+
+
+
+ 门未关好
+
+
+
+ 防拆报警
+
+
+
+ 低电量提醒
+
+ {{
+ $bluetooth.currentLockNoticeSetting.lowElecNoticeState ? '已启用' : '未启用'
+ }}
+
+
+
+
+ 胁迫开门
+
+
+ 此模块功能需要锁联网后设置方可生效
+
+
+
+
+
+
+
diff --git a/pages/motorTorsion/motorTorsion.vue b/pages/motorTorsion/motorTorsion.vue
new file mode 100644
index 0000000..0b58f74
--- /dev/null
+++ b/pages/motorTorsion/motorTorsion.vue
@@ -0,0 +1,125 @@
+
+
+
+ 请根据门锁实际情况,请谨慎选择电机功率:
+
+
+
+
+
+
+ 小功率:
+ 耗电少
+
+
+
+
+
+
+
+ 中功率:
+ 常规使用
+
+
+
+
+
+
+
+ 大功率:
+
+ 如果开锁时锁舌不能正常回收,或需要带动天地钩,建议选择大功率。此时耗电将会增加。
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/notOpenDoor/notOpenDoor.vue b/pages/notOpenDoor/notOpenDoor.vue
new file mode 100644
index 0000000..c0c9dee
--- /dev/null
+++ b/pages/notOpenDoor/notOpenDoor.vue
@@ -0,0 +1,215 @@
+
+
+
+ 经过以上设定的时间,锁没有被开启,系统会给指定对象发送提醒消息,该功能需要锁联网。
+
+
+
+ N天未开门提醒
+
+
+
+ 未开门时间
+ {{ value }}天
+
+
+
+
+
+ 提醒方式
+
+
+
+
+ APP推送
+ 管理员
+
+
+
+ {{ list.type === 'mail' ? '邮件提醒' : '短信提醒' }}
+
+
+ {{ item.account }}
+
+
+
+
+
+
+ 保存
+
+
+
+
+
+
+
+
diff --git a/pages/noticeDetail/noticeDetail.vue b/pages/noticeDetail/noticeDetail.vue
new file mode 100644
index 0000000..5482058
--- /dev/null
+++ b/pages/noticeDetail/noticeDetail.vue
@@ -0,0 +1,422 @@
+
+
+
+
+ {{ mode === 'all' ? '开门方式' : '胁迫指纹' }}
+
+ {{
+ mode === 'all'
+ ? keysType[info.settingValue.openDoorType].name
+ : info?.settingValue?.remark
+ }}
+
+ 请选择
+
+
+
+ 家人
+
+ {{ info?.settingValue?.remark }}
+
+
+
+
+
+
+
+ 提醒方式
+
+
+
+
+ APP推送
+ 管理员
+
+
+ 邮件提醒
+
+
+ {{ item.account }}
+
+
+
+ 短信提醒
+
+
+ {{ item.account }}
+
+
+
+ 删除
+
+ 保存
+
+
+
+
+
+
+
+
diff --git a/pages/noticeWay/noticeWay.vue b/pages/noticeWay/noticeWay.vue
new file mode 100644
index 0000000..37ba193
--- /dev/null
+++ b/pages/noticeWay/noticeWay.vue
@@ -0,0 +1,191 @@
+
+
+
+ APP推送
+ 管理员
+
+
+
+
+ 邮件提醒
+
+
+
+
+
+
+ 接收者
+
+
+
+
+
+
+
+ 短信提醒
+
+
+
+
+
+
+ 接收者
+
+
+
+
+
+ 确定
+
+
+
+
+
+
+
+
+
diff --git a/pages/openDirection/openDirection.vue b/pages/openDirection/openDirection.vue
new file mode 100644
index 0000000..a159a80
--- /dev/null
+++ b/pages/openDirection/openDirection.vue
@@ -0,0 +1,120 @@
+
+
+
+ 请谨慎选择您家的开门方向(如果选择错误,将无法正常开关门):
+
+
+
+
+
+ 左开
+
+
+
+
+ 右开
+
+
+ 判断方法:人站在屋外,面向入户门。
+ 如果门的合页或门轴在左边,则门是左开;
+ 如果门的合页或门轴在右边,则门是右开。
+ 如果设置错误,将无法正常开关门。
+ 建议由安装或维修人员操作。
+
+
+
+
+
+
+
diff --git a/pages/openDoorNotice/openDoorNotice.vue b/pages/openDoorNotice/openDoorNotice.vue
new file mode 100644
index 0000000..52c6394
--- /dev/null
+++ b/pages/openDoorNotice/openDoorNotice.vue
@@ -0,0 +1,158 @@
+
+
+
+ 若锁没有联网,除电子钥匙外,密码、卡、指纹等开门提醒无法及时发送,请根据你的实际情况选择。
+
+
+
+
+ 暂无数据
+
+
+
+
+
+ {{ item.settingValue.remark }}
+ {{
+ keysType[item.settingValue.openDoorType].name
+ }}
+
+
+
+
+
+
+ 添加家人
+
+
+
+
+
+
+
diff --git a/pages/setting/setting.vue b/pages/setting/setting.vue
index f309cf1..e6c65b4 100644
--- a/pages/setting/setting.vue
+++ b/pages/setting/setting.vue
@@ -112,10 +112,47 @@
面容开锁
-
-
-
-
+
+ 消息提醒
+
+
+
+ 猫眼设置
+
+
+
+ 开门方向设置
+
+
+
+ 电机功率设置
+
+
diff --git a/static/images/icon_not_select.png b/static/images/icon_not_select.png
new file mode 100644
index 0000000..c797e6d
Binary files /dev/null and b/static/images/icon_not_select.png differ
diff --git a/static/images/icon_open_direction.png b/static/images/icon_open_direction.png
new file mode 100755
index 0000000..3b9ae2f
Binary files /dev/null and b/static/images/icon_open_direction.png differ
diff --git a/static/images/icon_select.png b/static/images/icon_select.png
new file mode 100644
index 0000000..d872f0f
Binary files /dev/null and b/static/images/icon_select.png differ
diff --git a/stores/basic.js b/stores/basic.js
index eddeaac..b89cfb8 100644
--- a/stores/basic.js
+++ b/stores/basic.js
@@ -296,6 +296,66 @@ const pages = [
name: 'uploadLockData',
path: '/pages/uploadLockData/uploadLockData',
tabBar: false
+ },
+ {
+ name: 'openDirection',
+ path: '/pages/openDirection/openDirection',
+ tabBar: false
+ },
+ {
+ name: 'motorTorsion',
+ path: '/pages/motorTorsion/motorTorsion',
+ tabBar: false
+ },
+ {
+ name: 'catEye',
+ path: '/pages/catEye/catEye',
+ tabBar: false
+ },
+ {
+ name: 'messageReminder',
+ path: '/pages/messageReminder/messageReminder',
+ tabBar: false
+ },
+ {
+ name: 'openDoorNotice',
+ path: '/pages/openDoorNotice/openDoorNotice',
+ tabBar: false
+ },
+ {
+ name: 'noticeDetail',
+ path: '/pages/noticeDetail/noticeDetail',
+ tabBar: false
+ },
+ {
+ name: 'lockUser',
+ path: '/pages/lockUser/lockUser',
+ tabBar: false
+ },
+ {
+ name: 'noticeWay',
+ path: '/pages/noticeWay/noticeWay',
+ tabBar: false
+ },
+ {
+ name: 'notOpenDoor',
+ path: '/pages/notOpenDoor/notOpenDoor',
+ tabBar: false
+ },
+ {
+ name: 'lowElecNotice',
+ path: '/pages/lowElecNotice/lowElecNotice',
+ tabBar: false
+ },
+ {
+ name: 'coercionOpenDoor',
+ path: '/pages/coercionOpenDoor/coercionOpenDoor',
+ tabBar: false
+ },
+ {
+ name: 'coercionFingerprint',
+ path: '/pages/coercionFingerprint/coercionFingerprint',
+ tabBar: false
}
]
diff --git a/stores/bluetooth.js b/stores/bluetooth.js
index 8800d12..cc74c33 100644
--- a/stores/bluetooth.js
+++ b/stores/bluetooth.js
@@ -127,6 +127,8 @@ export const useBluetoothStore = defineStore('ble', {
currentLockInfo: {},
// 当前锁设置信息
currentLockSetting: null,
+ // 当前锁消息设置
+ currentLockNoticeSetting: null,
// 消息序号
messageCount: 1,
// 是否初始化蓝牙
@@ -140,6 +142,10 @@ export const useBluetoothStore = defineStore('ble', {
}
},
actions: {
+ // 更新锁消息设置
+ updateCurrentLockNoticeSetting(lockNoticeSetting) {
+ this.currentLockNoticeSetting = { ...this.currentLockNoticeSetting, ...lockNoticeSetting }
+ },
// 保存刚绑定的设备名称
updateBindedDeviceName(name) {
if (!this.bindedDeviceNameList.includes(name)) {
diff --git a/stores/user.js b/stores/user.js
index a859d1f..ee28624 100644
--- a/stores/user.js
+++ b/stores/user.js
@@ -2,7 +2,7 @@
* @description 用户信息数据持久化
*/
import { defineStore } from 'pinia'
-import { getUserInfoRequest, loginRequest, phoneLoginRequest } from '@/api/user'
+import { getUserInfoRequest, getWebUrlRequest, loginRequest, phoneLoginRequest } from '@/api/user'
import { useLockStore } from '@/stores/lock'
import { setStorage, getStorage } from '@/utils/storage'
import { useNotificationStore } from '@/stores/notification'
@@ -13,7 +13,8 @@ export const useUserStore = defineStore('user', {
// 用户信息
userInfo: {},
// 登录状态
- isLogin: false
+ isLogin: false,
+ webUrl: null
}
},
actions: {
@@ -82,6 +83,17 @@ export const useUserStore = defineStore('user', {
}
})
})
+ },
+ async getWebUrl() {
+ if (this.webUrl) {
+ return { code: 0, data: this.webUrl }
+ }
+ const { code, data, message } = await getWebUrlRequest()
+ if (code === 0) {
+ this.webUrl = data
+ return { code, data }
+ }
+ return { code, message }
}
}
})