2024-10-10 17:12:14 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view>
|
|
|
|
|
|
<view class="title">摸亮触摸屏</view>
|
2025-03-27 16:57:59 +08:00
|
|
|
|
<image
|
|
|
|
|
|
src="https://oss-lock.xhjcn.ltd/mp/icon_lock_touch_screen.png"
|
|
|
|
|
|
mode="aspectFill"
|
|
|
|
|
|
class="icon"
|
|
|
|
|
|
></image>
|
2024-10-10 17:12:14 +08:00
|
|
|
|
<view class="tips">摸亮触摸屏,锁进入可添加状态,点击下一步</view>
|
|
|
|
|
|
<view @click="toSearchDevice" class="button">下一步</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
2025-03-28 16:57:35 +08:00
|
|
|
|
<script setup>
|
2025-04-08 15:33:12 +08:00
|
|
|
|
import { useBluetoothStore } from '@/stores/bluetooth'
|
|
|
|
|
|
import { useBasicStore } from '@/stores/basic'
|
2024-10-10 17:12:14 +08:00
|
|
|
|
|
2025-03-28 16:57:35 +08:00
|
|
|
|
const bluetoothStore = useBluetoothStore()
|
|
|
|
|
|
const basicStore = useBasicStore()
|
|
|
|
|
|
|
|
|
|
|
|
const toSearchDevice = async () => {
|
2025-07-29 11:07:43 +08:00
|
|
|
|
// if (bluetoothStore.bluetoothStatus !== 0) {
|
|
|
|
|
|
// bluetoothStore.getBluetoothStatus()
|
|
|
|
|
|
// return
|
|
|
|
|
|
// }
|
2025-03-28 16:57:35 +08:00
|
|
|
|
let result = true
|
2025-07-29 11:07:43 +08:00
|
|
|
|
// if (!bluetoothStore.isInitBluetooth) {
|
2025-03-28 16:57:35 +08:00
|
|
|
|
result = await bluetoothStore.initAndListenBluetooth()
|
2025-07-29 11:07:43 +08:00
|
|
|
|
// }
|
2025-03-28 16:57:35 +08:00
|
|
|
|
if (result) {
|
2025-04-29 16:43:12 +08:00
|
|
|
|
basicStore.routeJump({
|
|
|
|
|
|
type: 'redirectTo',
|
|
|
|
|
|
name: 'searchDevice'
|
|
|
|
|
|
})
|
2025-03-28 16:57:35 +08:00
|
|
|
|
} else {
|
|
|
|
|
|
bluetoothStore.checkSetting()
|
2025-02-06 11:37:41 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-10-10 17:12:14 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
2025-02-06 11:37:41 +08:00
|
|
|
|
.title {
|
|
|
|
|
|
margin-top: 200rpx;
|
|
|
|
|
|
font-size: 36rpx;
|
|
|
|
|
|
font-weight: bold;
|
2025-03-28 10:00:27 +08:00
|
|
|
|
text-align: center;
|
2025-02-06 11:37:41 +08:00
|
|
|
|
}
|
2024-10-10 17:12:14 +08:00
|
|
|
|
|
2025-02-06 11:37:41 +08:00
|
|
|
|
.icon {
|
|
|
|
|
|
width: 300rpx;
|
|
|
|
|
|
height: 300rpx;
|
|
|
|
|
|
margin: 150rpx 225rpx;
|
|
|
|
|
|
}
|
2024-10-10 17:12:14 +08:00
|
|
|
|
|
2025-02-06 11:37:41 +08:00
|
|
|
|
.tips {
|
|
|
|
|
|
margin-bottom: 100rpx;
|
2025-03-28 10:00:27 +08:00
|
|
|
|
font-size: 28rpx;
|
2025-02-06 11:37:41 +08:00
|
|
|
|
font-weight: bold;
|
2025-03-28 10:00:27 +08:00
|
|
|
|
color: #999;
|
|
|
|
|
|
text-align: center;
|
2025-02-06 11:37:41 +08:00
|
|
|
|
}
|
2024-10-10 17:12:14 +08:00
|
|
|
|
|
2025-02-06 11:37:41 +08:00
|
|
|
|
.button {
|
|
|
|
|
|
width: 600rpx;
|
|
|
|
|
|
height: 100rpx;
|
2025-03-28 10:00:27 +08:00
|
|
|
|
margin: 0 auto;
|
|
|
|
|
|
font-size: 36rpx;
|
2025-02-06 11:37:41 +08:00
|
|
|
|
line-height: 100rpx;
|
2025-03-28 10:00:27 +08:00
|
|
|
|
color: #fff;
|
2025-02-06 11:37:41 +08:00
|
|
|
|
text-align: center;
|
2025-07-29 11:07:43 +08:00
|
|
|
|
background-color: #4777ee;
|
2025-02-06 11:37:41 +08:00
|
|
|
|
border-radius: 50rpx;
|
|
|
|
|
|
}
|
2024-10-10 17:12:14 +08:00
|
|
|
|
</style>
|