5.20 roleId改为roleCode

This commit is contained in:
jl-zhoujl2
2022-05-20 09:32:06 +08:00
parent 4bcedc11e5
commit 5f79636b27

View File

@ -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]
}
}