import request from "@/utils/request";
// const Login = (params:any)=>{
//     request({
//         url: "/log",
//         params
//     });

// }
 
export const getRouters = async () => {
 return  await request({
    url: "/init/list-menus",
    method:'post',
  });
};

export const createRegister = async(params: any)=>{
  return  await request({
    url: "/user/register",
    method:'post',
    params,
  });
}

export const onLogin = async(data: any)=>{
  return  await request({
    url: "/pub/login",
    method:'post',
    data,
  });
}
// /aaa/tt
export const onTest = async(data: any)=>{
  return  await request({
    url: "/aaa/tt",
    method:'post',
    data,
  });
}
export const payConfigGetSearch = async(id:number)=>{
  return  await request({
    url: `/pay/findaliall?uid=${id}`,
    method:'post',
  });
} 

export const onZfbPay = async(data:any)=>{
  return  await request({
    url: `/pay/createali`,
    method:'post',
    data
  });
} 

export const onWxPay = async(data:any)=>{
  return  await request({
    url: `/pay/createwx`,
    method:'post',
    data
  });
} 

export const getPaySelect = async(uid:any)=>{
  return  await request({
    url: `/pay/findaliall?uid=${uid}`,
    method:'post',
  });
} 
export const onUpdate = async(data:any)=>{
  return  await request({
    url: `/pay/updateali`,
    method:'post',
    data
  });
}

export const onUpdateWX = async(data:any)=>{
  return  await request({
    url: `/pay/updatewx`,
    method:'post',
    data
  });
} 
export const onSearchSelectrealmName = async(uid:any)=>{
  return  await request({
    url: `/pay/selectrealmname?uid=${uid}`,
    method:'post',
  });
} 

export const onCreaterealmName = async(data:any)=>{
  return  await request({
    url: `/pay/createrealmname`,
    method:'post',
    data
  });
} 

export const onUpdaterealmName = async(data:any)=>{
  return  await request({
    url: `/pay/updaterealmname`,
    method:'post',
    data
  });
} 

export const onCreateGoods = async(data:any)=>{
  return  await request({
    url: `/goods/creategoods`,
    method:'post',
    data
  });
} 

export const onfindAli = async(uid:any)=>{
  return  await request({
    url: `/pay/findalipay?uid=${uid}`,
    method:'post',
  });
} 

export const onfindWX = async(uid:any)=>{
  return  await request({
    url: `/pay/findWX?uid=${uid}`,
    method:'post',
  });
} 
export const onSelectGoods = async(uid:any)=>{
  return  await request({
    url: `/goods/select?uid=${uid}`,
    method:'post',
  });
} 


export const onfindby = async(params:any)=>{
  return  await request({
    url: `/goods/findgoodspays?uid=${params.uid}&name=${params.name}&status=${params.status}`,
    method:'post',
  });
} 
export const onCreateGoodsPay = async(data:any)=>{
  return  await request({
    url: `/goods/creategoodspay`,
    method:'post',
    data
  });
} 

export const onUpdateGoods = async(data:any)=>{
  return  await request({
    url: `/goods/updategoods`,
    method:'post',
    data
  });
} 


export const onUpdateGoodsPay = async(data:any)=>{
  return  await request({
    url: `/goods/updategoodspay2`,
    method:'post',
    data
  });
} 