| | |
| | | import TscPrintUtil from './assets/js/TscPrintUtil' |
| | | import Print from './assets/js/print' |
| | | import moment from 'moment' |
| | | import store from './store/index' // 引入vuex |
| | | Vue.prototype.$moment = moment; |
| | | Vue.use(Print) // 注册 |
| | | import ViewUI from 'view-design'; |
| | |
| | | Vue.prototype.$byutil = byUtils |
| | | Vue.prototype.$stringUtil = StringUtil |
| | | Vue.prototype.$tscPrintUtil = TscPrintUtil |
| | | |
| | | // const rolesList = JSON.parse(localStorage.getItem('userRouters')) |
| | | //使用钩子函数对路由进行权限跳转 |
| | | // router.beforeEach((to, from, next) => { |
| | | // let user = byUtils.getUser() |
| | | // if (!user && to.path!== '/') { |
| | | // next('/'); |
| | | // } |
| | | |
| | | // console.log(to,"触发了",router.options.routes); |
| | | // // type 2 : all admin |
| | | // // type 0 : 泊车 id:2 |
| | | // // type 1 : 执法 id:3 |
| | | |
| | | |
| | | |
| | | // next(); |
| | | // // |
| | | // // if (to.path==='/login') { |
| | | // // byUtils.setUser(null) |
| | |
| | | // } else { |
| | | // next(); |
| | | // } |
| | | |
| | | // // } |
| | | // }) |
| | | // router.beforeEach((to, from, next) => { |
| | |
| | | |
| | | new Vue({ |
| | | router, |
| | | store, |
| | | render: h => h(App) |
| | | }).$mount('#app') |