import request from './request.js';
const getActivity = async data => {
	const res = await request.get({ url: `/activity/list`, data });
	return res.data;
}
const getdetails = async ({ activityId }) => {
	const res = await request.get({ url: `/activity/${activityId}` });
	return res.data;
}
const getstatus = async ({ activityId }) => {
	const res = await request.get({ url: `/activity/status/${activityId}` });
	return res.data;
}
const report = async ({ activityId }) => {
	const res = await request.post({ url: `/activity/report/${activityId}` });
	return res.data;
}
const offReport = async ({ activityId }) => {
	const res = await request.del({ url: `/activity/report-cancel/${activityId}` });
	return res.data;
}
const uploadImgs = async data => {
	const res = await request.post({ url: `/activity/submit-photo`, data });
	return res.data;
}
const getPhotos = async ({ activityId }) => {
	const res = await request.get({ url: `/activity/log-details/${activityId}` });
	return res.data;
}
const getTypeList = async ({ alias }) => {
	const res = await request.get({ url: `/cms/type/sublist/${alias}` });
	return res.data;
}
export default { getActivity, getdetails, getstatus, report, offReport, uploadImgs, getPhotos, getTypeList };