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

const { VITE_PROXY_DOMAIN_REAL } = loadEnv();

//获取数据
export async function httpList(): Promise<DataType<Menu[]>> {
  return http.request(`post`, `${VITE_PROXY_DOMAIN_REAL}admin/orderList`, {
    data: {}
  });
}
// 详情
export async function httpDetail(data: object = {}): Promise<DataType<any>> {
  return http.request("post", `${VITE_PROXY_DOMAIN_REAL}admin/orderRead`, {
    data
  });
}

//发货
export async function httpDeliver(): Promise<DataType<Menu[]>> {
  return http.request(`post`, `${VITE_PROXY_DOMAIN_REAL}admin/orderDeliver`, {
    data: {}
  });
}

//导出
export async function httpExport(data: object): Promise<DataType<Menu[]>> {
  return http.request(`post`, `${VITE_PROXY_DOMAIN_REAL}admin/orderExport`, {
    data
  });
}
