1
0
forked from dyf/APP
This commit is contained in:
fengerli
2026-04-01 15:46:42 +08:00
parent d687a53ea1
commit 6ba4df49c1

View File

@ -1097,6 +1097,7 @@
});
});
} else if (prevVoiceType === '7' && val !== '7' && val !== '-1') {
console.log('走到这里了没有');
// 从「播放语音」切到其它内置音色:先关播报;报警未开启时不走 forceAlarm仅 UI 预选音色
const data = {
deviceId: this.deviceInfo.deviceId,
@ -1105,14 +1106,16 @@
voiceStrobeAlarm: this.deviceInfo.voiceStrobeAlarm
};
deviceVoiceBroadcast(data).then((res) => {
this.formData.sta_VoiceType = val
if (res.code == 200) {
uni.showToast({
title: res.msg || '已切换',
title: res.msg,
icon: 'none'
});
} else {
uni.showToast({
title: res.msg || '操作失败',
title: res.msg,
icon: 'none'
});
}
@ -1132,11 +1135,17 @@
const isClose = item === 0;
// 与「已解除不再重复关报警」对称:已在报警中不再弹窗重复下发「开启」,未报警时不再重复「解除」
if (!isClose && this.deviceInfo.voiceStrobeAlarm === 1) {
uni.showToast({ title: '当前已在报警中', icon: 'none' });
uni.showToast({
title: '当前已在报警中',
icon: 'none'
});
return;
}
if (isClose && this.deviceInfo.voiceStrobeAlarm !== 1) {
uni.showToast({ title: '当前未在报警中', icon: 'none' });
uni.showToast({
title: '当前未在报警中',
icon: 'none'
});
return;
}
if (!this.Status) this.Status = {};