import Vue from 'vue'
import Router from 'vue-router'
import config from '../config'
Vue.use(Router)
export default new Router({
  mode: 'history',
  base: `/${config.project}/`,
  routes: [
    {
      path: '/login',
      name: 'Login',
      component: () => import(/* webpackChunkName: 'wxlogin' */ '@/pages/login'),
    },
    {
      // path: '/salesCenter/activity/lotteryActivity.do',
      path: '/',
      name: 'test',
      component: () => import(/* web packChunkName: 'wxhome' */ '@/pages/home'),
      children: [
        {
          path: 'marketing',
          name: 'marketing',
          component: () => import(/* webpackChunkName: 'marketing' */ '@/pages/marketingCenter'),
        },
        {
          path: 'addmarketing',
          name: 'addmarketing',
          component: () => import(/* webpackChunkName: 'wxlogin' */ '@/pages/addmarketing'),
        },
      ],
    },
  ],
})
