diff --git a/src/forge/Head/Header.js b/src/forge/Head/Header.js index 4eb52b001..28b206409 100644 --- a/src/forge/Head/Header.js +++ b/src/forge/Head/Header.js @@ -17,7 +17,6 @@ import './header.scss'; import NoticeContent from './NoticeContent'; import MainLogo from './img/logo.png'; // TODO 这部分脚本从公共脚本中直接调用 -let old_url; window._header_componentHandler = null; // 非trustie链接则新开页跳转 @@ -279,82 +278,6 @@ class NewHeader extends Component { settings, visible, } = this.state; - /*用户名称 用户头像url*/ - // let activeIndex = false; - // let activeForums = false; - // let activeShixuns = false; - // let activePaths = false; - // let coursestype = false; - // let activePackages = false; - // let activeMoopCases = false; - // let activeCompetitions = false; - - // if (match.path === '/forums') { - // activeForums = true; - // } else if (match.path.startsWith('/shixuns')) { - // activeShixuns = true; - // } else if (match.path.startsWith('/paths')) { - // activePaths = true; - // } else if (match.path.startsWith('/courses')) { - // coursestype = true; - // } else if (match.path.startsWith('/crowdsourcing')) { - // activePackages = true; - // } else if (match.path.startsWith('/moop_cases')) { - // activeMoopCases = true; - // } else if (match.path.startsWith('/competitions')) { - // activeCompetitions = true; - // } else { - // activeIndex = true; - // } - - // let headtypes = '/'; - // if (settings) { - // if (settings.navbar) { - // if (settings.navbar.length > 0) { - // if (match.path === '/') { - // if (headtypesonClickbool === false) { - // headtypes = undefined; - // } else { - // headtypes = headtypess; - // } - // } else { - // for (var i = 0; i < settings.navbar.length; i++) { - // if (match.path === settings.navbar[i].link) { - // headtypes = settings.navbar[i].link; - // break; - // } - // } - // } - // } - // } - // } - // let shixuntype = false; - // let pathstype = false; - // let coursestypes = false; - // if (this.props && this.props.mygetHelmetapi != null) { - // let shixun = "/shixuns"; - // let paths = "/paths"; - // let courses = "/courses"; - // this.props.mygetHelmetapi && this.props.mygetHelmetapi.navbar && this.props.mygetHelmetapi.navbar.map((item, key) => { - // var reg = RegExp(item.link); - // if (shixun.match(reg)) { - // if (item.hidden === true) { - // shixuntype = true - // } - // } - // if (paths.match(reg)) { - // if (item.hidden === true) { - // pathstype = true - // } - // } - // if (courses.match(reg)) { - // if (item.hidden === true) { - // coursestypes = true - // } - // } - // }) - // } - let search_url = settings && settings.common && settings.common.search; return (
@@ -447,7 +370,6 @@ class NewHeader extends Component { > {current_user && - {/* */} } diff --git a/src/modules/search/index.jsx b/src/modules/search/index.jsx index 3afd1ae5f..09bdb4585 100644 --- a/src/modules/search/index.jsx +++ b/src/modules/search/index.jsx @@ -139,7 +139,6 @@ const GlobalSearch = ({ location, showNotification, history }) => {
-
@@ -150,13 +149,13 @@ const GlobalSearch = ({ location, showNotification, history }) => {
{ dataList.length ? - size} onChange={(page) => { setPage(page) }} current={page} total={total} showTotal={total => `共 ${total} 条`} - /> + /> : }
@@ -170,13 +169,13 @@ const GlobalSearch = ({ location, showNotification, history }) => { { dataList.length ? - size} onChange={(page) => { setPage(page) }} current={page} total={total} showTotal={total => `共 ${total} 条`} - /> : + /> : } @@ -227,13 +226,13 @@ const GlobalSearch = ({ location, showNotification, history }) => { { dataList.length ? - size} onChange={(page) => { setPage(page) }} current={page} total={total} showTotal={total => `共 ${total} 条`} - /> : + /> : }