import { request } from "../config";
import qs from "qs";
const COMMON_PATH = "";

export function toLogin(
  // account
  data: { username: string; password: string; code: string }
) {
  return request({
    url: COMMON_PATH + "/auth/login",
    method: "post",
    data: qs.stringify(data),
  });
}

// export function getCode(){
//   return request({
//     url: COMMON_PATH + "/auth/getCaptcha",
//     method: 'get',
//   })
// }

// 获取mac地址
export function getMacAddress() {
  return request({
    url: '/api/lic/info/mac',
    method: 'post'
  })
}

// 导入文件
export function importFile(data: any) {
  return request({
    url: "/api/lic/info/file/import",
    method: 'post',
    headers: { 'Content-Type': 'multipart/form-data' },
    data
  })
}
