import Content from '@/sheep/layouts/content.vue';
import { SELECT, CRUD } from '@/sheep/request/crud';

const route = {
  path: 'marketing',
  name: 'shop.admin.marketing',
  component: Content,
  meta: {
    title: '营销',
  },
  children: [
    {
      path: 'group',
      name: 'shop.admin.marketing.group',
      component: () => import('./group/index.vue'),
      meta: {
        title: '拼团',
      },
    },
  ],
};

const api = {
  // 拼团相关 API
  group: {
    ...CRUD('shop/admin/group_buy'),
    select: (params) => SELECT('shop/admin/group_buy', params),
  },
};

export { route, api };
