Commit 81886e11 by 王禹桐

fixed: bug图标隐藏

parent 2564c2d0
......@@ -86,7 +86,10 @@ class Header extends PureComponent {
</div>
)}
<div className={styles.logo}>
<img className={styles.image} src={nav.logo ? nav.logo : ""} />
<img
className={styles.image}
src={nav.logo ? nav.logo : headerLogo}
/>
</div>
</div>
<div className={styles.rightContainer}>
......
......@@ -1167,7 +1167,7 @@ class homePage extends Component {
this.props.logoSiteList.data.logo
? this.props.logoSiteList.data &&
this.props.logoSiteList.data.logo
: ""
: defaultLogo
}
/>
{/* bug-11957-jmy 图片盖住了文字*/}
......
......@@ -207,12 +207,12 @@ class Login extends React.Component {
>
<div className={style.top}>
<div className={style.left}>
{companySiteCode === shenWanHongYuanCode ? null : (
{/* {companySiteCode === shenWanHongYuanCode ? null : (
<img
src={require("./imgages/logo1.png")}
style={{ height: "30px", width: "92px", marginRight: "13px" }}
/>
)}
)} */}
企业学习平台管理后台
</div>
{/* 暂时注释 2期上 */}
......
......@@ -73,8 +73,6 @@ class Head extends React.PureComponent {
collapsed,
});
});
};
render() {
let pathnames = getPathname();
......@@ -89,7 +87,7 @@ class Head extends React.PureComponent {
companyCode,
match,
history,
toAssToken
toAssToken,
} = this.props;
const { collapsed } = this.state;
const { onCollapseChange } = this;
......@@ -125,7 +123,7 @@ class Head extends React.PureComponent {
username: null,
fixed: true,
onToAss() {
toAssToken()
toAssToken();
},
onSignOut() {
dispatch({ type: "app/signOut" });
......@@ -138,7 +136,7 @@ class Head extends React.PureComponent {
},
onMenuClick() {
cookie.remove("token", "");
sessionStorage.clear("mgtk")
sessionStorage.clear("mgtk");
history.push(`${match.url}/login`);
},
};
......@@ -150,12 +148,22 @@ class Head extends React.PureComponent {
<div
className={styles.container}
// style={{ paddingTop: pathnames.includes("homepage")!=true ? 132 : 60 }}
style={{ paddingTop: pathnames.includes("homepage") != true ? 64 : 64 }}
style={{
paddingTop: pathnames.includes("homepage") != true ? 64 : 64,
}}
id="primaryLayout"
>
<Header {...headerProps} />
{/*{!pathnames.includes("homepage")&&<Breadcrumb collapsed={collapsed}/>}*/}
<Content className={!pathnames.includes("homepage") ? styles.content : styles.contentnopadding}>{children}</Content >
<Content
className={
!pathnames.includes("homepage")
? styles.content
: styles.contentnopadding
}
>
{children}
</Content>
{/* {footerVisible && <GlobalFooter className={styles.footer} copyright={copyright} />} liyuan */}
</div>
......@@ -165,8 +173,6 @@ class Head extends React.PureComponent {
}
}
function mapStateToProps(state, ownProps) {
const { login } = state;
......@@ -178,13 +184,13 @@ function mapStateToProps(state, ownProps) {
let nav = {};
let menuList = [];
if (login.siteData && login.siteData.length > 0) {
debugger;
// 根据后台返回每个站点目录
nav = login.siteData.filter(item => siteCode === item.siteCode)[0];
// 数据整合渲染menu
nav.menus.map((item, index) => {
if (item.children.length > 0) {
item.node.url = ''
item.node.url = "";
}
// 一级菜单
menuList.push({
......@@ -192,38 +198,36 @@ function mapStateToProps(state, ownProps) {
name: item.name,
icon: item.node.icon,
// activeIcon: item.node.activeIcon,
menuType: item.node.menuType
menuType: item.node.menuType,
});
//
// 二级菜单
item.children.map((chilid, childIndex) => {
if (chilid.children.length > 0) {
chilid.node.url = ''
chilid.node.url = "";
}
menuList.push({
id: index + 100000000 + "" + (childIndex + 1),
menuParentId: index + 100000 + "",
name: chilid.name,
icon: "",
url: chilid.node.url || '',
menuType: chilid.node.menuType
url: chilid.node.url || "",
menuType: chilid.node.menuType,
});
// 三级菜单
chilid.children && chilid.children.map((grandson, grandsonIndex) => {
menuList.push({
id: index + 1 + "" + (childIndex + 1) + (grandsonIndex + 1),
menuParentId: index + 100000000 + "" + (childIndex + 1),
name: grandson.name,
icon: "",
url: grandson.node.url || '',
menuType: grandson.node.menuType
chilid.children &&
chilid.children.map((grandson, grandsonIndex) => {
menuList.push({
id: index + 1 + "" + (childIndex + 1) + (grandsonIndex + 1),
menuParentId: index + 100000000 + "" + (childIndex + 1),
name: grandson.name,
icon: "",
url: grandson.node.url || "",
menuType: grandson.node.menuType,
});
});
});
});
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment