更新企微投放权限

This commit is contained in:
王博冉
2022-11-11 14:04:00 +08:00
parent c59abc0e5a
commit 252f87bc07
3 changed files with 56 additions and 37 deletions

View File

@@ -278,7 +278,7 @@ const constantRoutes = [
{
path: 'enterprise-weChat',
name: 'enterprise-weChat',
meta: { showPreview: false, showPublish: false, keepAlive: true, showShare: true },
meta: { showPreview: false, showPublish: false, keepAlive: true, showShare: true, permission:'super_admin_flag' },
component: () => import(/* webpackChunkName: "publish" */ '@/views/Publish/launch-center/launch-task/enterpriseWeChat')
},
// {
@@ -424,6 +424,16 @@ router.beforeEach((to, from, next) => {
// window.parent.location.href = 'https://yip-uat.dctest.digitalyili.com/login';
}
}
if(!to.meta.permission) {
next()
return
}
if(!JSON.parse(localStorage.getItem('plantUserInfo'))[to.meta.permission]) {
next({
path:'/error/404',
})
return
}
next()
})
export default router