import Vue from 'vue' import VueRouter from 'vue-router' Vue.use(VueRouter) const routes = [ /** * 示例 */ { path: '/example/index', name: 'exampleIndex', meta: { title: "示例" }, component: () => import('../pages/example/index.vue'), }, /** * CKU审查员培训管理规定 */ { path: '/cku_examiner_train_info_doc/index', name: 'ckuExaminerTrainInfoIndex', meta: { title: "CKU审查员培训管理规定" }, component: () => import('../pages/cku_examiner_train_info_doc/index.vue'), }, /** * 登记卡转让 */ { path: '/registration_card_transfer/index', name: 'transferIndex', meta: { title: "登记卡转让" }, component: () => import('../pages/registration_card_transfer/index.vue'), }, /** * 登记卡转让申请 */ { path: '/registration_card_transfer/apply', name: 'transferApply', meta: { title: "登记卡转让申请" }, component: () => import('../pages/registration_card_transfer/apply.vue'), }, /** * 登记卡转让-确认信息 */ { path: '/registration_card_transfer/applyConfirm', name: 'transferApplyConfirm', meta: { title: "确认信息" }, component: () => import('../pages/registration_card_transfer/applyConfirm.vue'), }, /** * 登记卡转让详情 */ { path: '/registration_card_transfer/detail', name: 'transferDetail', meta: { title: "登记卡转让详情" }, component: () => import('../pages/registration_card_transfer/detail.vue'), }, /** * CKU美容师资格认证理论相关考试 */ { path: '/cku_beautician_exam/index', name: 'ckuBeauticianExamIndex', meta: { title: "美容师资格认证理论考试" }, component: () => import('../pages/cku_beautician_exam/index.vue'), }, { path: '/cku_beautician_exam/examMock', name: 'ckuBeauticianExamMock', meta: { title: "美容师资格认证理论模拟考试" }, component: () => import('../pages/cku_beautician_exam/examMock.vue'), }, { path: '/cku_beautician_exam/examDetail', name: 'ckuBeauticianExamDetail', meta: { title: "美容师资格认证理论考试" }, component: () => import('../pages/cku_beautician_exam/examDetail.vue'), }, { path: '/cku_beautician_exam/examSuccess', name: 'ckuBeauticianExamSuccess', meta: { title: "提交成功" }, component: () => import('../pages/cku_beautician_exam/examSuccess.vue'), }, // 金质联盟 { path: '/cku_golden_league/index', name: 'index', meta: { title: "待我审核" }, component: () => import('../pages/cku_golden_league/index.vue'), }, { path: '/cku_golden_league/detail', name: 'detail', meta: { title: "待我审核详情" }, component: () => import('../pages/cku_golden_league/detail.vue'), }, ] const router = new VueRouter({ base: '/app-breed-h5/', routes }) router.beforeEach((to, from, next) => { if (to.meta.title) {//如果设置标题,拦截后设置标题 document.title = to.meta.title } document.documentElement.scrollTop = 0 document.body.scrollTop = 0 next() }) export default router