import { request } from '@/sheep/request';

const route = {
  path: 'dashboard',
  name: 'shop.admin.dashboard',
  component: () => import('./index.vue'),
  meta: {
    title: '总览',
  },
};

const api = {
  total: () =>
    request({
      url: '/shop/admin/dashboard/total',
      method: 'GET',
    }),
  ranking: () =>
    request({
      url: '/shop/admin/dashboard/ranking',
      method: 'GET',
    }),
  chart: (params) =>
    request({
      url: '/shop/admin/dashboard/chart',
      method: 'GET',
      params,
    }),
};

export { route, api };
