import request from "@/utils/request.js";

/**
 * 登录
 * @param params
 * @returns {AxiosPromise}
 */
export function login(data) {
  return request({
    url: "/user/login",
    method: "post",
    data: data
  });
}

/**
 * 获取验证码
 * @param params
 * @returns {AxiosPromise}
 */
export function getCode(params) {
  return request({
    url: "/user/send-code",
    method: "post",
    data: params
  });
}

/**
 * 获取用户信息
 * @param params
 * @returns {AxiosPromise}
 */
export function getUser() {
  return request({
    url: "/user/info",
    method: "get"
  });
}

/**
 * 系统配置
 */
export function sysConfig() {
  return request({
    url: "/system/config",
    method: "get"
  });
}
