| | |
| | | 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);
|
| | |
| | | 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) {
|
| | |
| | | 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',
|
| | | },
|
| | | });
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | |
| | | getRealTimeData,
|
| | | getAnalyList,
|
| | | getOrderList,
|
| | | queryEquList,
|
| | | querySampleList,
|
| | | queryHisFaultList,
|
| | | queryHisFaultChartList,
|
| | | getMonth,
|
| | | sendCommand
|
| | | sendCommand,
|
| | |
|
| | | emqxClients,
|
| | | mqttBaseUrl
|
| | | } |