8.24 专家库跳转S类型参数修改
This commit is contained in:
@ -12,7 +12,7 @@ import { ConnectState } from '@/models/connect';
|
|||||||
import { getMatchMenu } from '@umijs/route-utils';
|
import { getMatchMenu } from '@umijs/route-utils';
|
||||||
import { getMenu } from './services'
|
import { getMenu } from './services'
|
||||||
import logo from '../assets/logo.svg';
|
import logo from '../assets/logo.svg';
|
||||||
import { getSessionRoleData } from '@/utils/session';
|
import { getSessionRoleData, getSessionUserData } from '@/utils/session';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
HomeOutlined,
|
HomeOutlined,
|
||||||
@ -140,6 +140,8 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
|
|||||||
const [menuData, setMenuData] = React.useState<any>();
|
const [menuData, setMenuData] = React.useState<any>();
|
||||||
const [menuShow, setmenuShow] = React.useState<any>(false);
|
const [menuShow, setmenuShow] = React.useState<any>(false);
|
||||||
const menuDataRef = useRef<MenuDataItem[]>([]);
|
const menuDataRef = useRef<MenuDataItem[]>([]);
|
||||||
|
const mall3_token: any = sessionStorage.getItem('Authorization');//当前登录token
|
||||||
|
const userData: any = getSessionUserData();//当前登录人信息
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (getSessionRoleData()?.roleId) {
|
if (getSessionRoleData()?.roleId) {
|
||||||
let params = {
|
let params = {
|
||||||
@ -206,7 +208,9 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
|
|||||||
} else if (menuItemProps.frame && menuItemProps.frame == 'Y') {
|
} else if (menuItemProps.frame && menuItemProps.frame == 'Y') {
|
||||||
return <Link onClick={() => window.open(menuItemProps.path)} to="#">{defaultDom}</Link>;
|
return <Link onClick={() => window.open(menuItemProps.path)} to="#">{defaultDom}</Link>;
|
||||||
} else if (menuItemProps.frame && menuItemProps.frame == 'S') {
|
} else if (menuItemProps.frame && menuItemProps.frame == 'S') {
|
||||||
return <Link onClick={() => window.open(menuItemProps.path + '&mall3_token=' + sessionStorage.getItem('Authorization'))} to="#">{defaultDom}</Link>;
|
const initPath = menuItemProps.path;
|
||||||
|
const rePath = initPath?.replace("{mall3_token}", mall3_token).replace("{loginName}", userData.loginName).replace("{organizationId}", userData.organizationId);
|
||||||
|
return <Link onClick={() => window.open(rePath)} to="#">{defaultDom}</Link>;
|
||||||
} else {
|
} else {
|
||||||
return <Link to={menuItemProps.path}>{defaultDom}</Link>;
|
return <Link to={menuItemProps.path}>{defaultDom}</Link>;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user