import request from "./request";
import bodyParse from "./bodyParse";

export async function postFetch({ url, params }) {
  return request(url, {
    method: "POST",
    data: params,
  });
}
export async function doFetch({ url, params }) {
  if(!url){
    return
  }
  return request("/wmspro" + url, {
    method: "POST",
    data: params,
  });
}
export async function getFetch({ url, params }) {
  return request(url + bodyParse(params));
}

export async function formFetch({ url, params }) {
  return request(url, {
    method: "POST",
    data: params,
    type: "form",
  });
}
