|
@@ -62,26 +62,27 @@ router.beforeEach(async (to, from, next) => {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (powerCheckWhiteList.includes(to.name) || regListCheck(powerCheckPathWhiteRegList, to.path)) {
|
|
if (powerCheckWhiteList.includes(to.name) || regListCheck(powerCheckPathWhiteRegList, to.path)) {
|
|
- if (to.name === 'ent_ser_portrait') {
|
|
|
|
- // 访问超级订阅画像,如果有权限就重定向到大会员画像
|
|
|
|
- if (info.memberStatus > 0 && (power.indexOf(4) !== -1 || power.indexOf(13) !== -1)) {
|
|
|
|
- if (to.query.ismedical === '1') {
|
|
|
|
- next({
|
|
|
|
- path: `/ent_portrait/${encodeURIComponent(to.params.eId)}?ismedical=1`,
|
|
|
|
- replace: true
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- next({
|
|
|
|
- path: `/ent_portrait/${encodeURIComponent(to.params.eId)}`,
|
|
|
|
- replace: true
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ // 权限列表:https://app-jytest.jydev.jianyu360.com/jyapp/big-member/js/main_root_data.js
|
|
|
|
+ // 4.企业全景分析
|
|
|
|
+ // 13.企业中标动态
|
|
|
|
+ const hasEntPortPower = info.memberStatus > 0 && (power.includes(4) || power.includes(13))
|
|
|
|
+ if (hasEntPortPower) {
|
|
|
|
+ // 大会员有画像权限用户,访问超级订阅画像,则重定向到大会员画像
|
|
|
|
+ if (to.name === 'ent_ser_portrait') {
|
|
|
|
+ next({
|
|
|
|
+ path: `/ent_portrait/${encodeURIComponent(to.params.eId)}`,
|
|
|
|
+ replace: true,
|
|
|
|
+ query: {
|
|
|
|
+ // ?ismedical=1
|
|
|
|
+ ismedical: to.query.ismedical
|
|
|
|
+ }
|
|
|
|
+ })
|
|
} else {
|
|
} else {
|
|
next()
|
|
next()
|
|
}
|
|
}
|
|
- } else if (to.name === 'ent_portrait') {
|
|
|
|
- // 访问大会员画像,如果无权限就重定向到超级订阅画像
|
|
|
|
- if (info.memberStatus < 0 || (power.indexOf(4) === -1 || power.indexOf(13) === -1)) {
|
|
|
|
|
|
+ } else {
|
|
|
|
+ if (to.name === 'ent_portrait') {
|
|
|
|
+ // 其他无画像权限用户,访问大会员画像,则重定向到超级订阅画像
|
|
next({
|
|
next({
|
|
path: `/svip/ent_ser_portrait/${encodeURIComponent(to.params.eId)}`,
|
|
path: `/svip/ent_ser_portrait/${encodeURIComponent(to.params.eId)}`,
|
|
replace: true
|
|
replace: true
|
|
@@ -89,8 +90,6 @@ router.beforeEach(async (to, from, next) => {
|
|
} else {
|
|
} else {
|
|
next()
|
|
next()
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- next()
|
|
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
let href = '/big/page/index'
|
|
let href = '/big/page/index'
|