优化 APF治理效果页面

This commit is contained in:
GGJ
2025-05-21 12:42:28 +08:00
parent 4b647062bf
commit 4cde4e367e
4 changed files with 385 additions and 222 deletions

View File

@@ -11,21 +11,20 @@ import { provide, onMounted, ref } from 'vue'
//线上mqtt
// let buildUrl = 'wss://pqmcn.com:8087/mqtt'//102
let buildUrl = 'ws://pqmcn.com:8073/mqtt'//27
let buildUrl = 'ws://pqmcn.com:8073/mqtt' //27
// 从 Nginx 获取 MQTT URL
const fetchMqttUrl = async () => {
const response = await fetch('/')
const mqttUrl = response.headers.get('X-Mqtt-Url')
const zutai = response.headers.get('X-Mqttzutai-Url')
window.localStorage.setItem('MQTTURL', mqttUrl || buildUrl)
window.localStorage.setItem('MQTTZUTAI', zutai || '')
}
//本地mqtt
// let devUrl = 'ws://192.168.1.24:8085/mqtt'
// let devUrl = 'ws://192.168.1.24:8085/mqtt'
onMounted(() => {
fetchMqttUrl()