5.20 roleId改为roleCode
This commit is contained in:
@ -57,9 +57,9 @@ const Loading: React.FC<{}> = () => {
|
||||
}
|
||||
//跳转
|
||||
const redirect = async (userData: any, url: string, extra: any) => {
|
||||
const roleId = getURLInformation('roleId');
|
||||
if (isNotEmpty(roleId)) {
|
||||
const authIndex = userData.authorityList.findIndex((ite: any) => ite.roleId == roleId);
|
||||
const roleCode = getURLInformation('roleCode');
|
||||
if (isNotEmpty(roleCode)) {
|
||||
const authIndex = userData.authorityList.findIndex((ite: any) => ite.roleCode == roleCode);
|
||||
if (authIndex != -1) {
|
||||
setUserData(userData, userData.authorityList[authIndex].roleCode, userData.authorityList[authIndex])//角色信息存储
|
||||
} else {
|
||||
@ -156,7 +156,7 @@ const Loading: React.FC<{}> = () => {
|
||||
for (let key in urlData) {
|
||||
if (key != 'code') {
|
||||
str = str + '&' + key + '=' + urlData[key]
|
||||
if (key != 'page' && key != 'roleId') {
|
||||
if (key != 'page' && key != 'roleCode') {
|
||||
obj[key] = urlData[key]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user