1. 添加说明性文案
2. 修复开关门bug
This commit is contained in:
parent
e97763af57
commit
2a55f76d6a
@ -50,6 +50,7 @@
|
||||
class="button-add" @click="toSearchDevice"></image>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="tips">因智能门锁与账号绑定,登录为手机号登录</view>
|
||||
<label for="phone">
|
||||
<view class="button-login">登录</view>
|
||||
</label>
|
||||
@ -263,7 +264,6 @@ page {
|
||||
}
|
||||
|
||||
.button-login {
|
||||
margin-top: 40vh;
|
||||
border-radius: 46rpx;
|
||||
width: 650rpx;
|
||||
height: 120rpx;
|
||||
@ -388,4 +388,12 @@ page {
|
||||
margin-top: 32rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tips {
|
||||
margin-top: 40vh;
|
||||
padding: 32rpx 0;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
<view class="button-logout" @click="logout">退出</view>
|
||||
</view>
|
||||
<view v-else>
|
||||
<view class="tips">因智能门锁与账号绑定,登录为手机号登录</view>
|
||||
<label for="phone">
|
||||
<view class="button-login">登录</view>
|
||||
</label>
|
||||
@ -232,7 +233,6 @@ page {
|
||||
}
|
||||
|
||||
.button-login {
|
||||
margin-top: 40vh;
|
||||
border-radius: 46rpx;
|
||||
width: 650rpx;
|
||||
height: 120rpx;
|
||||
@ -244,4 +244,12 @@ page {
|
||||
font-size: 48rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.tips {
|
||||
margin-top: 35vh;
|
||||
padding: 32rpx 0;
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="tips">为了你的账号安全,修改账号前请先使用验证码验证</view>
|
||||
<view class="view-top">
|
||||
<input type="number" class="input" :value="verificationCode" maxlength="20" placeholder="请输入验证码"
|
||||
placeholder-class="input-placeholder" @input="updateInput"></input>
|
||||
@ -99,6 +100,12 @@ page {
|
||||
</style>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.tips {
|
||||
padding: 24rpx 32rpx 0 32rpx;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.button-verify {
|
||||
margin-top: 48rpx;
|
||||
height: 108rpx;
|
||||
|
||||
@ -644,37 +644,24 @@ export const useBluetoothStore = defineStore('ble', {
|
||||
const that = this
|
||||
let timer1
|
||||
let timer2
|
||||
const flag = true
|
||||
return new Promise((resolve) => {
|
||||
uni.startBluetoothDevicesDiscovery({
|
||||
success: function (res) {
|
||||
timer2 = setTimeout(() => {
|
||||
setTimeout(() => {
|
||||
if(flag) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '长时间未搜索到任何设备,请确认微信的附近设备权限开启后再试',
|
||||
showCancel: false,
|
||||
confirmText: '确定',
|
||||
})
|
||||
}
|
||||
uni.stopBluetoothDevicesDiscovery()
|
||||
clearInterval(timer1)
|
||||
}, 10000)
|
||||
timer1 = setInterval(() => {
|
||||
}, 10500)
|
||||
timer1 = setInterval(() => {
|
||||
uni.getBluetoothDevices({
|
||||
success(res) {
|
||||
const deviceList = res.devices
|
||||
if(deviceList.length !== 0) {
|
||||
flag = false
|
||||
}
|
||||
for(let i = 0; i < deviceList.length; i++) {
|
||||
if(deviceList[i]?.name === that.currentLockInfo.name) {
|
||||
const uuid = deviceList[i]?.advertisServiceUUIDs[0]
|
||||
if(uuid && uuid.slice(2,8)==='758824' && uuid.slice(30,32)==='01') {
|
||||
clearInterval(timer1)
|
||||
clearInterval(timer2)
|
||||
uni.stopBluetoothDevicesDiscovery()
|
||||
clearTimeout(timer2)
|
||||
clearInterval(timer1)
|
||||
resolve(deviceList[i].deviceId)
|
||||
break
|
||||
}
|
||||
@ -690,7 +677,6 @@ export const useBluetoothStore = defineStore('ble', {
|
||||
}
|
||||
})
|
||||
}, 1000)
|
||||
}, 300)
|
||||
},
|
||||
fail: async function (res) {
|
||||
console.log('开始搜索失败', res)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user