import { request } from "@/utils/request";

// 登录方法
export function login(data) {
  return request({
    url: "/system/appLogin",
    headers: {
      isToken: false,
    },
    method: "POST",
    data: data,
  });
}

// 获取用户详细信息
export function getInfo() {
  return request({
    url: "/system/getInfo",
    method: "get",
  });
}

// 退出方法
export function logout(data) {
  return request({
    url: "/system/logout",
    method: "delete",
    params: data
  });
}

// 获取验证码
export function getCodeImg(data) {
  return request({
    url: "/system/SendSms/noteSending",
    headers: {
      isToken: false,
    },
    method: "GET",
    data: data,
  });
}

/** 获取登录页数据 */
export function getMobileTenantConfig(data) {
  return request({
    url: "/system/sysMobileTenantConfig/getAppTenantConfig",
    headers: {
      isToken: false,
    },
    method: "GET",
    data: data,
  });
}