import request from '@/utils/request';

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