123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- import Vue from 'vue'
- import VueRouter from 'vue-router'
- import Home from '../views/Index.vue'
- Vue.use(VueRouter)
- const routes = [
- // {
- // path: '/',
- // redirect: 'ExamineDetail',
- // },
- {
- path: '/',
- name: 'Home',
- mate: {
- showTabBar: true
- },
- component: Home
- },
-
- // ====== 申请页面
- {
- path: '/applyfor',
- name: 'Applyfor',
- meta: {
- keepAlive: true
- },
- component: () => import(/* webpackChunkName: "index" */ '../views/applyfor/index.vue')
- },
- {
- // NOTE: 自己书写外部出差人员
- path: '/applyfor/peers-out-form',
- name: 'PeersOutForm',
- component: () => import(/* webpackChunkName: "index" */ '../views/applyfor/peersOutForm.vue')
- },
- {
- path: '/applyfor/type6-before',
- name: 'AskForLeave',
- component: () => import(/* webpackChunkName: "type6" */ '../views/applyfor/askForLeaveType.vue')
- },
- {
- path: '/applyfor/product-store',
- name: 'ProductStore',
- component: () => import(/* webpackChunkName: "applyfor" */ '../views/applyfor/ProductStore.vue')
- },
- {
- path: '/applyfor/goods',
- name: 'Goods',
- component: () => import(/* webpackChunkName: "applyfor" */ '../views/applyfor/goods.vue')
- },
- {
- path: '/applyfor/goods-specifications',
- name: 'GoodsSpeci',
- component: () => import(/* webpackChunkName: "applyfor" */ '../views/applyfor/goods-specifications.vue')
- },
- {
- path: '/applyfor/goods-unit',
- name: 'GoodsUnit',
- component: () => import(/* webpackChunkName: "applyfor" */ '../views/applyfor/goods-unit-price.vue')
- },
- // NOTE:我的审核状态
- {
- path: '/apply-state',
- name: 'ApplyState',
- component: () => import(/* webpackChunkName: "index" */ '../views/apply-state/index.vue')
- },
- // ====== 审核页面
- {
- path: '/approve',
- name: 'Approve',
- mate: {
- showTabBar: true
- },
- // route level code-splitting
- // this generates a separate chunk (about.[hash].js) for this route
- // which is lazy-loaded when the route is visited.
- component: () => import(/* webpackChunkName: "approve" */ '../views/Approve.vue')
- },
- {
- path: '/approve/search',
- name: 'Search',
- component: () => import(/* webpackChunkName: "approve" */ '../views/approve/search.vue')
- },
- {
- path: '/approve/examine',
- name: 'Examine',
- component: () => import(/* webpackChunkName: "approve" */ '../views/approve/examine.vue')
- },
- {
- path: '/approve/detail',
- name: 'ExamineDetail',
- component: () => import(/* webpackChunkName: "approve" */ '../views/approve/detail.vue')
- },
- // ====== 我的页面
- {
- path: '/my',
- name: 'My',
- meta: { title: '我的', showTabBar: true },
- component: () => import(/* webpackChunkName: "personnel" */ '../views/My.vue'),
- },
- {
- path: '/user-info',
- name: 'Userinfo',
- component: () => import(/* webpackChunkName: "personnel" */ '../views/personal/Userinfo.vue')
- },
- {
- path: '/user-info/single-info',
- name: 'Singleinfo',
- component: () => import(/* webpackChunkName: "personnel" */ '../views/personal/single-info.vue')
- },
- {
- path: '/update/nickname',
- name: 'Nickname',
- component: () => import(/* webpackChunkName: "personnel" */ '../views/personal/nickname.vue')
- },
- {
- path: '/update/mobile',
- name: 'Mobile',
- component: () => import(/* webpackChunkName: "personnel" */ '../views/personal/phone-number.vue')
- },
- {
- path: '/update/signature',
- name: 'Signature',
- component: () => import(/* webpackChunkName: "personnel" */ '../views/personal/signature.vue')
- },
-
- ]
- const router = new VueRouter({
- routes,
- mode: 'hash'
- })
- router.beforeEach((to, from, next) => {
- // console.log('>>>>> beforeEach >>>>>');
- // console.log('to', to);
- // console.log('form', from);
- // console.log('<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<');
- // TODO: 该位置设置navigation title
- next()
- })
- export default router
|