From 2037d0d050417067a83b82a3f5851eba1d7c8f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E9=B9=8F?= Date: Sat, 7 Sep 2024 18:34:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=9E=E5=90=8D=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E5=BC=95=E5=AF=BC=E5=8E=BBapp=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/lockDetail/lockDetail.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pages/lockDetail/lockDetail.vue b/pages/lockDetail/lockDetail.vue index 705d81e..2d4988a 100644 --- a/pages/lockDetail/lockDetail.vue +++ b/pages/lockDetail/lockDetail.vue @@ -83,7 +83,8 @@ export default { onlineToken: '0', pending: false, show: false, - type: '' + type: '', + serverTime: 0 } }, computed: { @@ -133,12 +134,13 @@ export default { async getServeTime() { const { code, data } = await this.updateServerTimestamp() if(code === 0) { + this.serverTime = data.date this.time = parseInt((data.date - new Date().getTime()) / 1000) } }, async openDoorOperate(type) { if(this.currentLockInfo.faceAuthentication === 1 && - this.currentLockInfo.nextFaceValidateTime <= new Date().getTime()) { + this.currentLockInfo.nextFaceValidateTime <= this.serverTime) { uni.showModal({ title: '提示', content: '开门前需进行实名认证,小程序暂不支持,请使用APP认证开门',