From 0c54f550b98c99d6bf426b7b78a361a5afb9a0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=AE=E5=BE=AE=E4=B8=80=E7=AC=91?= <709648985@qq.com> Date: Wed, 1 Apr 2026 10:17:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D100J=E8=AF=AD=E9=9F=B3?= =?UTF-8?q?=E4=BC=A0=E8=BE=93=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/100J/HBY100-J.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/100J/HBY100-J.js b/api/100J/HBY100-J.js index 76f4448..ad9604c 100644 --- a/api/100J/HBY100-J.js +++ b/api/100J/HBY100-J.js @@ -1058,6 +1058,9 @@ export function deviceUpdateVoice(data) { const hasLocalPath = effectiveLocal.length > 0 || hasBleCache; const remoteUrl = isHttpUrlString(fu) ? fu : (isHttpUrlString(lp) ? lp : ''); const fileSource = hasLocalPath ? (effectiveLocal || BLE_CACHE_SENTINEL) : (remoteUrl || null); + // 仅「没有任何云端 URL、只能靠本机路径/缓存发二进制」时禁止 4G 兜底。 + // 若列表项带 https,即使用户曾下发过而残留 put100JVoiceBleCache,仍应允许走 4G(设备按 id 拉 OSS),否则会误报「本地语音需通过蓝牙下发」。 + const no4GFallback = !remoteUrl && hasLocalPath; if (!fileSource) { console.log('[100J] 语音上传:无 fileUrl/localPath,仅 HTTP updateVoice(不会走蓝牙传文件)'); return httpExec(0).then((res) => { if (res && typeof res === 'object') res._channel = '4g'; return res; }); @@ -1083,8 +1086,8 @@ export function deviceUpdateVoice(data) { }) ); const http4g = () => httpExec(0); - // 本地文件:禁止一切 4G 兜底(含蓝牙未开时),避免仅传 id 假成功 - return execWithBleFirst(bleExec, http4g, '语音文件上传', data.onWaiting, { no4GFallback: hasLocalPath }); + // 无云端 URL 的纯本地文件:禁止 4G 兜底,避免仅传 id 假成功;有 https 时蓝牙失败可 4G + return execWithBleFirst(bleExec, http4g, '语音文件上传', data.onWaiting, { no4GFallback }); } // 100J信息 export function deviceDetail(id) {