diff --git a/api/lockSetting.js b/api/lockSetting.js deleted file mode 100644 index 3a04683..0000000 --- a/api/lockSetting.js +++ /dev/null @@ -1,12 +0,0 @@ -import request from '../utils/request' - -// lockSetting 锁设置模块 - -// 更新锁设置 -export function updateLockSettingRequest(data) { - return request({ - url: '/lockSetting/updateLockSetting', - method: 'POST', - data - }) -} diff --git a/api/setting.js b/api/setting.js index 4a6dfda..f8c8a62 100644 --- a/api/setting.js +++ b/api/setting.js @@ -5,7 +5,70 @@ import request from '../utils/request' // 获取锁设置 export function getLockSettingRequest(data) { return request({ - url: '/lockSetting/getLockSetting', + url: '/lock/getLockSettingData', + method: 'POST', + data + }) +} + +// 更新锁设置 +export function updateLockSettingRequest(data) { + return request({ + url: '/lockSetting/updateLockSetting', + method: 'POST', + data + }) +} + +// 更新锁名称 +export function updateLockNameRequest(data) { + return request({ + url: '/lock/updateLockName', + method: 'POST', + data + }) +} + +// 修改管理员密码 +export function updateAdminPasswordRequest(data) { + return request({ + url: '/room/modifyPwd', + method: 'POST', + data + }) +} + +// 获取分组列表 +export function getGroupListRequest(data) { + return request({ + url: '/authorizedAdmin/listGroup', + method: 'POST', + data + }) +} + +// 创建分组 +export function createGroupRequest(data) { + return request({ + url: '/keyGroup/add', + method: 'POST', + data + }) +} + +// 设置分组 +export function setGroupRequest(data) { + return request({ + url: '/keyGroup/setGroup', + method: 'POST', + data + }) +} + +// 上传锁数据 +export function lockDataUploadRequest(data) { + return request({ + url: '/lockRecords/lockDataUpload', method: 'POST', data }) diff --git a/manifest.json b/manifest.json index 4228f74..20de3bb 100644 --- a/manifest.json +++ b/manifest.json @@ -2,8 +2,8 @@ "name" : "wx-starlock", "appid" : "__UNI__933D519", "description" : "", - "versionName" : "1.1.3", - "versionCode" : "30", + "versionName" : "1.2.0", + "versionCode" : "31", "transformPx" : false, /* 小程序特有相关 */ "mp-weixin" : { diff --git a/pages.json b/pages.json index 2232296..b5b8379 100644 --- a/pages.json +++ b/pages.json @@ -337,6 +337,69 @@ "navigationBarTitleText": "修改有效期", "disableScroll": true } + }, + { + "path": "pages/lockInfo/lockInfo", + "style": { + "navigationBarTitleText": "基本信息", + "disableScroll": true + } + }, + { + "path": "pages/syncElec/syncElec", + "style": { + "navigationBarTitleText": "电量", + "disableScroll": true + } + }, + { + "path": "pages/selectGroup/selectGroup", + "style": { + "navigationBarTitleText": "选择分组", + "disableScroll": true + } + }, + { + "path": "pages/updateSetting/updateSetting", + "style": { + "navigationBarTitleText": "设置", + "disableScroll": true + } + }, + { + "path": "pages/lockSound/lockSound", + "style": { + "navigationBarTitleText": "锁声音", + "disableScroll": true + } + }, + { + "path": "pages/autoLock/autoLock", + "style": { + "navigationBarTitleText": "自动闭锁", + "disableScroll": true + } + }, + { + "path": "pages/faceSetting/faceSetting", + "style": { + "navigationBarTitleText": "面容开锁设置", + "disableScroll": true + } + }, + { + "path": "pages/lockDate/lockDate", + "style": { + "navigationBarTitleText": "锁时间", + "disableScroll": true + } + }, + { + "path": "pages/uploadLockData/uploadLockData", + "style": { + "navigationBarTitleText": "上传数据", + "disableScroll": true + } } ], "globalStyle": { diff --git a/pages/LockDate/LockDate.vue b/pages/LockDate/LockDate.vue new file mode 100644 index 0000000..c427167 --- /dev/null +++ b/pages/LockDate/LockDate.vue @@ -0,0 +1,112 @@ + + + + + diff --git a/pages/adminDetail/adminDetail.vue b/pages/adminDetail/adminDetail.vue index 87506bf..f0bf2a0 100644 --- a/pages/adminDetail/adminDetail.vue +++ b/pages/adminDetail/adminDetail.vue @@ -4,7 +4,7 @@ 姓名 - {{ info.keyName }} + {{ info.keyName }} @@ -88,7 +88,7 @@ {{ info.keyRight === 1 ? '取消授权会在用户APP连网后生效' - : '授权用户拥有管理员的大部分权限,比如发送要是、发送密码' + : '授权用户拥有管理员的大部分权限,比如发送钥匙、发送密码' }} diff --git a/pages/autoLock/autoLock.vue b/pages/autoLock/autoLock.vue new file mode 100644 index 0000000..36c5590 --- /dev/null +++ b/pages/autoLock/autoLock.vue @@ -0,0 +1,199 @@ + + + + + diff --git a/pages/bindCard/bindCard.vue b/pages/bindCard/bindCard.vue index cace36a..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) { @@ -67,27 +60,18 @@ }) if (code === 0) { eventChannel.emit('refresherList', {}) - $basic.backAndToast('绑卡成功', 2) + $basic.backAndToast('添加成功', 2) } else { $basic.backAndToast(message) } } 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 d272254..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) { @@ -64,27 +57,18 @@ }) if (code === 0) { eventChannel.emit('refresherList', {}) - $basic.backAndToast('绑卡成功', 2) + $basic.backAndToast('添加成功', 2) } else { $basic.backAndToast(message) } } 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 e45fe34..54a9cca 100644 --- a/pages/cardDetail/cardDetail.vue +++ b/pages/cardDetail/cardDetail.vue @@ -8,7 +8,7 @@ 姓名 - {{ info.cardName }} + {{ info.cardName }} @@ -192,6 +192,10 @@ } const changeCoerced = async () => { + const netWork = await $basic.getNetworkType() + if (!netWork) { + return + } if (pending.value) return pending.value = true uni.showLoading({ 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 ba08013..d08fcd1 100644 --- a/pages/createAdmin/createAdmin.vue +++ b/pages/createAdmin/createAdmin.vue @@ -43,6 +43,9 @@ @change="changeAdmin('permanent', $event)" > + + 授权管理员拥有操作这把锁的重要权限,请确保只发给你信任的人 + 发送 @@ -50,13 +53,13 @@ :value="temporaryAccount" title="接收者" placeholder="请输入手机号或者邮箱" - @change-input="changeAccount('permanent', $event)" + @change-input="changeAccount('temporary', $event)" > @@ -74,7 +76,6 @@ :value="temporaryEndTime" :minDate="minDate" :maxDate="maxDate" - type="datehour" @change-time="changeDate('temporaryEndTime', $event)" > @@ -83,9 +84,12 @@ :value="temporaryManageSelf" title="仅管理自己创建的用户" :tip="tip" - @change="changeAdmin('permanent', $event)" + @change="changeAdmin('temporary', $event)" > + + 授权管理员拥有操作这把锁的重要权限,请确保只发给你信任的人 + 发送 diff --git a/pages/createCard/createCard.vue b/pages/createCard/createCard.vue index 8bef323..043c19c 100644 --- a/pages/createCard/createCard.vue +++ b/pages/createCard/createCard.vue @@ -29,7 +29,7 @@ placeholder="请输入" @change-input="changeName('permanent', $event)" > - + - + - + - + - + - + - + - + - + - 单次钥匙有效期为1小时,只能使用一次 + 单次钥匙有效期为1小时,只能使用一次 + + 小程序暂不支持邮箱登录,若接收者账号为邮箱可先使用星星锁APP登录,绑定手机号后可使用小程序登录 + 发送 @@ -108,7 +111,10 @@ - 接收者可以在有效期内的固定时间段里,不限次数使用 + 接收者可以在有效期内的固定时间段里,不限次数使用 + 小程序暂不支持邮箱登录,若接收者账号为邮箱可先使用星星锁APP登录,绑定手机号后可使用小程序登录 发送 diff --git a/pages/createPalmVein/createPalmVein.vue b/pages/createPalmVein/createPalmVein.vue index fa7e295..134e4be 100644 --- a/pages/createPalmVein/createPalmVein.vue +++ b/pages/createPalmVein/createPalmVein.vue @@ -29,7 +29,7 @@ placeholder="请输入" @change-input="changeName('permanent', $event)" > - + - + - + import { getCurrentInstance, ref } from 'vue' import { onLoad } from '@dcloudio/uni-app' + import { timeFormat } from 'uview-plus' import { useBasicStore } from '@/stores/basic' import { useUserStore } from '@/stores/user' import { useBluetoothStore } from '@/stores/bluetooth' import { checkPalmVeinNameRequest } from '@/api/palmVein' - import { timeFormat } from 'uview-plus' const instance = getCurrentInstance().proxy const eventChannel = instance.getOpenerEventChannel() diff --git a/pages/createPassword/createPassword.vue b/pages/createPassword/createPassword.vue index 121dceb..77be4d1 100644 --- a/pages/createPassword/createPassword.vue +++ b/pages/createPassword/createPassword.vue @@ -98,7 +98,7 @@ @change-time="changeDate('customEndTime', $event)" > - + 姓名 - {{ 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/faceSetting/faceSetting.vue b/pages/faceSetting/faceSetting.vue new file mode 100644 index 0000000..3a5d219 --- /dev/null +++ b/pages/faceSetting/faceSetting.vue @@ -0,0 +1,200 @@ + + + + + diff --git a/pages/fingerprintDetail/fingerprintDetail.vue b/pages/fingerprintDetail/fingerprintDetail.vue index dd98602..a92bb14 100644 --- a/pages/fingerprintDetail/fingerprintDetail.vue +++ b/pages/fingerprintDetail/fingerprintDetail.vue @@ -8,7 +8,7 @@ 姓名 - {{ info.fingerprintName }} + {{ info.fingerprintName }} @@ -134,6 +134,10 @@ } const changeCoerced = async () => { + const netWork = await $basic.getNetworkType() + if (!netWork) { + return + } if (pending.value) return pending.value = true uni.showLoading({ 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/home/home.vue b/pages/home/home.vue index 5135757..6e35b2c 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -518,6 +518,13 @@ this.getBluetoothStatus() return } + if (lock.keyStatus === 110403) { + uni.showToast({ + title: '您的钥匙未生效', + icon: 'none' + }) + return + } if (lock.keyStatus === 110412) { uni.showToast({ title: '钥匙已过期', diff --git a/pages/keyDetail/keyDetail.vue b/pages/keyDetail/keyDetail.vue index f0e8dd3..361cfd1 100644 --- a/pages/keyDetail/keyDetail.vue +++ b/pages/keyDetail/keyDetail.vue @@ -3,7 +3,9 @@ 姓名 - {{ $lock.currentKeyInfo.keyName }} + {{ + $lock.currentKeyInfo.keyName + }} @@ -91,11 +93,17 @@ {{ $lock.currentKeyInfo.keyStatus === 110405 ? '解冻' : '冻结' }} {{ $lock.currentKeyInfo.keyRight === 1 ? '取消授权管理员' : '授权管理员' }}{{ $lock.currentKeyInfo.keyRight === 1 ? '取消授权会在用户APP连网后生效' - : '授权用户拥有管理员的大部分权限,比如发送要是、发送密码' + : '授权用户拥有管理员的大部分权限,比如发送钥匙、发送密码' }} diff --git a/pages/keyList/keyList.vue b/pages/keyList/keyList.vue index 0d4584f..c178da9 100644 --- a/pages/keyList/keyList.vue +++ b/pages/keyList/keyList.vue @@ -176,7 +176,7 @@ mask: true }) const that = this - const { code } = await deleteKeyRequest({ + const { code, message } = await deleteKeyRequest({ keyId: that.deleteKeyId, includeUnderlings: that.checked ? 1 : 0 }) @@ -195,7 +195,7 @@ } else { uni.hideLoading() uni.showToast({ - title: 'message', + title: message, icon: 'none' }) } diff --git a/pages/lockDetail/lockDetail.vue b/pages/lockDetail/lockDetail.vue index cf7ce48..7dda053 100644 --- a/pages/lockDetail/lockDetail.vue +++ b/pages/lockDetail/lockDetail.vue @@ -46,7 +46,7 @@ - + 功能 @@ -57,19 +57,19 @@ class="menu-main-view" @click="routeJump({ name: 'keyList' })" > - + 电子钥匙 - + 密码 @@ -77,7 +77,7 @@ @@ -86,7 +86,7 @@ 遥控 - + 人脸 @@ -250,7 +247,7 @@ if (this.pending) { return } - if (this.currentLockInfo.lockSetting.appUnlockOnline) { + if (this.currentLockInfo.lockSetting.appUnlockOnline && type !== 'close') { const netWork = await this.getNetworkType() if (!netWork) { return @@ -265,7 +262,7 @@ icon: 'none' }) } - if (this.currentLockInfo.lockSetting.appUnlockOnline) { + if (this.currentLockInfo.lockSetting.appUnlockOnline && type !== 'close') { const result = await this.getNetToken() if (!result) { this.$refs.loading.close() @@ -322,9 +319,14 @@ this.backAndToast('单次钥匙已在被使用后删除', 1) } } + } else if (code === 7) { + uni.showToast({ + title: `钥匙过期`, + icon: 'none' + }) } else if (code === 13) { uni.showToast({ - title: `只能在循环时间内操作门锁`, + title: `钥匙当前不可用`, icon: 'none' }) } else if (code === -1) { @@ -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; } } } diff --git a/pages/lockInfo/lockInfo.vue b/pages/lockInfo/lockInfo.vue new file mode 100644 index 0000000..f730cd0 --- /dev/null +++ b/pages/lockInfo/lockInfo.vue @@ -0,0 +1,272 @@ + + + + + diff --git a/pages/lockSound/lockSound.vue b/pages/lockSound/lockSound.vue new file mode 100644 index 0000000..50419a6 --- /dev/null +++ b/pages/lockSound/lockSound.vue @@ -0,0 +1,138 @@ + + + + + diff --git a/pages/palmVeinDetail/palmVeinDetail.vue b/pages/palmVeinDetail/palmVeinDetail.vue index e3f3332..f288796 100644 --- a/pages/palmVeinDetail/palmVeinDetail.vue +++ b/pages/palmVeinDetail/palmVeinDetail.vue @@ -8,7 +8,7 @@ 姓名 - {{ info.palmVeinName }} + {{ info.palmVeinName }} @@ -126,6 +126,10 @@ const pending = ref(false) const changeCoerced = async () => { + const netWork = await $basic.getNetworkType() + if (!netWork) { + return + } if (pending.value) return pending.value = true uni.showLoading({ 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 b91af60..aba3be3 100644 --- a/pages/passwordDetail/passwordDetail.vue +++ b/pages/passwordDetail/passwordDetail.vue @@ -18,7 +18,9 @@ 姓名 - {{ $lock.currentPasswordInfo.keyboardPwdName }} + {{ + $lock.currentPasswordInfo.keyboardPwdName + }} @@ -52,7 +54,11 @@ timeFormat($lock.currentPasswordInfo.sendDate, 'yyyy-mm-dd h:M') }} - + 是否为管理员 - + 操作记录 + + 密码生成后,请在当日23:59前使用一次进行激活,否则过0点后未激活则失效。 + 删除 日期: - + 事件: - + + + + - - 清空记录 - 同步记录 + + 清空记录 + + 同步记录 @@ -138,6 +157,15 @@ videoContext.requestFullScreen({ direction: 0 }) } + const tip = () => { + uni.showModal({ + title: '操作记录未显示', + content: '锁未联网,开门记录无法实时上传,可以点击同步记录进行读取', + showCancel: false, + confirmText: '我知道了' + }) + } + const previewImage = url => { uni.previewImage({ urls: [url] @@ -305,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 @@ 姓名 - {{ 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/selectGroup/selectGroup.vue b/pages/selectGroup/selectGroup.vue new file mode 100644 index 0000000..71364b3 --- /dev/null +++ b/pages/selectGroup/selectGroup.vue @@ -0,0 +1,140 @@ + + + + + diff --git a/pages/setting/setting.vue b/pages/setting/setting.vue index a97ba60..c79845f 100644 --- a/pages/setting/setting.vue +++ b/pages/setting/setting.vue @@ -1,98 +1,178 @@ - - - diff --git a/pages/syncElec/syncElec.vue b/pages/syncElec/syncElec.vue new file mode 100644 index 0000000..3260f22 --- /dev/null +++ b/pages/syncElec/syncElec.vue @@ -0,0 +1,115 @@ + + + diff --git a/pages/temporaryDate/temporaryDate.vue b/pages/temporaryDate/temporaryDate.vue index 3474f30..ca4f7b8 100644 --- a/pages/temporaryDate/temporaryDate.vue +++ b/pages/temporaryDate/temporaryDate.vue @@ -133,6 +133,19 @@ return } + if (endDate.value <= new Date().getTime()) { + uni.showToast({ + title: '失效时间需晚于当前时间', + icon: 'none' + }) + return + } + + const netWork = await $basic.getNetworkType() + if (!netWork) { + return + } + if (pending.value) { return } 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 @@