You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import http from 'utils/axios';
|
|
|
|
|
|
|
|
const apiUrl = import.meta.env.VITE_API_URL;
|
|
|
|
const users = `${apiUrl}/gateway/tall3/v3.0/users`;
|
|
|
|
const corrosion = `${apiUrl}/gateway/corrosion`;
|
|
|
|
|
|
|
|
// 根据userId 获取token
|
|
|
|
export const getToken = userId => http.get(`${users}/userId`, { params: { userId } });
|
|
|
|
|
|
|
|
// 获取设备列表
|
|
|
|
export const getDevices = () => http.get(`${corrosion}/devices`);
|
|
|
|
|
|
|
|
// 获取设备列表 完整信息
|
|
|
|
export const getDevicesAll = () => http.get(`${corrosion}/devices/all`);
|
|
|
|
|
|
|
|
// 获取数据统计 积分电量
|
|
|
|
export const getIntegralElectric = () => http.get(`${corrosion}/monthes/integralElectric`);
|
|
|
|
|
|
|
|
// 获取数据统计 月累计腐蚀
|
|
|
|
export const getTotalCorrosion = () => http.get(`${corrosion}/monthes/totalCorrosion`);
|
|
|
|
|
|
|
|
// 获取数据统计 月累计湿润时间图
|
|
|
|
export const getMoistTime = () => http.get(`${corrosion}/monthes/moistTime`);
|