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.
51 lines
1.6 KiB
51 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 months = require('./data/months');
|
|
const realtime = require('./data/realtime');
|
|
const dataHistory = require('./data/dataHistory');
|
|
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);
|
|
|
|
// 添加设备
|
|
post('/gateway/corrosion/devices').to.json(device);
|
|
|
|
// 更新设备信息
|
|
put('/gateway/corrosion/devices/all/:id').to.json(device);
|
|
|
|
// 删除设备信息
|
|
delete('/gateway/corrosion/devices/all/:id').to.json(device);
|
|
|
|
// 获取某个设备信息
|
|
get('/gateway/corrosion/devices/all/:id').to.json(device);
|
|
|
|
// 设备列表 完整信息
|
|
get('/gateway/corrosion/devices/all').to.json(devicesAll);
|
|
|
|
// 月累计数据分析
|
|
get('/gateway/corrosion/statistics/months').to.json(months);
|
|
|
|
// 实时数据统计
|
|
get('/gateway/corrosion/statistics/realtime').to.json(realtime);
|
|
|
|
// 历史数据查询
|
|
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' });
|
|
|