import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/New_1',
    name: 'New_1',
    component: () => import('../views/newlist/new_1.vue')
  },
  {
    path: '/New_2',
    name: 'New_2',
    component: () => import('../views/newlist/new_2.vue')
  },
  {
    path: '/New_3',
    name: 'New_3',
    component: () => import('../views/newlist/new_3.vue')
  },
  {
    path: '/New_4',
    name: 'New_4',
    component: () => import('../views/newlist/new_4.vue')
  },
  {
    path: '/aboutus',
    name: 'aboutus',
    component: () => import('../views/aboutus')
  },
  {
    path: '/goods',
    name: 'goods',
    component: () => import('../views/service/goods.vue')
  },
  {
    path: '/marketing',
    name: 'marketing ',
    component: () => import('../views/service/marketing.vue')
  },
  {
    path: '/platform',
    name: 'platform',
    component: () => import('../views/service/platform.vue')
  },
  {
    path: '/technology',
    name: 'technology',
    component: () => import('../views/service/technology.vue')
  },
  {
    path: '/programme',
    name: 'programme',
    component: () => import('../views/solution/programme.vue')
  },
  {
    path: '/purchasing',
    name: 'purchasing',
    component: () => import('../views/solution/purchasing.vue')
  },
  {
    path: '/welfare',
    name: 'welfare',
    component: () => import('../views/solution/welfare.vue')
  },
  {
    path: '/number',
    name: 'number',
    component: () => import('../views/cases/number.vue')
  },
  {
    path: '/info',
    name: 'info',
    component: () => import('../views/cases/info.vue')
  },
  {
    path: '/material',
    name: 'material',
    component: () => import('../views/cases/material.vue')
  },
  {
    path: '/benefits',
    name: 'benefits',
    component: () => import('../views/cases/benefits.vue')
  }
]
const router = new VueRouter({
  routes,
  scrollBehavior (to, from, saveTop) {
    if (saveTop) { return saveTop } else { return { x: 0, y: 0 } }
  }
})

export default router
