import Vue from 'vue'
import Router from 'vue-router'
import benefit from '@/pages/benefit';
import benefitKd from '@/pages/benefitKd';
import userInput from '@/pages/userInput'
Vue.use(Router)
const originalPush = Router.prototype.push;
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
};
export default new Router({
  // mode: 'history',  //去掉url中的#
  routes: [
    {
      path: '/benefitKd',
      name: 'benefitKd',
      component: benefitKd
    },
    {
      path: '/benefit',
      name: 'benefit',
      component: benefit
    },
    {
      path: '/input',
      name: 'userInput',
      component: userInput
    },
  
    {path:'',redirect:"benefit"}
  ]
})
