import request from '@/utils/request';

// 获取记录规则详情
export async function getRecordRulesDetail(id) {
  const res = await request.get(`/main/recordrules/getById/` + id, {});
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}

// 记录规则明细表
export async function recordRulesDetailPage(body) {
  const res = await request.post(`/main/recordrulesdetail/page`, body);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}

// 规则记录分页查询
export async function recordrulesPage(body) {
  const res = await request.post(`/main/recordrules/page`, body);
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
