import Vue from 'vue'
import VueRouter from 'vue-router'
// 上传记录
import UploadRecord from '../views/data/UploadRecord.vue'
// 厂商链接上传
import UploadLinks from '../views/data/UploadLinks.vue'  
// 经销商链接上传
import UploadLink from '../views/data/UploadLink.vue'
// 上传资料
import UploadInfor from '../views/data/UploadInfor.vue'
// 资料列表
import InforList from '../views/data/InforList.vue'

// 厂商账号管理
import AccountIndex from '../views/account/AccountIndex.vue'
// 经销商账号管理
import AccountManage from '../views/account/AccountManage.vue'

// 参数设置
import ParameterIndex from '../views/parameter/ParameterIndex.vue'
// 车系车型
import CarSeries from '../views/parameter/CarSeries'
// 平台模块
import PlatformModule from '../views/parameter/PlatformModule'
//内容分类1
import ContentCategory1 from '../views/parameter/ContentCategory1'
//内容分类2
import ContentCategory2 from '../views/parameter/ContentCategory2'
// 媒体平台
import MediaPlatform  from '../views/parameter/MediaPlatform'
// 权限分组
import Grouping from '../views/parameter/Grouping'
// 链接上传
import LinkUpload  from '../views/parameter/LinkUpload'
// 常用参数
import CommonParam  from '../views/parameter/CommonParam'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: UploadInfor,
    redirect: '/uploadInfor'
  },
  {
    path: '/uploadRecord',
    component: UploadRecord
  },
  {
    path: '/uploadLink',
    component: UploadLink
  },
  {
    path: '/uploadLinks',
    component:UploadLinks
  },
  {
    path: '/uploadInfor',
    component: UploadInfor
  },
  {
    path: '/inforList',
    component: InforList
  },
  {
    path: '/accountIndex',
    component: AccountIndex
  },
  {
    path: '/accountManage',
    component: AccountManage
  },
  {
    path: '/parameterIndex',
    component: ParameterIndex,
    children: [
      {
        path: '',
        component: CarSeries,
        redirect: 'carSeries'
      },
      {
        path: 'carSeries',
        component: CarSeries
      },
      {
        path: 'platformModule',
        component: PlatformModule
      },
      {
        path: 'contentCategory1',
        component: ContentCategory1
      },
      {
        path: 'contentCategory2',
        component: ContentCategory2
      },
      {
        path: 'mediaPlatform',
        component: MediaPlatform
      },
      {
        path: 'grouping',
        component: Grouping
      },
      {
        path: 'linkUpload',
        component: LinkUpload
      },
      {
        path: 'commonParam',
        component: CommonParam
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
