import api from '@/utils/request';

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