import request from '@/utils/request';

export async function pageBrand(params) {
  const res = await request.get('/common/autoBrand', {
    params
  });
  if (res.data) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.message));
}

export async function pageSeries(params) {
  const res = await request.get('/common/autoSeries', {
    params
  });
  if (res.data) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.message));
}

export async function pageAutoCar(params) {
  const res = await request.get('/common/autoCar', {
    params
  });
  if (res.data) {
    return res.data;
  }
  return Promise.reject(new Error(res.data.message));
}
