1 //全站权限设置 2 //permission.js 3 4 const lockPage = store.getters.website.lockPage; //锁屏页 5 6 7 if (store.getters.isLock && to.path !== lockPage) { //如果系统激活锁屏,全部跳转到锁屏页 8 next({ path: lockPage }) 9 }
1 //全局配置文件 website.js 2 3 lockPage: '/lock',
保存 到vuex的state中