123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313 |
- import Vue from 'vue'
- import VueRouter from 'vue-router'
- if (!window.VueRouter) Vue.use(VueRouter)
- const routes = [
- //选择场景
- {
- path: '/',
- name: 'Home',
- component: () => import('../views/Home.vue'),
- meta: {
- title: '首页',
- }
- },
- //用户基础页面
- {
- path: '/user',
- component: () => import('../views/Layout.vue'),
- children: [
- //登录
- {
- path: 'login',
- name: 'UserLogin',
- component: () => import('../views/User/Login.vue'),
- meta: {
- title: '登录',
- }
- },
- //上传照片
- {
- path: 'uploadPhoto',
- name: 'UserUploadPhoto',
- component: () => import('../views/User/UploadPhoto.vue'),
- meta: {
- title: '上传照片',
- }
- },
- //选择身份
- {
- path: 'role',
- name: 'UserRole',
- component: () => import('../views/User/Role.vue'),
- meta: {
- title: '选择身份',
- }
- },
- ]
- },
- //微信页面
- {
- path: '/wx',
- component: () => import('../views/Layout.vue'),
- children: [
- //活动中心
- {
- path: 'activity',
- component: () => import('../views/Layout.vue'),
- children: [
- //活动中心列表
- {
- path: 'list',
- name: 'WxActivityList',
- component: () => import('../views/Wx/Activity/List.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '活动中心列表',
- }
- },
- //活动中心详情
- {
- path: 'info',
- name: 'WxActivityInfo',
- component: () => import('../views/Wx/Activity/Info.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '活动中心详情',
- }
- },
- //我发布的活动
- {
- path: 'myList',
- name: 'WxActivityMyList',
- component: () => import('../views/Wx/Activity/MyList.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '我发布的活动',
- }
- },
- //发布的活动
- {
- path: 'form',
- name: 'WxActivityForm',
- component: () => import('../views/Wx/Activity/Form.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '发布的活动',
- }
- },
- ]
- },
- //关于我们
- {
- path: 'about',
- component: () => import('../views/Layout.vue'),
- children: [
- //联系我们
- {
- path: 'contact',
- name: 'WxAboutContact',
- component: () => import('../views/Wx/About/Contact.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '联系我们',
- }
- },
- ]
- },
- ]
- },
- //多场景注册
- {
- path: '/register',
- component: () => import('../views/Layout.vue'),
- children: [
- //选择行业
- {
- path: 'home',
- name: 'RegisterHome',
- component: () => import('../views/Register/Home.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '选择行业',
- }
- },
- //工厂园区员工
- {
- path: 'business',
- component: () => import('../views/Layout.vue'),
- children: [
- //选择单位
- {
- path: 'step1',
- name: 'RegisterBusinessStep1',
- component: () => import('../views/Register/Business/Step1.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '选择单位',
- }
- },
- //选择地区
- {
- path: 'step2',
- name: 'RegisterBusinessStep2',
- component: () => import('../views/Register/Business/Step2.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '选择地区',
- }
- },
- //选择部门-养老员工也可用
- {
- path: 'step3',
- name: 'RegisterBusinessStep3',
- component: () => import('../views/Register/Business/Step3.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '选择部门',
- }
- },
- //填写信息-养老员工也可用
- {
- path: 'step4',
- name: 'RegisterBusinessStep4',
- component: () => import('../views/Register/Business/Step4.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '填写信息',
- }
- },
- ],
- },
- //社区住宅
- {
- path: 'residence',
- component: () => import('../views/Layout.vue'),
- children: [
- //选择小区
- {
- path: 'step1',
- name: 'RegisterResidenceStep1',
- component: () => import('../views/Register/Residence/Step1.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '选择小区',
- }
- },
- //选择地区
- {
- path: 'step2',
- name: 'RegisterResidenceStep2',
- component: () => import('../views/Register/Residence/Step2.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '选择地区',
- }
- },
- //选择房号
- {
- path: 'step3',
- name: 'RegisterResidenceStep3',
- component: () => import('../views/Register/Residence/Step3.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '选择房号',
- }
- },
- //填写信息
- {
- path: 'step4',
- name: 'RegisterResidenceStep4',
- component: () => import('../views/Register/Residence/Step4.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '填写信息',
- }
- },
- ],
- },
- //养老长者
- {
- path: 'pension',
- component: () => import('../views/Layout.vue'),
- children: [
- //选择养老
- {
- path: 'step1',
- name: 'RegisterPensionStep1',
- component: () => import('../views/Register/Pension/Step1.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '选择养老',
- }
- },
- //养老机构筛选
- {
- path: 'step2',
- name: 'RegisterPensionStep2',
- component: () => import('../views/Register/Pension/step2.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '养老机构筛选',
- }
- },
- //选择房号
- {
- path: 'step3',
- name: 'RegisterPensionStep3',
- component: () => import('../views/Register/Pension/step3.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '选择房号',
- }
- },
- //填写信息
- {
- path: 'step4',
- name: 'RegisterPensionStep4',
- component: () => import('../views/Register/Pension/Step4.vue'),
- meta: {
- requireAuth: false,
- role: [],
- title: '填写信息',
- }
- },
- ],
- },
- ],
- }
- ]
- const router = new VueRouter({
- //base: process.env.BASE_URL,
- routes
- })
- export default router
|