import api from '@/utils/request';

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