import { request } from "@/utils/request";
export const getUserInfo = () => {
  return request({
    url: "/ucenter/user/getUserInfo",
    method: "post",
    config: {
      timeout: 10000,
      headers: {
        "Content-Type": "application/json;charset=UTF-8",
      },
    },
  });
};

export const getUserOrder = (data: any) => {
    return request({
      url: "/ucenter/user/order/list",
      method: "post",
      data,
      config: {
        timeout: 10000,
        headers: {
            "Content-Type": "application/json;charset=UTF-8",
        },
      },
    });
  };

  export const wxLogin = (data:logonParam) => {
    return request({
      url: "/service/pay/wxLogin",
      method: "get",
      data,
      config: {
        timeout: 10000,
        headers: {
            "Content-Type": "application/json;charset=UTF-8",
        },
      },
    });
  };
  
export const getOrderInfo = (orderSn:string) => {
    return request({
      url: `/service/pay/order/info/${orderSn}`,
      method: "get",
      config: {
        timeout: 10000,
        loading: true,//隐藏进度条
        headers: {
            "Content-Type": "application/json;charset=UTF-8",
        },
      },
    });
  };

export const queryOrderStatus = (data) => {
    return request({
      url: `/ucenter/user/order/queryOrderStatus`,
      method: "post",
      data,
      config: {
        timeout: 10000,
        loading: true,//隐藏进度条
        headers: {
            "Content-Type": "application/json;charset=UTF-8",
        },
      },
    });
  };