08335 / hivui-platform-template
hivui平台项目模板
Newer
Older
hivui-platform-template / project / hivuiMain / permission.js
caibinghong on 4 Jun 2021 add
import router from './router'
import store from './store'
router.beforeEach((to, from, next) => {
    if(to.meta.title){
        document.title=to.meta.title;
    }    
    store.dispatch('initApp').then(i=>{
        store.dispatch('setAppLoad','success')
        // console.log('//初始化成功!')
        next();
    }).catch(e=>{
        store.dispatch('setAppLoad','failed')
    });
    
});
router.afterEach((to,form)=>{
    // location.hash = location.hash.replace(/(#\/){1,}/gi,"#/");
    // console.log('-----------------router.afterEach---------------',new Date(),location.hash );
});