mirror of
https://github.com/kerwincui/FastBee.git
synced 2025-10-15 12:42:19 +08:00
修复前端bug
This commit is contained in:
@@ -52,7 +52,11 @@ export default {
|
||||
clientId: 'web-' + Math.random().toString(16).substr(2),
|
||||
connectTimeout: 60000
|
||||
}
|
||||
this.client = mqtt.connect(process.env.VUE_APP_BROKEN_URL, options);
|
||||
// 配置Mqtt地址
|
||||
// let ssl_url = "wss://domain.com/mqtt"
|
||||
let url = "ws://" + window.location.hostname + ":8083/mqtt";
|
||||
console.log("mqtt地址:", url);
|
||||
this.client = mqtt.connect(url, options);
|
||||
this.client.on("connect", (e) => {
|
||||
console.log("成功连接服务器:", e);
|
||||
// 订阅主题
|
||||
|
Reference in New Issue
Block a user