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

/**
 * 分页查询学期活动列表
 * @param query
 */
export const fetchList = (query?: any) => {
  return request({
    url: '/stuwork/termactivity/page',
    method: 'get',
    params: query
  });
};

/**
 * 获取学期活动详情
 * @param id
 */
export const getDetail = (id: string) => {
  return request({
    url: '/stuwork/termactivity/detail',
    method: 'get',
    params: { id }
  });
};

/**
 * 新增学期活动
 * @param data
 */
export const addObj = (data: any) => {
  return request({
    url: '/stuwork/termactivity',
    method: 'post',
    data
  });
};

/**
 * 编辑学期活动
 * @param data
 */
export const editObj = (data: any) => {
  return request({
    url: '/stuwork/termactivity/edit',
    method: 'post',
    data
  });
};

/**
 * 删除学期活动
 * @param ids
 */
export const delObj = (ids: string[]) => {
  return request({
    url: '/stuwork/termactivity/delete',
    method: 'post',
    data: ids
  });
};
