import { http } from "/@/utils/http";
import { loadEnv } from "@build/index";
const { VITE_PROXY_DOMAIN_REAL, VITE_PROXY_USER_REAL } = loadEnv();
const userAPi = VITE_PROXY_DOMAIN_REAL;
const yewuApi = "http://cxinv.api.caixiao365.com" + "/admin/";
const yewuApi1 = VITE_PROXY_USER_REAL + "/admin/";


interface ResponseType extends Promise<any> {
  data?: object;
  code?: number;
  msg?: string;
}

// 菜单列表
export const httpAdd = (data: object): ResponseType => {
  return http.request("post", `${yewuApi}systemadd`, { data });
};
// 菜单列表
export const httpList = (data: object): ResponseType => {
  return http.request("post", `${yewuApi}wechat_list`, { data });
};
// 菜单更新
export const httpUpdate = (data: object): ResponseType => {
  return http.request("post", `${yewuApi}wechat_save`, { data });
};

export const httpUpdateReport = (data: object): ResponseType => {
  return http.request("post", `${yewuApi1}commond/create`, { data });
};

// 菜单状态
export const httpStatus = (data: object): ResponseType => {
  return http.request("post", `${yewuApi}menustatus`, { data });
};
// 菜单删除
export const httpDelete = (data: object): ResponseType => {
  return http.request("post", `${yewuApi}menudel`, { data });
};


