This commit is contained in:
2020-10-16 14:33:26 +08:00
5 changed files with 147 additions and 268 deletions

View File

@@ -98,9 +98,10 @@ interface Teacherliked {
interest: string;
}
export async function getteacherliked(){
const res = await get<Array<Teacherliked>>('teacherliked');
console.log(res)
export async function getteacherliked(data?:any){
const res = await get<Array<Teacherliked>>('teacherliked',data);
// console.log(res)
return res.data
}
@@ -303,10 +304,27 @@ export async function saleinfo(data?:any){
/**
* 申请提现
*/
export async function cashout(data?:any){
export async function cashout(data?:any,accountinfo?:any){
// data.type=data.typeid?data.typeid:0
// if(data.type!=0){
// delete data.typeid
// }
data.type=accountinfo.type
console.log(data,'tixian')
console.log(accountinfo)
data.account=accountinfo.account
data.bankcode=accountinfo.bankcode
data.bankname=accountinfo.bankname
data.mname=accountinfo.mname
console.log(data)
const res = await post<Liveaddrule>('withdrawal',data);
if(res.code==0){
message.success("新增成功")
}else{
message.error(res.msg)
}
}
/**
@@ -355,6 +373,30 @@ export async function deleteaccount(data:any) {
console.log(res)
}
/**
*
* 交易明细
*/
interface TransactionInfo{
accountid:number,
memberid:number,
sn:string,
type:number,
typename:string,
money:number,
source:number,
remark:string,
deleted_at:any,
created_at:string,
updated_at:string
}
export async function transactioninfo(data?: any){
const res = await get<TransactionInfo>('account/'+data)
// console.log(res)
return res.data
}
/**
* 发送验证码
* @param phone 手机号