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.
46 lines
1.6 KiB
46 lines
1.6 KiB
const user = require('./data/user');
|
|
const devices = require('./data/devices');
|
|
const devicesAll = require('./data/devicesAll');
|
|
const device = require('./data/device');
|
|
const integralElectric = require('./data/integralElectric');
|
|
const totalCorrosion = require('./data/totalCorrosion');
|
|
const dataHistory = require('./data/dataHistory');
|
|
const moistTime = require('./data/moistTime');
|
|
const configNetwork = require('./data/config-network');
|
|
const configFunction = require('./data/config-function');
|
|
|
|
// 根据userId获取用户
|
|
get('/gateway/tall3/v3.0/users/userId').to.json(user);
|
|
|
|
// 设备列表
|
|
get('/gateway/corrosion/devices').to.json(devices);
|
|
|
|
// 获取某个设备信息
|
|
get('/gateway/corrosion/devices/all/:id').to.json(device);
|
|
|
|
// 设备列表 完整信息
|
|
get('/gateway/corrosion/devices/all').to.json(devicesAll);
|
|
|
|
// 积分电量
|
|
get('/gateway/corrosion/months/integralElectric').to.json(integralElectric);
|
|
|
|
// 月累计腐蚀
|
|
get('/gateway/corrosion/months/totalCorrosion').to.json(totalCorrosion);
|
|
|
|
// 月累计湿润时间图
|
|
get('/gateway/corrosion/months/moistTime').to.json(moistTime);
|
|
|
|
// 历史数据查询
|
|
get('/gateway/corrosion/histories').to.json(dataHistory);
|
|
|
|
// 获取网络配置参数
|
|
get('/gateway/corrosion/config/network').to.json(configNetwork);
|
|
|
|
// 获取功能配置参数
|
|
get('/gateway/corrosion/config/function').to.json(configFunction);
|
|
|
|
// 提交网络配置参数
|
|
post('/gateway/corrosion/config/network').to.json({ code: 200, msg: 'ok' });
|
|
|
|
// 提交功能配置参数
|
|
post('/gateway/corrosion/config/function').to.json({ code: 200, msg: 'ok' });
|
|
|