import request from '@/utils/request'

/**
 * 活动列表
 */
export function getActivityList(params: Record<string, any>) {
    return request.get('xypm/manage/activity', params)
}

/**
 * 活动报名列表
 */
export function getActivitySignupList(params: Record<string, any>) {
    return request.get('xypm/manage/activity_signup', params)
}

/**
 * 获取活动列表供组件调用
 */
export function getActivityComponents(params: Record<string, any>) {
    return request.get(`xypm/manage/activity/components`, params)
}

/**
 * 活动详情
 */
export function getActivityDetail(id: number) {
    return request.get(`xypm/manage/activity/${id}`)
}

/**
 * 活动报名
 */
export function signupActivity(params : Record<string, any>) {
    return request.post('xypm/manage/activity/signup', params)
}

/**
 * 添加报事报修
 */
export function adddRepair(params : Record<string, any>) {
    return request.post('xypm/manage/repair', params, {showSuccessMessage: true})
}

/**
 * 报事报修状态
 */
export function getRepairStatus() {
    return request.get(`xypm/manage/repair_status`)
}

/**
 * 报事报修列表
 */
export function getRepairList(params: Record<string, any>) {
    return request.get('xypm/manage/repair', params)
}

/**
 * 添加报事报修
 */
export function adddSuggest(params : Record<string, any>) {
    return request.post('xypm/manage/suggest', params, {showSuccessMessage: true})
}

/**
 * 装修报事报修
 */
export function getSuggestStatus() {
    return request.get(`xypm/manage/suggest_status`)
}

/**
 * 装修报事报修
 */
export function getSuggestList(params: Record<string, any>) {
    return request.get('xypm/manage/suggest', params)
}

/**
 * 添加装修申报
 */
export function adddDecorat(params : Record<string, any>) {
    return request.post('xypm/manage/decorat', params, {showSuccessMessage: true})
}

/**
 * 装修申报状态
 */
export function getDecoratStatus() {
    return request.get(`xypm/manage/decorat_status`)
}

/**
 * 装修申报列表
 */
export function getDecoratList(params: Record<string, any>) {
    return request.get('xypm/manage/decorat', params)
}