import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'index',
    component: () => import('@/views/index/cc-index.vue') //首页
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/login_index.vue') //登录
  },
  {
    path: '/invite',
    name: 'invite',
    component: () => import('@/views/login/invite.vue') //邀请
  },
  {
    path: '/error',
    name: 'error',
    component: () => import('@/views/login/error.vue') //错误页面
  },
  {
    path: '/cc_list',
    name: 'cc_list',
    component: () => import('@/views/index/cc-index.vue') //首页
  },
  {
    path: '/all_profit',
    name: 'all_profit',
    component: () => import('@/views/my/inner-page/all_profit.vue') //总收益
  }
  // {
  //   path: '/about',
  //   name: 'about',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
