import request from '@/utils/request'
import Qs from 'qs';

//获取所有活动列表
export function getActivityList(params) {
	return request({
		url: '/mobile/activityApi/getActivityList',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//获取我发起的活动列表
export function getMyActivityList(params) {
	return request({
		url: '/mobile/activityApi/getMyActivityList',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//获取活动详情
export function getActivityInfo(id) {
	return request({
		url: '/mobile/activityApi/detail',
		data: Qs.stringify({
			id: id
		}),
		method: 'post',
	})
}

//新增活动
export function addActivity(params) {
	return request({
		url: '/mobile/activityApi/addActivity',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//设置活动
export function setActivity(params) {
	return request({
		url: '/mobile/activityApi/setActivity',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//修改活动
export function editActivity(params) {
	return request({
		url: '/mobile/activityApi/updateActivity',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//审核活动列表
export function getExamineActivityList(params) {
	return request({
		url: '/mobile/activityApi/getVerifyActivityList',
		data: Qs.stringify(params),
		method: 'post',
	})
}

//审核活动
export function examineActivity(params) {
	return request({
		url: '/mobile/activityApi/verifyActivity',
		data: Qs.stringify(params),
		method: 'post',
	})
}
