|
|
@ -4,7 +4,7 @@ import util from "@/libs/util"; |
|
|
|
|
|
|
|
|
|
|
|
const whiteList = Setting.whiteList // 白名单
|
|
|
|
const whiteList = Setting.whiteList // 白名单
|
|
|
|
router.beforeEach((to, from, next) => { |
|
|
|
router.beforeEach((to, from, next) => { |
|
|
|
document.title = to.path === '/screenShow' || to.path === '/screenShowPro' ? '安农大数据可视化看板' : Setting.titleSuffix + '-' + to.meta.title |
|
|
|
document.title = to.path === '/screenShow' || to.path === '/screenShowPro' ? '安徽省绿色食品全产业链数据可视化看板' : Setting.titleSuffix + '-' + to.meta.title |
|
|
|
const role = util.local.get(Setting.tokenKey); |
|
|
|
const role = util.local.get(Setting.tokenKey); |
|
|
|
if (!role && !whiteList.includes(to.path)) { |
|
|
|
if (!role && !whiteList.includes(to.path)) { |
|
|
|
next('/login') |
|
|
|
next('/login') |
|
|
|