import api from '@/utils/request';

export const getList = params =>
	api.post(`/yxl-back-end/admin/banner/page`, params);
export const getItem = ({ id, ...params }) =>
	api.get(`/yxl-back-end/admin/banner/${id}`, params);
export const saveItem = params => {
	if (params.id) {
		return api.put(`/yxl-back-end/admin/banner/update`, params);
	} else {
		return api.post(`/yxl-back-end/admin/banner/save`, params);
	}
};
export const delItem = ({ id, ...params }) =>
	api.del(`/yxl-back-end/admin/banner/${id}`, params);
