Merge branch 'develop_liuyf' into 'develop'
提测bug修复 See merge request StarlockTeam/wx-starlock!30
This commit is contained in:
commit
fe4d6eab5c
@ -7,9 +7,9 @@
|
|||||||
{{
|
{{
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0]
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0]
|
||||||
? catEyeMode[
|
? catEyeMode[
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0]?.catEyeMode - 1
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0]?.catEyeMode
|
||||||
].name
|
].name
|
||||||
: ''
|
: ""
|
||||||
}}
|
}}
|
||||||
</view>
|
</view>
|
||||||
<up-icon name="arrow-right"></up-icon>
|
<up-icon name="arrow-right"></up-icon>
|
||||||
@ -75,7 +75,7 @@
|
|||||||
const value = computed(() => {
|
const value = computed(() => {
|
||||||
const list = []
|
const list = []
|
||||||
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0]) {
|
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0]) {
|
||||||
list.push($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode - 1)
|
list.push($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode)
|
||||||
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 4) {
|
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 4) {
|
||||||
if (
|
if (
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeModeConfig
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeModeConfig
|
||||||
|
|||||||
@ -3,6 +3,58 @@
|
|||||||
<view
|
<view
|
||||||
@click="updateCatEyeConfig(0)"
|
@click="updateCatEyeConfig(0)"
|
||||||
class="flex items-center bg-#ececec py-4 pr-2 pl-1 mx-3 my-6 rounded-2xl"
|
class="flex items-center bg-#ececec py-4 pr-2 pl-1 mx-3 my-6 rounded-2xl"
|
||||||
|
:class="[
|
||||||
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
||||||
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 0
|
||||||
|
? 'bg-#d9e8fd'
|
||||||
|
: 'bg-#ececec'
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
<view class="w-80 h-full flex items-center justify-center">
|
||||||
|
<up-icon
|
||||||
|
v-if="
|
||||||
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
||||||
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 0
|
||||||
|
"
|
||||||
|
name="checkbox-mark"
|
||||||
|
color="#2a85ec"
|
||||||
|
size="40"
|
||||||
|
></up-icon>
|
||||||
|
</view>
|
||||||
|
<view class="flex-1">
|
||||||
|
<view
|
||||||
|
class="text-lg font-bold"
|
||||||
|
:class="[
|
||||||
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
||||||
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 0
|
||||||
|
? 'text-#2a85ec'
|
||||||
|
: 'text-black'
|
||||||
|
]"
|
||||||
|
>{{ catEyeMode[0].name }}:</view
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
:class="[
|
||||||
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
||||||
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 0
|
||||||
|
? 'text-#2a85ec'
|
||||||
|
: 'text-gray-500'
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
<view class="text-sm"> 适合门口较为安全的环境。</view>
|
||||||
|
<view class="text-sm">仅发生特定事件才录像,并可查看实时画面。</view>
|
||||||
|
<view class="text-sm">一般情况下,满电可使用7-8个月</view></view
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
@click.stop="updateType(0)"
|
||||||
|
class="text-gray-500 border-2 border-solid border-gray-500 py-1 px-1 text-sm rounded-3xl w-80 ml-1 text-center"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
@click="updateCatEyeConfig(1)"
|
||||||
|
class="flex items-center bg-#ececec py-4 pr-2 pl-1 mx-3 my-6 rounded-2xl"
|
||||||
:class="[
|
:class="[
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 1
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 1
|
||||||
@ -30,7 +82,8 @@
|
|||||||
? 'text-#2a85ec'
|
? 'text-#2a85ec'
|
||||||
: 'text-black'
|
: 'text-black'
|
||||||
]"
|
]"
|
||||||
>{{ catEyeMode[0].name }}:</view
|
>
|
||||||
|
{{ catEyeMode[1].name }}:</view
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
:class="[
|
:class="[
|
||||||
@ -40,20 +93,19 @@
|
|||||||
: 'text-gray-500'
|
: 'text-gray-500'
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<view class="text-sm"> 适合门口较为安全的环境。</view>
|
<view class="text-sm"> 有人逗留或发生特定事件才录像,可随时查看实时画面。</view>
|
||||||
<view class="text-sm">仅发生特定事件才录像,并可查看实时画面。</view>
|
<view class="text-sm">一般情况下,满电可使用5~6个月。</view></view
|
||||||
<view class="text-sm">一般情况下,满电可使用7-8个月</view></view
|
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
@click.stop="updateType(0)"
|
@click.stop="updateType(1)"
|
||||||
class="text-gray-500 border-2 border-solid border-gray-500 py-1 px-1 text-sm rounded-3xl w-80 ml-1 text-center"
|
class="text-gray-500 border-2 border-solid border-gray-500 py-1 px-1 text-sm rounded-3xl w-80 ml-1 text-center"
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
@click="updateCatEyeConfig(1)"
|
@click="updateCatEyeConfig(2)"
|
||||||
class="flex items-center bg-#ececec py-4 pr-2 pl-1 mx-3 my-6 rounded-2xl"
|
class="flex items-center bg-#ececec py-4 pr-2 pl-1 mx-3 my-6 rounded-2xl"
|
||||||
:class="[
|
:class="[
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
||||||
@ -82,8 +134,7 @@
|
|||||||
? 'text-#2a85ec'
|
? 'text-#2a85ec'
|
||||||
: 'text-black'
|
: 'text-black'
|
||||||
]"
|
]"
|
||||||
>
|
>{{ catEyeMode[2].name }}:</view
|
||||||
{{ catEyeMode[1].name }}:</view
|
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
:class="[
|
:class="[
|
||||||
@ -93,19 +144,20 @@
|
|||||||
: 'text-gray-500'
|
: 'text-gray-500'
|
||||||
]"
|
]"
|
||||||
>
|
>
|
||||||
<view class="text-sm"> 有人逗留或发生特定事件才录像,可随时查看实时画面。</view>
|
<view class="text-sm"> 适合门口人员复杂、较不安全的环境。</view>
|
||||||
<view class="text-sm">一般情况下,满电可使用5~6个月。</view></view
|
<view class="text-sm">有人出现就录像,可随时查看实时画面。</view>
|
||||||
|
<view class="text-sm">一般情况下,满电可使用2~4个月。</view></view
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
@click.stop="updateType(1)"
|
@click.stop="updateType(2)"
|
||||||
class="text-gray-500 border-2 border-solid border-gray-500 py-1 px-1 text-sm rounded-3xl w-80 ml-1 text-center"
|
class="text-gray-500 border-2 border-solid border-gray-500 py-1 px-1 text-sm rounded-3xl w-80 ml-1 text-center"
|
||||||
>
|
>
|
||||||
查看
|
查看
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
@click="updateCatEyeConfig(2)"
|
@click="updateCatEyeConfig(3)"
|
||||||
class="flex items-center bg-#ececec py-4 pr-2 pl-1 mx-3 my-6 rounded-2xl"
|
class="flex items-center bg-#ececec py-4 pr-2 pl-1 mx-3 my-6 rounded-2xl"
|
||||||
:class="[
|
:class="[
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
||||||
@ -134,64 +186,12 @@
|
|||||||
? 'text-#2a85ec'
|
? 'text-#2a85ec'
|
||||||
: 'text-black'
|
: 'text-black'
|
||||||
]"
|
]"
|
||||||
>{{ catEyeMode[2].name }}:</view
|
|
||||||
>
|
|
||||||
<view
|
|
||||||
:class="[
|
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 3
|
|
||||||
? 'text-#2a85ec'
|
|
||||||
: 'text-gray-500'
|
|
||||||
]"
|
|
||||||
>
|
|
||||||
<view class="text-sm"> 适合门口人员复杂、较不安全的环境。</view>
|
|
||||||
<view class="text-sm">有人出现就录像,可随时查看实时画面。</view>
|
|
||||||
<view class="text-sm">一般情况下,满电可使用2~4个月。</view></view
|
|
||||||
>
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
@click.stop="updateType(2)"
|
|
||||||
class="text-gray-500 border-2 border-solid border-gray-500 py-1 px-1 text-sm rounded-3xl w-80 ml-1 text-center"
|
|
||||||
>
|
|
||||||
查看
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view
|
|
||||||
@click="updateCatEyeConfig(3)"
|
|
||||||
class="flex items-center bg-#ececec py-4 pr-2 pl-1 mx-3 my-6 rounded-2xl"
|
|
||||||
:class="[
|
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 4
|
|
||||||
? 'bg-#d9e8fd'
|
|
||||||
: 'bg-#ececec'
|
|
||||||
]"
|
|
||||||
>
|
|
||||||
<view class="w-80 h-full flex items-center justify-center">
|
|
||||||
<up-icon
|
|
||||||
v-if="
|
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 4
|
|
||||||
"
|
|
||||||
name="checkbox-mark"
|
|
||||||
color="#2a85ec"
|
|
||||||
size="40"
|
|
||||||
></up-icon>
|
|
||||||
</view>
|
|
||||||
<view class="flex-1">
|
|
||||||
<view
|
|
||||||
class="text-lg font-bold"
|
|
||||||
:class="[
|
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 4
|
|
||||||
? 'text-#2a85ec'
|
|
||||||
: 'text-black'
|
|
||||||
]"
|
|
||||||
>{{ catEyeMode[3].name }}:</view
|
>{{ catEyeMode[3].name }}:</view
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
:class="[
|
:class="[
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 4
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 3
|
||||||
? 'text-#2a85ec'
|
? 'text-#2a85ec'
|
||||||
: 'text-gray-500'
|
: 'text-gray-500'
|
||||||
]"
|
]"
|
||||||
@ -263,7 +263,7 @@
|
|||||||
const value = computed(() => {
|
const value = computed(() => {
|
||||||
const list = []
|
const list = []
|
||||||
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0]) {
|
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0]) {
|
||||||
list.push($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode - 1)
|
list.push($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode)
|
||||||
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 4) {
|
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 4) {
|
||||||
if (
|
if (
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeModeConfig
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeModeConfig
|
||||||
@ -331,7 +331,7 @@
|
|||||||
const toCustom = () => {
|
const toCustom = () => {
|
||||||
if (
|
if (
|
||||||
!$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] ||
|
!$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] ||
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode !== 4
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode !== 3
|
||||||
) {
|
) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请先选择自定义模式',
|
title: '请先选择自定义模式',
|
||||||
@ -352,7 +352,7 @@
|
|||||||
const updateCatEyeConfig = index => {
|
const updateCatEyeConfig = index => {
|
||||||
if (
|
if (
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0] &&
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === index + 1
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === index
|
||||||
) {
|
) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -363,7 +363,7 @@
|
|||||||
type: 'catEyeConfig',
|
type: 'catEyeConfig',
|
||||||
params: [
|
params: [
|
||||||
{
|
{
|
||||||
catEyeMode: index + 1,
|
catEyeMode: index,
|
||||||
catEyeModeConfig: $bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0]
|
catEyeModeConfig: $bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0]
|
||||||
? $bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeModeConfig
|
? $bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeModeConfig
|
||||||
: {
|
: {
|
||||||
|
|||||||
@ -105,8 +105,8 @@
|
|||||||
const value = computed(() => {
|
const value = computed(() => {
|
||||||
const list = []
|
const list = []
|
||||||
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0]) {
|
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0]) {
|
||||||
list.push($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode - 1)
|
list.push($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode)
|
||||||
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 4) {
|
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 3) {
|
||||||
if (
|
if (
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeModeConfig
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeModeConfig
|
||||||
.recordStartTime === 0 &&
|
.recordStartTime === 0 &&
|
||||||
|
|||||||
@ -60,7 +60,7 @@
|
|||||||
const pending = ref(false)
|
const pending = ref(false)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
value.value = $bluetooth.currentLockSetting.lockSettingInfo.openDirection
|
value.value = $bluetooth.currentLockSetting.lockSettingInfo.openDirectionValue
|
||||||
})
|
})
|
||||||
|
|
||||||
const updateValue = async val => {
|
const updateValue = async val => {
|
||||||
|
|||||||
@ -24,8 +24,8 @@
|
|||||||
:class="[weekDays.includes(index + 1) ? 'bg-#5eb7ac text-white' : '']"
|
:class="[weekDays.includes(index + 1) ? 'bg-#5eb7ac text-white' : '']"
|
||||||
@click="changeSelect(index)"
|
@click="changeSelect(index)"
|
||||||
class="rounded-50% border-solid border-3 border-gray-400 flex items-center justify-center w-70 h-70"
|
class="rounded-50% border-solid border-3 border-gray-400 flex items-center justify-center w-70 h-70"
|
||||||
>{{ item }}</view
|
>{{ item }}
|
||||||
>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -116,8 +116,8 @@
|
|||||||
const defaultStartTime = ref('')
|
const defaultStartTime = ref('')
|
||||||
const defaultEndTime = ref('')
|
const defaultEndTime = ref('')
|
||||||
|
|
||||||
const startTimeText = ref(null)
|
const startTimeText = ref('00:00')
|
||||||
const endTimeText = ref(null)
|
const endTimeText = ref('00:00')
|
||||||
|
|
||||||
const check = ref(false)
|
const check = ref(false)
|
||||||
const weekDays = ref([])
|
const weekDays = ref([])
|
||||||
@ -201,7 +201,7 @@
|
|||||||
autoUnlock: autoUnlock.value
|
autoUnlock: autoUnlock.value
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check.value && data.startDate >= data.endDate) {
|
if (check.value && data.startDate > data.endDate) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '开始时间不能大于结束时间',
|
title: '开始时间不能大于结束时间',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
|
|||||||
@ -108,7 +108,7 @@
|
|||||||
const value = computed(() => {
|
const value = computed(() => {
|
||||||
const list = []
|
const list = []
|
||||||
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0]) {
|
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0]) {
|
||||||
list.push($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode - 1)
|
list.push($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode)
|
||||||
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 4) {
|
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 4) {
|
||||||
if (
|
if (
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeModeConfig
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeModeConfig
|
||||||
|
|||||||
@ -5,7 +5,9 @@
|
|||||||
@click="toJump('lockInfo')"
|
@click="toJump('lockInfo')"
|
||||||
>
|
>
|
||||||
<view class="item-title">基本信息</view>
|
<view class="item-title">基本信息</view>
|
||||||
<view><up-icon name="arrow-right"></up-icon></view>
|
<view>
|
||||||
|
<up-icon name="arrow-right"></up-icon>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-2.5"></view>
|
<view class="mt-2.5"></view>
|
||||||
<view
|
<view
|
||||||
@ -128,7 +130,9 @@
|
|||||||
@click="toJump('faceSetting')"
|
@click="toJump('faceSetting')"
|
||||||
>
|
>
|
||||||
<view class="item-title">面容开锁</view>
|
<view class="item-title">面容开锁</view>
|
||||||
<view><up-icon name="arrow-right"></up-icon></view>
|
<view>
|
||||||
|
<up-icon name="arrow-right"></up-icon>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
v-if="$bluetooth.currentLockSetting.lockBasicInfo.keyRight === 1"
|
v-if="$bluetooth.currentLockSetting.lockBasicInfo.keyRight === 1"
|
||||||
@ -136,7 +140,9 @@
|
|||||||
@click="toJump('messageReminder')"
|
@click="toJump('messageReminder')"
|
||||||
>
|
>
|
||||||
<view class="item-title">消息提醒</view>
|
<view class="item-title">消息提醒</view>
|
||||||
<view><up-icon name="arrow-right"></up-icon></view>
|
<view>
|
||||||
|
<up-icon name="arrow-right"></up-icon>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
v-if="
|
v-if="
|
||||||
@ -147,7 +153,9 @@
|
|||||||
@click="toJump('catEye')"
|
@click="toJump('catEye')"
|
||||||
>
|
>
|
||||||
<view class="item-title">猫眼设置</view>
|
<view class="item-title">猫眼设置</view>
|
||||||
<view><up-icon name="arrow-right"></up-icon></view>
|
<view>
|
||||||
|
<up-icon name="arrow-right"></up-icon>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
v-if="
|
v-if="
|
||||||
@ -158,7 +166,9 @@
|
|||||||
@click="toJump('openDirection')"
|
@click="toJump('openDirection')"
|
||||||
>
|
>
|
||||||
<view class="item-title">开门方向设置</view>
|
<view class="item-title">开门方向设置</view>
|
||||||
<view><up-icon name="arrow-right"></up-icon></view>
|
<view>
|
||||||
|
<up-icon name="arrow-right"></up-icon>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
v-if="
|
v-if="
|
||||||
@ -169,7 +179,9 @@
|
|||||||
@click="toJump('motorTorsion')"
|
@click="toJump('motorTorsion')"
|
||||||
>
|
>
|
||||||
<view class="item-title">电机功率设置</view>
|
<view class="item-title">电机功率设置</view>
|
||||||
<view><up-icon name="arrow-right"></up-icon></view>
|
<view>
|
||||||
|
<up-icon name="arrow-right"></up-icon>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mt-2.5"></view>
|
<view class="mt-2.5"></view>
|
||||||
<view
|
<view
|
||||||
@ -209,7 +221,9 @@
|
|||||||
@click="toJump('lockDate')"
|
@click="toJump('lockDate')"
|
||||||
>
|
>
|
||||||
<view class="item-title">锁时间</view>
|
<view class="item-title">锁时间</view>
|
||||||
<view><up-icon name="arrow-right"></up-icon></view>
|
<view>
|
||||||
|
<up-icon name="arrow-right"></up-icon>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
v-if="$bluetooth.currentLockSetting.lockBasicInfo.keyRight === 1"
|
v-if="$bluetooth.currentLockSetting.lockBasicInfo.keyRight === 1"
|
||||||
@ -217,7 +231,9 @@
|
|||||||
@click="toJump('uploadLockData')"
|
@click="toJump('uploadLockData')"
|
||||||
>
|
>
|
||||||
<view class="item-title">上传数据</view>
|
<view class="item-title">上传数据</view>
|
||||||
<view><up-icon name="arrow-right"></up-icon></view>
|
<view>
|
||||||
|
<up-icon name="arrow-right"></up-icon>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
class="py-3 px-4 bg-white flex items-center justify-between text-base mt-4rpx"
|
class="py-3 px-4 bg-white flex items-center justify-between text-base mt-4rpx"
|
||||||
@ -225,13 +241,15 @@
|
|||||||
@click="upgrade"
|
@click="upgrade"
|
||||||
>
|
>
|
||||||
<view class="item-title">锁升级</view>
|
<view class="item-title">锁升级</view>
|
||||||
<view><up-icon name="arrow-right"></up-icon></view>
|
<view>
|
||||||
|
<up-icon name="arrow-right"></up-icon>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
class="mt-4 rounded-3xl w-600 h-80 line-height-80rpx text-center mx-75rpx bg-#ec433c text-white text-xl font-bold"
|
class="mt-4 rounded-3xl w-600 h-80 line-height-80rpx text-center mx-75rpx bg-#ec433c text-white text-xl font-bold"
|
||||||
@click="deleteLock"
|
@click="deleteLock"
|
||||||
>删除</view
|
>删除
|
||||||
>
|
</view>
|
||||||
<up-modal
|
<up-modal
|
||||||
:show="showModal"
|
:show="showModal"
|
||||||
title="是否删除授权管理员钥匙?"
|
title="是否删除授权管理员钥匙?"
|
||||||
@ -286,6 +304,15 @@
|
|||||||
})
|
})
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
|
if (data.lockSettingInfo.catEyeConfig[0]) {
|
||||||
|
data.lockSettingInfo.catEyeConfig[0].catEyeModeConfig.recordTime = Number(
|
||||||
|
data.lockSettingInfo.catEyeConfig[0].catEyeModeConfig.recordTime
|
||||||
|
)
|
||||||
|
data.lockSettingInfo.catEyeConfig[0].catEyeModeConfig.detectionDistance = Number(
|
||||||
|
data.lockSettingInfo.catEyeConfig[0].catEyeModeConfig.detectionDistance
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
requestFinished.value = true
|
requestFinished.value = true
|
||||||
$bluetooth.updateCurrentLockSetting(data)
|
$bluetooth.updateCurrentLockSetting(data)
|
||||||
} else {
|
} else {
|
||||||
@ -323,6 +350,14 @@
|
|||||||
lockId: $bluetooth.currentLockInfo.lockId
|
lockId: $bluetooth.currentLockInfo.lockId
|
||||||
})
|
})
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
|
if (data.lockSettingInfo.catEyeConfig[0]) {
|
||||||
|
data.lockSettingInfo.catEyeConfig[0].catEyeModeConfig.recordTime = Number(
|
||||||
|
data.lockSettingInfo.catEyeConfig[0].catEyeModeConfig.recordTime
|
||||||
|
)
|
||||||
|
data.lockSettingInfo.catEyeConfig[0].catEyeModeConfig.detectionDistance = Number(
|
||||||
|
data.lockSettingInfo.catEyeConfig[0].catEyeModeConfig.detectionDistance
|
||||||
|
)
|
||||||
|
}
|
||||||
$bluetooth.updateCurrentLockSetting(data)
|
$bluetooth.updateCurrentLockSetting(data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="mx-4 pt-5 text-base">
|
<view class="mx-4 pt-5 text-base">
|
||||||
<view class="text-sm">
|
<view class="text-sm">
|
||||||
<view> 本操作将上传锁内数据到服务器,过程可能需要几分钟,请耐心等待 </view>
|
<view> 本操作将上传锁内数据到服务器,过程可能需要几分钟,请耐心等待</view>
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
@click="asyncData"
|
@click="asyncData"
|
||||||
@ -19,9 +19,11 @@
|
|||||||
import { useBluetoothStore } from '@/stores/bluetooth'
|
import { useBluetoothStore } from '@/stores/bluetooth'
|
||||||
import { useUserStore } from '@/stores/user'
|
import { useUserStore } from '@/stores/user'
|
||||||
import { getLockSettingRequest, lockDataUploadRequest } from '@/api/setting'
|
import { getLockSettingRequest, lockDataUploadRequest } from '@/api/setting'
|
||||||
|
import { useBasicStore } from '@/stores/basic'
|
||||||
|
|
||||||
const $bluetooth = useBluetoothStore()
|
const $bluetooth = useBluetoothStore()
|
||||||
const $user = useUserStore()
|
const $user = useUserStore()
|
||||||
|
const $basic = useBasicStore()
|
||||||
|
|
||||||
const progress = ref(0)
|
const progress = ref(0)
|
||||||
const page = ref(0)
|
const page = ref(0)
|
||||||
@ -34,6 +36,10 @@
|
|||||||
|
|
||||||
const asyncData = async (flag = false) => {
|
const asyncData = async (flag = false) => {
|
||||||
if (pending.value && !flag) return
|
if (pending.value && !flag) return
|
||||||
|
const netWork = await $basic.getNetworkType()
|
||||||
|
if (!netWork) {
|
||||||
|
return
|
||||||
|
}
|
||||||
pending.value = true
|
pending.value = true
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: `上传中${progress.value}/7`
|
title: `上传中${progress.value}/7`
|
||||||
@ -45,6 +51,7 @@
|
|||||||
uid: $user.userInfo.uid.toString(),
|
uid: $user.userInfo.uid.toString(),
|
||||||
countReq: 10
|
countReq: 10
|
||||||
})
|
})
|
||||||
|
console.log('code value :', code)
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
if (typeList[progress.value] === 'setting') {
|
if (typeList[progress.value] === 'setting') {
|
||||||
const { code: resultCode } = await lockDataUploadRequest({
|
const { code: resultCode } = await lockDataUploadRequest({
|
||||||
@ -60,6 +67,14 @@
|
|||||||
lockId: $bluetooth.currentLockInfo.lockId
|
lockId: $bluetooth.currentLockInfo.lockId
|
||||||
})
|
})
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
|
if (data.lockSettingInfo.catEyeConfig[0]) {
|
||||||
|
data.lockSettingInfo.catEyeConfig[0].catEyeModeConfig.recordTime = Number(
|
||||||
|
data.lockSettingInfo.catEyeConfig[0].catEyeModeConfig.recordTime
|
||||||
|
)
|
||||||
|
data.lockSettingInfo.catEyeConfig[0].catEyeModeConfig.detectionDistance = Number(
|
||||||
|
data.lockSettingInfo.catEyeConfig[0].catEyeModeConfig.detectionDistance
|
||||||
|
)
|
||||||
|
}
|
||||||
$bluetooth.updateCurrentLockSetting(data)
|
$bluetooth.updateCurrentLockSetting(data)
|
||||||
}
|
}
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@ -99,12 +114,16 @@
|
|||||||
progress.value++
|
progress.value++
|
||||||
}
|
}
|
||||||
await asyncData(true)
|
await asyncData(true)
|
||||||
|
} else if (code === -21) {
|
||||||
|
pending.value = false
|
||||||
|
$bluetooth.closeBluetoothConnection()
|
||||||
|
uni.hideLoading()
|
||||||
} else {
|
} else {
|
||||||
pending.value = false
|
pending.value = false
|
||||||
$bluetooth.closeBluetoothConnection()
|
$bluetooth.closeBluetoothConnection()
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '上传失败,请重试',
|
title: '上传失败,请保持在锁附近',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -101,7 +101,7 @@
|
|||||||
const value = computed(() => {
|
const value = computed(() => {
|
||||||
const list = []
|
const list = []
|
||||||
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0]) {
|
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0]) {
|
||||||
list.push($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode - 1)
|
list.push($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode)
|
||||||
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 4) {
|
if ($bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeMode === 4) {
|
||||||
if (
|
if (
|
||||||
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeModeConfig
|
$bluetooth.currentLockSetting.lockSettingInfo.catEyeConfig[0].catEyeModeConfig
|
||||||
|
|||||||
@ -551,10 +551,10 @@ export const useBluetoothStore = defineStore('ble', {
|
|||||||
})
|
})
|
||||||
break
|
break
|
||||||
case subCmdIds.updateSetting:
|
case subCmdIds.updateSetting:
|
||||||
that.updateCurrentLockInfo({
|
// that.updateCurrentLockInfo({
|
||||||
...that.currentLockInfo,
|
// ...that.currentLockInfo,
|
||||||
token: decrypted.slice(5, 9)
|
// token: decrypted.slice(5, 9)
|
||||||
})
|
// })
|
||||||
characteristicValueCallback({
|
characteristicValueCallback({
|
||||||
code: decrypted[2]
|
code: decrypted[2]
|
||||||
})
|
})
|
||||||
@ -797,6 +797,9 @@ export const useBluetoothStore = defineStore('ble', {
|
|||||||
if (uuid && uuid.slice(2, 8) === '758824' && uuid.slice(30, 32) === '00') {
|
if (uuid && uuid.slice(2, 8) === '758824' && uuid.slice(30, 32) === '00') {
|
||||||
that.deviceList.push(deviceList[i])
|
that.deviceList.push(deviceList[i])
|
||||||
}
|
}
|
||||||
|
if (uuid && uuid.slice(0, 2) === '75' && uuid.slice(4, 6) === '00') {
|
||||||
|
that.deviceList.push(deviceList[i])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('设备列表', that.deviceList)
|
console.log('设备列表', that.deviceList)
|
||||||
@ -1073,6 +1076,11 @@ export const useBluetoothStore = defineStore('ble', {
|
|||||||
for (let i = 0; i < deviceList.length; i++) {
|
for (let i = 0; i < deviceList.length; i++) {
|
||||||
if (deviceList[i]?.name === that.currentLockInfo.name) {
|
if (deviceList[i]?.name === that.currentLockInfo.name) {
|
||||||
const uuid = deviceList[i]?.advertisServiceUUIDs[0]
|
const uuid = deviceList[i]?.advertisServiceUUIDs[0]
|
||||||
|
if (uuid && uuid.slice(2, 8) === '758824') {
|
||||||
|
console.log('设备UUID', uuid, uuid.slice(2, 8), uuid.slice(30, 32))
|
||||||
|
} else if (uuid && uuid.slice(0, 2) === '75') {
|
||||||
|
console.log('设备UUID', uuid, uuid.slice(2, 8), uuid.slice(4, 6))
|
||||||
|
}
|
||||||
if (
|
if (
|
||||||
uuid &&
|
uuid &&
|
||||||
uuid.slice(2, 8) === '758824' &&
|
uuid.slice(2, 8) === '758824' &&
|
||||||
@ -1106,6 +1114,30 @@ export const useBluetoothStore = defineStore('ble', {
|
|||||||
code: -2
|
code: -2
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
|
} else if (uuid && uuid.slice(0, 2) === '75' && uuid.slice(4, 6) === '01') {
|
||||||
|
uni.stopBluetoothDevicesDiscovery()
|
||||||
|
clearTimeout(timer2)
|
||||||
|
clearInterval(timer1)
|
||||||
|
resolve({
|
||||||
|
code: 0,
|
||||||
|
data: {
|
||||||
|
deviceId: deviceList[i].deviceId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
break
|
||||||
|
} else if (uuid && uuid.slice(0, 2) === '75' && uuid.slice(4, 6) === '00') {
|
||||||
|
uni.stopBluetoothDevicesDiscovery()
|
||||||
|
clearTimeout(timer2)
|
||||||
|
clearInterval(timer1)
|
||||||
|
uni.hideLoading()
|
||||||
|
uni.showToast({
|
||||||
|
title: '锁已被重置,请重新绑定',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
resolve({
|
||||||
|
code: -2
|
||||||
|
})
|
||||||
|
break
|
||||||
} else {
|
} else {
|
||||||
uni.stopBluetoothDevicesDiscovery()
|
uni.stopBluetoothDevicesDiscovery()
|
||||||
clearTimeout(timer2)
|
clearTimeout(timer2)
|
||||||
@ -1475,7 +1507,7 @@ export const useBluetoothStore = defineStore('ble', {
|
|||||||
console.log('写入未执行', this.bluetoothStatus)
|
console.log('写入未执行', this.bluetoothStatus)
|
||||||
this.getBluetoothStatus()
|
this.getBluetoothStatus()
|
||||||
return {
|
return {
|
||||||
code: -21
|
code: -1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2900,6 +2932,7 @@ export const useBluetoothStore = defineStore('ble', {
|
|||||||
)
|
)
|
||||||
|
|
||||||
contentArray.set(md5Array, withParams ? 71 + params.length : 71)
|
contentArray.set(md5Array, withParams ? 71 + params.length : 71)
|
||||||
|
console.log('加密前:', Array.from(contentArray))
|
||||||
|
|
||||||
const cebArray = sm4.encrypt(contentArray, this.currentLockInfo.commKey, {
|
const cebArray = sm4.encrypt(contentArray, this.currentLockInfo.commKey, {
|
||||||
mode: 'ecb',
|
mode: 'ecb',
|
||||||
@ -2919,7 +2952,7 @@ export const useBluetoothStore = defineStore('ble', {
|
|||||||
console.log('写入未执行', this.bluetoothStatus)
|
console.log('写入未执行', this.bluetoothStatus)
|
||||||
this.getBluetoothStatus()
|
this.getBluetoothStatus()
|
||||||
return {
|
return {
|
||||||
code: -21
|
code: -1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2997,7 +3030,7 @@ export const useBluetoothStore = defineStore('ble', {
|
|||||||
console.log('写入未执行', this.bluetoothStatus)
|
console.log('写入未执行', this.bluetoothStatus)
|
||||||
this.getBluetoothStatus()
|
this.getBluetoothStatus()
|
||||||
return {
|
return {
|
||||||
code: -1
|
code: -21
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user