// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 生成验证码 POST /base/captcha */
export async function postBaseCaptcha(options?: { [key: string]: any }) {
  return request<API.Response & { data?: API.SysCaptchaResponse; msg?: string }>(
    `/api/v1/base/captcha`,
    {
      method: 'POST',
      ...(options || {}),
    },
  );
}

/** 用户登录 POST /base/login */
export async function postBaseLogin(body: API.Login, options?: { [key: string]: any }) {
  return request<API.Response & { data?: API.LoginResponse; msg?: string }>(`/api/v1/base/login`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 用户登录 POST /base/login */
export async function postLogin(body: API.BaseLogin, options?: { [key: string]: any }) {
  return request<API.Response & { data?: API.LoginResponse; msg?: string }>(`/api/login/`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
