diff --git a/public/css/edu-purge.css b/public/css/edu-purge.css index 96f336724..9b73c8ead 100644 --- a/public/css/edu-purge.css +++ b/public/css/edu-purge.css @@ -3945,6 +3945,39 @@ html>body #ajax-indicator { max-height: 340px; }/*头部导航条样式---2018-03-19--by-cs*/ +.ant-dropdown.imgDropdown,.addDropdown{ + z-index:10000!important; + width: 120px; + text-align: center; + padding: 0; +} +.addDropdown ul{ + padding:0px; +} +.addDropdown ul a{ + padding:0px; + margin:0px; +} +.imgDropdown li:first-child { + border-bottom: 1px solid #eee; + cursor: default; +} +.imgDropdown li:first-child:hover,.imgDropdown li:last-child:hover{ + background-color: #fff; +} +.imgDropdown li:last-child:hover a{ + color: #4CACFF; +} +.imgDropdown li:last-child { + border-top: 1px solid #eee; +} +.imgDropdown li,.addDropdown li { + height: 40px; + line-height: 40px; + padding: 0!important; + cursor: default; + text-align: center; +} .head-nav { text-align: center; height: 58px; diff --git a/public/favicon.ico b/public/favicon.ico old mode 100755 new mode 100644 index 05b9d163e..ad428fa25 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/faviconold.ico b/public/faviconold.ico new file mode 100755 index 000000000..05b9d163e Binary files /dev/null and b/public/faviconold.ico differ diff --git a/public/index.html b/public/index.html index 07c2e378a..2082ca5d2 100755 --- a/public/index.html +++ b/public/index.html @@ -1,7 +1,8 @@ - +
+ diff --git a/src/common/UrlTool.js b/src/common/UrlTool.js index 0516da60a..05b9da36e 100644 --- a/src/common/UrlTool.js +++ b/src/common/UrlTool.js @@ -11,7 +11,7 @@ export function getImageUrl(path) { // https://www.educoder.net // https://testbdweb.trustie.net // const local = 'http://localhost:3000' - const local = 'https://testforgeplus.trustie.net/' + const local = 'https://testforgeplus.trustie.net' if (isDev) { return `${local}/${path}` } diff --git a/src/modules/tpm/NewHeader.js b/src/modules/tpm/NewHeader.js index 8c584641a..46b186548 100644 --- a/src/modules/tpm/NewHeader.js +++ b/src/modules/tpm/NewHeader.js @@ -3,7 +3,7 @@ import { Link } from "react-router-dom"; import AccountProfile from "../user/AccountProfile"; import { getImageUrl } from 'educoder' import axios from 'axios'; -import { Modal, Input, message, notification } from 'antd'; +import { Modal, Input, message, notification, Dropdown , Menu } from 'antd'; import LoginDialog from '../login/LoginDialog'; import GotoQQgroup from '../../modal/GotoQQgroup' @@ -590,6 +590,31 @@ class NewHeader extends Component { } } + renderMenu=(personal)=>{ + const { current_user } = this.props; + return( + + ) + } + renderAddMenu=()=>{ + return( + + ) + } // 处理弹框 setgoshowqqgtounp = (bool) => { @@ -598,99 +623,20 @@ class NewHeader extends Component { }) } render() { - const { match } = this.props; + const { current_user } = this.props; - let { Addcoursestypes, - tojoinitemtype, - tojoinclasstitle, - code_notice, - checked_notice, + let { AccountProfiletype, submitapplications, submitapplicationsvalue, user, isRender, - showSearchOpentype, - headtypesonClickbool, - headtypess, mygetHelmetapi2, goshowqqgtounp, } = 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 (mygetHelmetapi2) { - if (mygetHelmetapi2.navbar) { - if (mygetHelmetapi2.navbar.length > 0) { - if (match.path === '/') { - if (headtypesonClickbool === false) { - headtypes = undefined; - } else { - headtypes = headtypess; - } - } else { - for (var i = 0; i < mygetHelmetapi2.navbar.length; i++) { - if (match.path === mygetHelmetapi2.navbar[i].link) { - headtypes = mygetHelmetapi2.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.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 - } - } - }) - } + + const filterPersonal = mygetHelmetapi2 && mygetHelmetapi2.personal && mygetHelmetapi2.personal.filter(i=>i.key === "userinfo"); + let fobject = filterPersonal && filterPersonal[0]; return (