import request from '@/utils/request';

export function useLogin(data) {
  return request({
    url: '/api/login',
    method: 'post',
    data
  });
}

export function useIdLogin(params) {
  return request({
    url: '/api/userfaceLogin',
    method: 'get',
    params
  });
}
//绑定人脸
export function bindFaceApi(data, id) {
  return request({
    baseURL: import.meta.env.VITE_FACE_SEVER_URL,
    url: `/api/rms/web/sessions/face/${id}`,
    method: 'put',
    data: data
  });
}

export function userFaceLogin(data) {
  return request({
    baseURL: import.meta.env.VITE_FACE_SEVER_URL,
    url: '/api/rms/web/sessions/face',
    method: 'post',
    data
  });
}
export function queryUserList(data) {
  return request({
      baseURL: import.meta.env.VITE_FACE_SEVER_URL,
      url: '/api/rms/web/users',
      method: 'get',
      params: data,
  })
}