From 7941623b1fb108a154ea4270d7c7e2df6031f6e5 Mon Sep 17 00:00:00 2001
From: zhuguifei <zhuguifei@zhuguifeideiMac.local>
Date: 星期四, 11 十二月 2025 12:36:14 +0800
Subject: [PATCH] 优化页面UI更新

---
 common/api.js |   63 ++++++++++++++++++++++++++++---
 1 files changed, 56 insertions(+), 7 deletions(-)

diff --git a/common/api.js b/common/api.js
index 23f7dd3..6e13ab0 100644
--- a/common/api.js
+++ b/common/api.js
@@ -1,14 +1,20 @@
 import {
 	fly
-} from '@/common/request/fly.js'
+} from '@/common/request/fly.js'
+// const base = "http://192.168.21.3:9999"
+const base = "http://lanpucloud.cn"
+
 //閰嶇疆璇锋眰鍩哄湴鍧�
-fly.config.baseURL = "http://192.168.2.6:8800/herb"
-const url = uni.getStorageSync('baseurl');
-if (url) {
-	fly.config.baseURL = url + "/herb"
+fly.config.baseURL = base + "/herb"
+// fly.config.baseURL = base + ""
+const ip = uni.getStorageSync('lan_ip');
+if (ip) {
+	fly.config.baseURL = "http://" + ip + ":9999"
 }
 
-
+const mqttBaseUrl = "lanpucloud.cn";
+const emqxBaseUrl =  base + ":1883/api/v5";
+ 
 // 娴嬭瘯
 function test(params) {
 	return fly.get('/test/jeecgDemo/queryById', params);
@@ -36,7 +42,17 @@
 	fly.config.loading = true
 	return fly.get('/dry/dryOrder/list', params);
 }
+//璁惧鍒楄〃
+function queryEquList(params) {
+	fly.config.loading = true
+	return fly.get('/mobile/equ/list', params);
+}
 
+//浠呯敤浣滀笅鎷夊埛鏂帮紝鏃犲疄闄呮剰涔�
+function querySampleList(params) {
+	fly.config.loading = true
+	return fly.get('/mobile/sample/list', params);
+}
 
 //
 function getMonth(params) {
@@ -49,6 +65,32 @@
 	return fly.post('/dry/real/sendCommand', params);
 }
 
+//鍘嗗彶鏁呴殰锛屾煡璇㈡渶杩戞暟鎹�
+function queryHisFaultList(params) {
+	fly.config.loading = true
+	return fly.get('/mobile/fault/list', params);
+}
+
+//鍘嗗彶鏁呴殰锛屾煡璇㈠浘琛ㄩ渶瑕佹暟鎹�
+function queryHisFaultChartList(params) {
+	fly.config.loading = true
+	return fly.get('/mobile/fault/chart', params);
+}
+
+
+//emqx 鎺ュ彛
+function emqxClients() {
+	fly.config.loading = true
+	return fly.get(emqxBaseUrl + "/clients", {
+		auth: {
+			username: "a3dc6758f6abc41a",
+			password: "FvBwJcmqhAuQ0aBg4FLl5gQA9A9BE64bpl0oJTg9A6I0bK"
+		},
+		headers: {
+			'Content-Type': 'application/json',
+		},
+	});
+}
 
 
 
@@ -58,6 +100,13 @@
 	getRealTimeData,
 	getAnalyList,
 	getOrderList,
+	queryEquList,
+	querySampleList,
+	queryHisFaultList,
+	queryHisFaultChartList,
 	getMonth,
-	sendCommand
+	sendCommand,
+
+	emqxClients,
+	mqttBaseUrl
 }
\ No newline at end of file

--
Gitblit v1.9.3