This commit is contained in:
fengerli
2026-03-27 13:40:13 +08:00
parent dbc0ab7d0f
commit 35d6574754

View File

@ -607,7 +607,8 @@
// 开启状 // 开启状
these.deviceInfo.voiceStrobeAlarm = 1; these.deviceInfo.voiceStrobeAlarm = 1;
these.formData.sta_VoiceType = mode_alarm + '' these.formData.sta_VoiceType = mode_alarm + ''
} else if (mode_alarm == 7) { // 强制报警中,自定义语音,解除报警时,状态需要改变成未播放的状态的
} else if (mode_alarm == 7 && enable_alarm == 0) {
these.formData.sta_VoiceType !== 7 these.formData.sta_VoiceType !== 7
} else { } else {
// 关闭状态:赋值-1表示关闭 // 关闭状态:赋值-1表示关闭
@ -1079,7 +1080,10 @@
}); });
} }
}).catch(() => { }).catch(() => {
uni.showToast({ title: '下发失败,请检查蓝牙或网络', icon: 'none' }); uni.showToast({
title: '下发失败,请检查蓝牙或网络',
icon: 'none'
});
}); });
} else if (prevVoiceType === '7' && val !== '7' && val !== '-1') { } else if (prevVoiceType === '7' && val !== '7' && val !== '-1') {
// 从「播放语音」切到其它内置音色:先关播报;报警未开启时不走 forceAlarm仅 UI 预选音色 // 从「播放语音」切到其它内置音色:先关播报;报警未开启时不走 forceAlarm仅 UI 预选音色
@ -1090,7 +1094,10 @@
}; };
deviceVoiceBroadcast(data).then((res) => { deviceVoiceBroadcast(data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
uni.showToast({ title: res.msg || '已切换', icon: 'none' }); uni.showToast({
title: res.msg || '已切换',
icon: 'none'
});
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg || '操作失败', title: res.msg || '操作失败',