import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [{
        path: "/user",
        name: "user",
        redirect: "/user/login",
        component: () =>
            import ("@/views/pages/user"),
        children: [{
                path: "login",
                name: "login",
                component: () =>
                    import ("@/views/pages/user/login")
            },
            {
                path: "register",
                name: "register",
                component: () =>
                    import ("@/views/pages/user/register")
            },
            {
                path: "forgetpassword",
                name: "forgetpassword",
                component: () =>
                    import ("@/views/pages/user/forgetPassword")
            }
        ]
    },
    {
        path: "/placeorder",
        name: "placeorder",
        component: () =>
            import ("@/views/pages/placeorder")
    },
    {
        path: "/jdbycdetailtm",
        name: "jdbycdetailtm",
        component: () =>
            import ("@/views/pages/jdbycdetailtm")
    },
    {
        path: "/companydetail",
        name: "companydetail",
        component: () =>
            import ("@/views/pages/companydetail")
    },
    {
        path: "/jdindentlist",
        name: "jdindentdetail",
        component: () =>
            import ("@/views/pages/jdindentlist")
    },
    {
        path: "/jdindentdetail",
        name: "jdindentdetail",
        component: () =>
            import ("@/views/pages/jdindentdetail")
    },
    /////////
    {
        path: "/jdtrademark",
        name: "jdtrademark",
        component: () =>
            import ("@/views/pages/jdtrademark/Jdtrademark")
    },
    {
        path: "/selftmreg",
        name: "selftmreg",
        component: () =>
            import ("@/views/pages/selftmreg/Selftmreg"),
        // 默认页面是一级路由下的第一个子路由
        redirect: "/selftmreg/basic",
        // 配置二级路由
        children: [
            // 第一步：填写基本信息
            {
                path: "basic",
                component: () =>
                    import ("@/views/pages/selftmreg/ModifyTrademark")
            },
            // 第二步：填写申请人信息
            {
                path: "user",
                component: () =>
                    import ("@/views/pages/selftmreg/ApplicationInfo")
            },
            // 第三步：确认订单
            {
                path: "confirm",
                component: () =>
                    import ("@/views/pages/selftmreg/ConfirmOrder")
            },
            // 第四步：支付订单
            {
                path: "pay",
                component: () =>
                    import ("@/views/pages/selftmreg/PayOrder")
            }
        ]
    },
    {
        // path: "/bycnoticeindex",
        path: "/bycnoticeindex",
        name: "bycnoticeindex",
        component: () =>
            import ("@/views/pages/bycnoticeindex/Bycnoticeindex")
    }
];
const router = new VueRouter({
    routes
});

export default router;