819527061@qq.com
2024-04-07 3cc624019a6687a68690d33e9bf25702b129d77a
src/main.js
@@ -15,6 +15,7 @@
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';
@@ -46,9 +47,7 @@
Vue.use(ViewUI);
Vue.config.productionTip = false
Vue.use(ElementUI, {
    size: 'small'
});
Vue.use(ElementUI);
import echarts from 'echarts'
Vue.prototype.$echarts = echarts;
@@ -78,18 +77,28 @@
Vue.prototype.$systemconfig = {
// 服务端路径
    basePath: 'http://183.196.93.178:8089',
    //basePath:'http://127.0.0.1:8089'
    // basePath:'http://192.168.0.40:8089'
}
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('/');
//     }
router.beforeEach((to,from,next) => {
    if(to.meta.title === '峰峰矿区智慧停车') {
       document.title = to.meta.title
   }
    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)
@@ -110,6 +119,7 @@
//         } else {
//             next();
//         }
//     // }
// })
// router.beforeEach((to, from, next) => {
@@ -143,5 +153,6 @@
new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')