mqtt工具完善

master
lld 2025-12-29 01:06:00 +08:00
parent 59a7d269ae
commit 8cc77d2852
1 changed files with 5 additions and 4 deletions

View File

@ -238,10 +238,10 @@ export default {
return {
// MQTT
mqttConfig: {
broker: 'ws://1.94.254.176:9001/mqtt', //
broker: '', //
clientId: 'uniapp_mqtt_' + Math.random().toString(16).substr(2, 8),
username: 'admin',
password: 'Admin#12345678',
username: '',
password: '',
timeout: 30
},
//
@ -349,7 +349,8 @@ export default {
password: this.mqttConfig.password,
connectTimeout: (this.mqttConfig.timeout || 30) * 1000,
keepalive: 60,
clean: true
clean: true,
reconnectPeriod: 0
}
//