From c36912716670382a8ab2f6324c82811a1ff3011a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BC=8A=E5=B8=86?= <15818603+Osborn-lyf@user.noreply.gitee.com> Date: Fri, 23 Oct 2026 11:13:26 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E8=93=9D=E7=89=99=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E5=90=8D=E7=A7=B0=E6=8A=A5=E9=94=99=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../add-device/complete/use-complete-device.ts | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/pages/add-device/complete/use-complete-device.ts b/src/pages/add-device/complete/use-complete-device.ts index 2e197dc..96d2f64 100644 --- a/src/pages/add-device/complete/use-complete-device.ts +++ b/src/pages/add-device/complete/use-complete-device.ts @@ -10,10 +10,7 @@ import { updateDeviceSettings } from '@/pages/device/settings/device-settings.ap import { buildBleDeviceName, isStandardBleDeviceName } from '@/utils/ble-device-name' import { releaseBleDevice } from '@/utils/bluetooth' import { clearZ2BleHandleCache, sendZ2BleRenameCommand } from '@/utils/z2-ble' -import { - getZ2RenameProgressLabel, - isZ2RenameSuccessful, -} from '@/utils/z2-ble-protocol' +import { getZ2RenameProgressLabel } from '@/utils/z2-ble-protocol' import { bindDevice } from '../add-device.api' import { parseId, sameId } from '@/utils/device-id' import { readStoredHomeId, saveSelectedHomeId } from '@/utils/selected-home' @@ -253,7 +250,7 @@ export function useCompleteDevice() { if (needRename) { uni.showLoading({ title: '正在同步蓝牙名称…', mask: true }) try { - const renameProgress = await sendZ2BleRenameCommand(bleDeviceId.value, bleName, { + await sendZ2BleRenameCommand(bleDeviceId.value, bleName, { timeoutMs: 25000, onProgress: (progress) => { uni.showLoading({ @@ -262,17 +259,8 @@ export function useCompleteDevice() { }) }, }) - if (!isZ2RenameSuccessful(renameProgress)) { - uni.showToast({ - title: '蓝牙名称同步未完成,将继续添加设备', - icon: 'none', - }) - } } catch { - uni.showToast({ - title: '蓝牙名称同步失败,将继续添加设备', - icon: 'none', - }) + // 蓝牙名称同步失败不影响云端绑定,静默继续 } finally { uni.hideLoading() }