import Request from '../common/request.js';
let request = new Request().http

// 获取银行卡信息
export function getBankCardInfo(data) {
	return request('/app/dockerInfo/getDockerBankInfo', data,'POST', 'application/json;charset=UTF-8');
}

// 获取银行卡详情
export function getBankCardDetail(data) {
	return request('/store/app/bankCard/getDetail', data, 'GET');
}

// 添加银行卡
export function addBankCard(data) {
	return request('/app/dockerInfo/addDockerBankInfo', data, 'POST', 'application/json;charset=UTF-8');
}

// 更新银行卡
export function updateBankCard(data) {
	return request('/store/app/bankCard/update', data, 'POST', 'application/json;charset=UTF-8');
}

// 删除银行卡（解除绑定）
export function deleteBankCard(data) {
	return request('/store/app/bankCard/delete', data, 'POST', 'application/json;charset=UTF-8');
}

// 获取银行列表
export function getBankList() {
	return request('/store/app/bankCard/getBankList', null, 'GET');
}

// 获取支行列表
export function getBranchList(data) {
	return request('/store/app/bankCard/getBranchList', data, 'GET');
}

// 获取银行卡列表
export function getBankCardList() {
	return request('/store/app/bankCard/getList', null, 'GET');
}

// 设置默认银行卡
export function setDefaultBankCard(data) {
	return request('/store/app/bankCard/setDefault', data, 'POST', 'application/json;charset=UTF-8');
}

// 验证银行卡号
export function validateBankCard(data) {
	return request('/store/app/bankCard/validate', data, 'POST', 'application/json;charset=UTF-8');
}
