fix: 更新MQTT连接地址和主题名称
将MQTT服务器地址从111.229.30.246:4199更改为65.73.11.246:10087 同时将生产主题从"event"更改为"xiaofangmqtt"
This commit is contained in:
parent
f1452cd3c0
commit
ea06bad003
|
|
@ -1979,12 +1979,12 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
openMqtt() {
|
openMqtt() {
|
||||||
let clientId = "test_" + new Date().getTime();
|
let clientId = "test_" + new Date().getTime();
|
||||||
let client = mqtt.connect("ws://111.229.30.246:4199", {
|
let client = mqtt.connect("ws://65.73.11.246:10087", {
|
||||||
clientId: clientId,
|
clientId: clientId,
|
||||||
username: "",
|
username: "",
|
||||||
password: "",
|
password: "",
|
||||||
});
|
});
|
||||||
let produceTopic = "event";
|
let produceTopic = "xiaofangmqtt";
|
||||||
client.on("connect", () => {
|
client.on("connect", () => {
|
||||||
console.log("mqtt 已经连接成功");
|
console.log("mqtt 已经连接成功");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue