import { AxiosPromise } from "axios";
import request from "../request";

export interface CashoutRes extends Common.Res {
	data: {};
}

class CashOut {
	/**
	 * 查询收益列表
	 * @returns
	 */
	extensionIncomeList(): AxiosPromise<CashOutType.extensionIncomeListRes> {
		return request("/student/extension/income/extensionIncomeList");
	}

	extensionIncomePrice(): AxiosPromise<CashOutType.extensionIncomePriceRes> {
		return request("/student/extension/income/extensionIncomePrice");
	}

	/**查询提现记录 */
	extractList(): AxiosPromise<CashOutType.ExtractList> {
		return request("/student/wx/extract/list");
	}
	// 查询微信提现到银行卡记录
	studentWxBankList(params:Object) :AxiosPromise<CashOutType.bankList> {
		return request("/student/wx/bank/list",{
			params,
			method:"get"
		})
	}
	//银行卡提现
	studentWxExtractWxwithbankdrawal(data:Object){
		return request("/student/wx/extract/wxwithbankdrawal",{
			data,
			method:"post"
		})

	}
	/**微信提现 */
	cashout(params: { amount: number }): AxiosPromise<CashoutRes> {
		return request("/student/wx/extract/withdraw", {
			params,
			method: "post",
		});
	}
}

export const cashOut = new CashOut();
