import request from '@/utils/request';
import { AxiosPromise } from 'axios';
/**
 * 查询设备列表
 * @param query
 */
export const userList = (params: any): AxiosPromise => {
  return request({
    url: '/WebApp/user/list',
    method: 'get',
    params
  });
};
// 绑定设备列表
export const deviceList = (params: any): AxiosPromise => {
  return request({
    url: '/api/app/device',
    method: 'get',
    params
  });
};
// 账号状态
export const userStatus = (data: any): AxiosPromise => {
  return request({
    url: '/api/app/device',
    method: 'put',
    data
  });
};
// 解绑设备
export const deviceUnBind = (data: any): AxiosPromise => {
  return request({
    url: '/api/device/unbind',
    method: 'delete',
    data,
    headers: {
      'Content-Type': 'multipart/form-data',  //设置正确的 Content-Type
    },
  });
};


export default { userList, deviceList, userStatus, deviceUnBind }