Commit 81886e11 by 王禹桐

fixed: bug图标隐藏

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