Compare commits

..

2 Commits

Author SHA1 Message Date
dbc0ab7d0f Merge branch 'main' of http://47.107.152.87:3000/dyf/APP 2026-03-27 11:25:48 +08:00
e0cef19da1 100J提交 2026-03-27 11:24:30 +08:00
2 changed files with 17 additions and 6 deletions

View File

@ -2,7 +2,7 @@
const config = { const config = {
// 开发环境 // 开发环境
development: { development: {
BASE_URL: 'http://192.168.110.57:8000',//http://139.224.253.23:8000 BASE_URL: 'http://192.168.2.34:8000',//http://139.224.253.23:8000
API_PREFIX: '', API_PREFIX: '',
// MQTT 配置 // MQTT 配置
MQTT_HOST: '47.120.79.150', MQTT_HOST: '47.120.79.150',

View File

@ -607,6 +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) {
these.formData.sta_VoiceType !== 7
} else { } else {
// 关闭状态:赋值-1表示关闭 // 关闭状态:赋值-1表示关闭
these.deviceInfo.voiceStrobeAlarm = -1; these.deviceInfo.voiceStrobeAlarm = -1;
@ -771,7 +773,9 @@
this.formData.bleStatu = 'connecting'; this.formData.bleStatu = 'connecting';
bleTool.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(() => { bleTool.LinkBlue(f.deviceId, f.writeServiceId, f.wirteCharactId, f.notifyCharactId).then(() => {
this.formData.bleStatu = true; this.formData.bleStatu = true;
this.bleStateRecovry({ deviceId: f.deviceId }); this.bleStateRecovry({
deviceId: f.deviceId
});
}).catch(() => { }).catch(() => {
this.formData.bleStatu = 'err'; this.formData.bleStatu = 'err';
}); });
@ -809,7 +813,7 @@
// 关闭状态 // 关闭状态
that.formData.sta_LightType = '-1'; that.formData.sta_LightType = '-1';
} }
if (this.formData.sta_VoiceType === '7' || this.formData.sta_VoiceType === 7) { if (this.formData.sta_VoiceType === '7' || res.data.alarmMode == 7) {
this.formData.sta_VoiceType = (res.data.voiceStrobeAlarm ?? 0) + ''; this.formData.sta_VoiceType = (res.data.voiceStrobeAlarm ?? 0) + '';
} else { } else {
this.formData.sta_VoiceType = res.data.alarmMode + '' this.formData.sta_VoiceType = res.data.alarmMode + ''
@ -1088,10 +1092,16 @@
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({ title: res.msg || '操作失败', icon: 'none' }); uni.showToast({
title: res.msg || '操作失败',
icon: 'none'
});
} }
}).catch(() => { }).catch(() => {
uni.showToast({ title: '下发失败,请检查蓝牙或网络', icon: 'none' }); uni.showToast({
title: '下发失败,请检查蓝牙或网络',
icon: 'none'
});
}); });
} }
// 未开启强制报警时,在 06 内置音色间切换或取消选中:只改按钮选中,不下发 // 未开启强制报警时,在 06 内置音色间切换或取消选中:只改按钮选中,不下发
@ -1281,7 +1291,8 @@
const last6 = target.slice(-6); const last6 = target.slice(-6);
const item = bleTool.data.LinkedList.find((v) => { const item = bleTool.data.LinkedList.find((v) => {
const m = macNorm(v.macAddress || ''); const m = macNorm(v.macAddress || '');
return v.deviceId === res.deviceId && (m === target || (m.length >= 6 && m.slice(-6) === last6)); return v.deviceId === res.deviceId && (m === target || (m.length >= 6 && m.slice(-6) ===
last6));
}); });
return !!item; return !!item;
}, },