import request from '@/utils/request';

/**
 * 分页查询
 * @param params 查询条件
 */
export async function pageClues(params) {
  const res = await request.get('/receiver/clues/page', {
    params
  });
  if (res.data.code === 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}

export async function getClues(params) {
  const res = await request.get('/receiver/clues', {
    params
  });
  if (res.data.code === 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}

export async function pageCluesOptLog(params) {
  const res = await request.get('/receiver/clues/opt', {
    params
  });
  if (res.data.code === 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
