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 getPaySelect1 = 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/findAli?uid=${uid}`,
    method:'post',
  });
} 
export const onfindAli1 = async(uid:any)=>{
  return  await request({
    url: `/pay/findAli1?uid=${uid}`,
    method:'post',
  });
} 

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

export const onfindWX1 = async(uid:any)=>{
  return  await request({
    url: `/pay/findWX1?uid=${uid}`,
    method:'post',
  });
} 
export const onSelectGoods = async(data:any)=>{
  return  await request({
    url: `/goods/select?uid=${data.uid}&page=${data.page}&size=${data.size}&strtus=${data.strtus}`,
    method:'post',
  });
} 

export const onFindbyLikeName = async(params:any)=>{
  return  await request({
    url: `/goods/findbylikename?uid=${params.uid}&name=${params.name}&page=${params.page}&size=${params.size}`,
    method:'post',
  });
} 

export const onfindby = async(params:any)=>{
  return  await request({
    url: `/goods/findgoodspays?uid=${params.uid}&page=${params.page}&size=${params.size}`,
    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/updategoodspay`,
    method:'post',
    data
  });
} 

export const onDelectgoodpay = async(data:any)=>{
  return  await request({
    url: `/goods/delectgoodpay?goodspayid=${data.goodspayid}&uid=${data.uid}`,
    method:'post',
  });
} 

export const onFindPayInfo = async(data:any)=>{
  return  await request({
    url: `/orders/findall?page=${data.page}&size=${data.size}&uid=${data.uid}`,
    method:'post',
  });
} 

export const onFindPayOrderid = async(data:any)=>{
  return  await request({
    url: `/orders/findorderid?orderid=${data.orderid}&uid=${data.uid}`,
    method:'post',
  });
} 
export const  onLogOut = async()=>{
  return  await request({
    url: `/pub/logout`,
    method:'get',
  });
} 

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

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

export const onFindBysub= async(data:any)=>{
  return  await request({
    url: `/goods/findBysub?subject=${data.subject}&uid=${data.uid}&page=${data.page}&size=${data.size}`,
    method:'post',
    data
  });
} 

export const onUpDown= async(data:any)=>{
  return  await request({
    url: `/goods/UporDown`,
    method:'post',
    data
  });
} 
// /goods/findBysub
// /pay/DisableAli