在main.js里面 进行路由跳转的时候 进行判断
router.beforeEach((to, from, next) => {
window.addEventListener("visibilitychange", function () {
//账号C_UserID 唯一性
if (document.hidden == false && store.state.user.C_UserID !=
JSON.parse(localStorage.getItem("BaseInfo"))
.C_UserID) {
window.location.reload();
if (localStorage.getItem('Priv').indexOf(router.apps[0]._route.path) < 0) {
next({
path: '/home'
})
}
}
})
})
})