From 9dfbc038667839631578c12ff748534e5939bc82 Mon Sep 17 00:00:00 2001
From: zhuguifei <zhuguifei@zhuguifeideiMac.local>
Date: 星期二, 02 九月 2025 14:34:23 +0800
Subject: [PATCH] 1.修复微信小程序canvans显示在最上层问题
---
common/api.js | 62 +++++++++++++++++++++++++++---
1 files changed, 55 insertions(+), 7 deletions(-)
diff --git a/common/api.js b/common/api.js
index 23f7dd3..8d4a91f 100644
--- a/common/api.js
+++ b/common/api.js
@@ -1,14 +1,19 @@
import {
fly
-} from '@/common/request/fly.js'
+} from '@/common/request/fly.js'
+const base = "http://192.168.21.3:9999"
+// const base = "https://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 + ""
+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 +41,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 +64,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 +99,13 @@
getRealTimeData,
getAnalyList,
getOrderList,
+ queryEquList,
+ querySampleList,
+ queryHisFaultList,
+ queryHisFaultChartList,
getMonth,
- sendCommand
+ sendCommand,
+
+ emqxClients,
+ mqttBaseUrl
}
\ No newline at end of file
--
Gitblit v1.9.3