Forráskód Böngészése

feat: 调整mqtt与接口的地址;

liujia 2 hónapja
szülő
commit
65078097c3
3 módosított fájl, 6 hozzáadás és 6 törlés
  1. 1 1
      src/layout/index.vue
  2. 2 2
      src/views/device/detail/index.vue
  3. 3 3
      vite.config.ts

+ 1 - 1
src/layout/index.vue

@@ -93,7 +93,7 @@ const MqttData = ref()
 
 const initMqttManager = async () => {
   try {
-    mqttClient = mqtt.connect('ws://8.130.28.21:8083/mqtt', {
+    mqttClient = mqtt.connect('ws://43.137.10.199:8083/mqtt', {
       clientId: 'mqtt_vue_test' + Math.random().toString(16).substring(2, 8),
       username: 'admin',
       password: 'public',

+ 2 - 2
src/views/device/detail/index.vue

@@ -342,7 +342,7 @@ onMounted(() => {
   console.log('🚀mqttClient connect params', params)
   // ws://119.45.12.173:8083/mqtt 旧
   // ws://8.130.28.21:1883/mqtt 新
-  mqttClient = mqtt.connect('ws://8.130.28.21:8083/mqtt', params)
+  mqttClient = mqtt.connect('ws://43.137.10.199:8083/mqtt', params)
   console.log('mqttClient connect ready', mqttClient, params)
   mqttClient.on('connect', () => {
     console.log('MQTT已连接')
@@ -389,7 +389,7 @@ onMounted(() => {
             targets[id].lastY = y
             targets[id].displayX = x
             targets[id].displayY = y
-            // console.log(`更新目标点: id=${id}, x=${x}, y=${y}`, targets[id])
+            console.log(`更新目标点: id=${id}, x=${x}, y=${y}`, targets[id])
           } else {
             // 距离太小,忽略本次更新
             // console.log(`忽略微小抖动 id=${id}`)

+ 3 - 3
vite.config.ts

@@ -29,19 +29,19 @@ export default defineConfig({
       // http://8.130.28.21:31090
       // https://api.radar-power.asia:4443
       '/wap': {
-        target: 'https://api.radar-power.asia:4443',
+        target: 'https://radar-power.cn',
         changeOrigin: true,
         secure: false,
         rewrite: (path) => path,
       },
       '/portal-service-server': {
-        target: 'https://api.radar-power.asia:4443',
+        target: 'https://radar-power.cn',
         changeOrigin: true,
         secure: false,
         rewrite: (path) => path,
       },
       '/pub': {
-        target: 'https://api.radar-power.asia:4443',
+        target: 'https://radar-power.cn',
         changeOrigin: true,
         secure: false,
         rewrite: (path) => path,