import { loadEnv } from "@build/index";
import { http } from "/@/utils/http";

const { VITE_PROXY_DOMAIN_REAL } = loadEnv();

//登录
export async function httpLogin(data: object): Promise<DataType<User>> {
  return http.request(`post`, `${VITE_PROXY_DOMAIN_REAL}admin/login`, { data });
}

//根据用户token获取菜单
export async function httpMenu(data: object): Promise<DataType<Menu[]>> {
  return http.request(`post`, `${VITE_PROXY_DOMAIN_REAL}admin/menulist`, {
    data
  });
}
