import request from '@/utils/request';
/**
 * 查询字典列表
 * @param params 查询条件
 */
export async function listDictionaries(params) {
  const res = await request.get('/system/dict/getPage', { params });
  if (res.data.code == 0) {
    return res.data.data;
  }
  return Promise.reject(new Error(res.data.message));
}
export async function pageDictionaryData(id) {
  const res = await request.get(`/system/dict/getById/${id}`, {});
  if (res.data.code == 0) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.message));
}
