import {
	HttpRequest,
	HttpFileUpload
} from './request';
import config from './config';
export const baseUrl = config.apiUrl;

export const callCoreApi = (url, parmas = {}, method = 'post') => {
	return HttpRequest(baseUrl + "maintenance/core/" + url, method, parmas);
}

export const callOperateApi = (url, parmas = {}, method = 'post') => {
	return HttpRequest(baseUrl + "operate/" + url, method, parmas);
}

export const callOrdereApi = (url, parmas = {}, method = 'post') => {
	return HttpRequest(baseUrl + "order/" + url, method, parmas);
}
export const callPaymentApi = (url, parmas = {}, method = 'post') => {
	return HttpRequest(baseUrl + "payment/" + url, method, parmas);
}

export const callMaintenanceApi = (url, parmas = {}, method = 'post') => {
	return HttpRequest(baseUrl + "maintenance/" + url, method, parmas);
}

export const callEbikeInfo = (url, parmas = {}, method = 'post') => {
	return HttpRequest(baseUrl + "maintenance/ebikeBikeInfo/" + url, method, parmas);
}

export const fileUploadUser = (file) => {
	return HttpFileUpload(baseUrl + "order/ebikeOrdersSystem/fileUpload", file);
}

export const fileUploadUserPicture = (file) => {
	return HttpFileUpload(baseUrl + "order/ebikeOrdersSystem/fileUploadUserPicture", file);
}
