import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  //首页
  {
    path: '/',
    name: 'home',
    component: () => import('../views/HomeView.vue'),
    meta:{
      needlogin:true
    }
  },
  {
    //登录页
    path: '/login',
    name: 'login',
    component: () => import('../views/LoginView.vue')
  },
  {
    //客流分析详情
    path: '/keliufenxidetail',
    name: 'keliufenxidetail',
    component: () => import('../views/TableDetail/KLFXtable.vue')
  },
  {
    //销售分析详情
    path: '/xiaoshoufenxidetail',
    name: 'xiaoshoufenxidetail',
    component: () => import('../views/TableDetail/XSFXtable.vue')
  },
  {
    //分期业务详情
    path: '/fenqiyewudetail',
    name: 'fenqiyewudetail',
    component: () => import('../views/TableDetail/FQYWtable.vue')
  },
  {
    //产值统计详情
    path: '/chanzhitongjidetail',
    name: 'chanzhitongjidetail',
    component: () => import('../views/TableDetail/CZTJtable.vue')
  },
  {
    //售后入厂台次详情
    path: '/ruchangtaicidetail',
    name: 'ruchangtaicidetail',
    component: () => import('../views/TableDetail/RCTCtable.vue')
  },
  {
    //交车排行
    path: '/jiaochepaihangdetail',
    name: 'jiaochepaihangdetail',
    component: () => import('../views/TableDetail/JCPHtable.vue')
  },
  {
    //售后入厂产值分析详情
    path: '/ruchangchanzhidetail',
    name: 'ruchangchanzhidetail',
    component: () => import('../views/TableDetail/RCCZtable.vue')
  },
  {
    //客源分析详情
    path: '/keyuanfenxidetail',
    name: 'keyuanfenxidetail',
    component: () => import('../views/TableDetail/KYFXtable.vue')
  },
  {
    //保险承保核保详情
    path: '/baoxianchengbaodetail',
    name: 'baoxianchengbaodetail',
    component: () => import('../views/TableDetail/BXCBtable.vue')
  },
  {
    //库存分析详情
    path: '/kucunfenxidetail',
    name: 'kucunfenxidetail',
    component: () => import('../views/TableDetail/KCFXtable.vue')
  },
  {
    //保客分析详情
    path: '/baokefenxidetail',
    name: 'baokefenxidetail',
    component: () => import('../views/TableDetail/BKFXtable.vue')
  },
  {
    //chart
    path: '/chart',
    name: 'chart',
    component: () => import('../components/HomeChart/KLFX.vue')
  },

]

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

export default router
