index.js 575 Bytes
//获取设备分页API 修改为post
/**
 * params ((page,pageSize))
 * data ((deviceProfileIds))
 */
const getDeviceApi = (urlParams, data) => {
	const {
		page,
		pageSize,
	} = urlParams
	return uni.$u.http.post(`/yt/device?page=${page}&pageSize=${pageSize}`, data);
};

// 设备详情
const getDeviceDetail = (id) => {
	return uni.$u.http.get(`/yt/device/${id}`);
};

//设备属性
 const getAttribute = (deviceProfileId) => {
  return uni.$u.http.get(`/yt/device/attributes/${deviceProfileId}`);
};


export default {
	getDeviceApi,
	getDeviceDetail,
	getAttribute
}