import { request } from '@/service/request';
/**
 * 分页获取活动
 * @param params
 * @returns
 */
export function fetchActivityList(data: any) {
  return request({
    url: '/smqjh-pms/api/v1/djk/welfare/page',
    method: 'post',
    data
  });
}

/**
 *
 * 删除活动
 * @returns
 */
export function fetchDelActivity(id: string) {
  return request({
    url: `/smqjh-pms/api/v1/djk/welfare/delete/${id}`,
    method: 'delete'
  });
}

/**
 * 保存活动
 * @returns
 */
export function fetchAddActivity(data: any) {
  return request({
    url: '/smqjh-pms/api/v1/djk/welfare/add',
    method: 'post',
    data
  });
}

/**
 * 保存活动
 * @returns
 */
export function fetchEditActivity(data: any) {
  return request({
    url: '/smqjh-pms/api/v1/djk/welfare/update',
    method: 'post',
    data
  });
}

/**
 * 活动详情
 * @returns
 */
export function fetchActivityDetail(id: any) {
  return request({
    url: `/smqjh-pms/api/v1/djk/welfare/info/${id}`,
    method: 'get'
  });
}
