// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import BasicLayout from '@/layouts/basic-layout';
import Setting from "@/setting";

const pre = 'agent_';
const meta = {
    auth: true
};
export default {
    path: `${Setting.roterPre}/agent`,
    name: 'agent',
    header: 'agent',
    // redirect: {
    //     name: `${pre}agentManage`
    // },
    meta,
    component: BasicLayout,
    children: [
        {
            path: 'agent_manage/index',
            name: `${pre}agentManage`,
            meta: {
                auth: ['agent-agent-manage'],
                title: '分销员管理'
            },
            component: () => import('@/pages/agent/agentManage')
        },
        {
            path: 'agreement',
            name: `${pre}agreementt`,
            meta: {
                auth: ['agent-agreement'],
                title: '分销说明'
            },
            component: () => import('@/pages/agent/agreement')
        },
		{
		    path: 'kpi/index',
		    name: `${pre}kpi`,
		    meta: {
		        auth: ['admin-agent-kpi-index'],
		        title: '业绩记录'
		    },
		    component: () => import('@/pages/agent/kpi/index')
		},
		{
		    path: 'global/index',
		    name: `${pre}global`,
		    meta: {
		        auth: ['admin-agent-global-index'],
		        title: '全局奖励'
		    },
		    component: () => import('@/pages/agent/global/index')
		},
		{
		    path: 'global/add',
		    name: `${pre}globalAdd`,
		    meta: {
		        auth: ['admin-agent-global-add'],
		        title: '添加全局奖励'
		    },
		    component: () => import('@/pages/agent/global/create')
		}
    ]
};
