import request from '@/utils/request'

export function loginByUsername(email, password, isRememberMe,loginDevice) {
  return request({
    url: '/user/login',
    method: 'get',
    params: { email: email, password: password, isRememberMe: isRememberMe,loginDevice:loginDevice }
  })
}


//选择公司
export function chooseCompany(companyId) {
  return request({
    url: '/user/chooseCompany',
    method: 'get',
    params: { companyId: companyId }
  })
}
//获取用户信息
export function getInfo() {
  return request({
    url: '/user/info',
    method: 'get',
  })
}
export function verifyCode() {
  return request({
    url: '/auth/verifyCode',
    method: 'get',
    responseType: 'blob',
  })
}
//退出登录
export function logout() {
  return request({
    url: '/user/logout',
    method: 'get'
  })
}

export function getUserInfo(tenantId) {
  return request({
    url: '/auth/info',
    method: 'get',
    params: { tenantId: tenantId }
  })
}
export function fraDetail() {
  return request({
    url: '/auth/fraDetail',
    method: 'get'
  })
}
