import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import saleindex from '@/components/saleindex'
import  Getfdc_pm_unfare  from '@/components/Getfdc_pm_unfare.vue'
import Getfdc_pm_revfare from "@/components/Getfdc_pm_revfare.vue";
import GetOwnerHouse from "@/components/GetOwnerHouse.vue";
import GetRepaireList from "@/components/GetRepaireList.vue";
import GetComplaintList from "@/components/GetComplaintList.vue";
import Insertfdc_pm_repair from "@/components/Insertfdc_pm_repair.vue";
import GetRepairDetail from "@/components/GetRepairDetail.vue";
import Insertfdc_pm_repairByTousu from "@/components/Insertfdc_pm_repairByTousu.vue";
import BindHouse from "@/components/BindHouse.vue";
import SelectPayType from "@/components/SelectPayType.vue";
import MakePayUrl from "@/components/MakePayUrl.vue";

Vue.use(Router)
//console.info("获取根目录", window.location.pathname);
let baseUrl='/'   //base默认值是/ ,若要支持二级虚拟目录。需要设置为 /h5/这种形式。表示该vue项目放入h5虚拟目录下
//console.info("base", Router.base);
export default new Router({
  mode:'history',
  base:baseUrl,
  routes: [
    {    //登录页
      path: '/',
      name: 'login',
      component: login
    },
  
    {     //首页
      path: '/saleindex',
      name: 'saleindex',
      component: saleindex
    },
    {     //我要缴费
      path: '/Getfdc_pm_unfare',
      name: 'Getfdc_pm_unfare',
      component: Getfdc_pm_unfare
    },
    {     //缴费记录
      path: '/Getfdc_pm_revfare',
      name: 'Getfdc_pm_revfare',
      component: Getfdc_pm_revfare
    },
    {     //房产信息
      path: '/GetOwnerHouse',
      name: 'GetOwnerHouse',
      component: GetOwnerHouse
    },
    {     //报修记录
      path: '/GetRepaireList',
      name: 'GetRepaireList',
      component: GetRepaireList
    },
    {     //投诉记录
      path: '/GetComplaintList',
      name: 'GetComplaintList',
      component: GetComplaintList
    },
    {     //我要报修
      path: '/Insertfdc_pm_repair',
      name: 'Insertfdc_pm_repair',
      component: Insertfdc_pm_repair
    },
    {     //报修详情
      path: '/GetRepairDetail',
      name: 'GetRepairDetail',
      component: GetRepairDetail
    },
    {     //我要投诉
      path: '/Insertfdc_pm_repairByTousu',
      name: 'Insertfdc_pm_repairByTousu',
      component: Insertfdc_pm_repairByTousu
    },
    {     //绑定房屋信息
      path: '/BindHouse',
      name: 'BindHouse',
      component: BindHouse
    },
    {     //选择支付类型
      path: '/SelectPayType',
      name: 'SelectPayType',
      component: SelectPayType
    },
    {     //生成微信支付二维码
      path: '/MakePayUrl',
      name: 'MakePayUrl',
      component: MakePayUrl
    },
  ]
})
