forked from Gitlink/forgeplus-react
回归bugfinding相关issue
This commit is contained in:
parent
3e4afeb9fd
commit
5002ede16b
|
|
@ -1,5 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN" class="notranslate translated-ltr" translate="no">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>红山开源社区</title>
|
||||
|
|
@ -9,55 +10,68 @@
|
|||
<meta name="description" content="红山开源是一个依托互联网群体智慧实现世界范围内资源深度融合、开放共享和协同创新的开源社区" />
|
||||
<meta name="theme-color" content="#000000">
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
|
||||
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="%PUBLIC_URL%css/iconfont.css">
|
||||
<link rel="stylesheet" type="text/css" href="%PUBLIC_URL%css/edu-purge.css">
|
||||
<link rel="stylesheet" type="text/css" href="%PUBLIC_URL%css/editormd.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="%PUBLIC_URL%css/merge.css">
|
||||
<%= htmlWebpackPlugin.tags.headTags %>
|
||||
<style>
|
||||
#ie_info{
|
||||
display: none;
|
||||
text-align: center;
|
||||
margin: 10vh;
|
||||
color: #4154f1;
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
#ie_info {
|
||||
display: none;
|
||||
text-align: center;
|
||||
margin: 10vh;
|
||||
color: #4154f1;
|
||||
font-size: 40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--用于markdown转html -->
|
||||
<div id="ie_info">不支持当前浏览器,请更换浏览器!<br/>推荐使用谷歌浏览器、360浏览器极速模式、火狐浏览器或Edge浏览器!</div>
|
||||
<div id="ie_info">不支持当前浏览器,请更换浏览器!<br />推荐使用谷歌浏览器、360浏览器极速模式、火狐浏览器或Edge浏览器!</div>
|
||||
<div id="md_div" style="display: none;"></div>
|
||||
<div id="root" class="page -layout-v -fit widthunit"></div>
|
||||
<div id="picture_display" style="display: none;"></div>
|
||||
<script src="%PUBLIC_URL%js/jquery-1.8.3.min.js"></script>
|
||||
<script>
|
||||
var getExplorer = (function () {
|
||||
var explorer = window.navigator.userAgent,
|
||||
compare = function (s) { return (explorer.indexOf(s) >= 0); },
|
||||
ie11 = (function () { return ("ActiveXObject" in window) })();
|
||||
if (compare("MSIE") || ie11) { return 'ie'; }
|
||||
else if (compare("Firefox") && !ie11) { return 'Firefox'; }
|
||||
else if (compare("Chrome") && !ie11) {
|
||||
if (explorer.indexOf("Edge") > -1) {
|
||||
return 'Edge';
|
||||
} else {
|
||||
return 'Chrome';
|
||||
}
|
||||
var explorer = window.navigator.userAgent,
|
||||
compare = function (s) { return (explorer.indexOf(s) >= 0); },
|
||||
ie11 = (function () { return ("ActiveXObject" in window) })();
|
||||
if (compare("MSIE") || ie11) { return 'ie'; }
|
||||
else if (compare("Firefox") && !ie11) { return 'Firefox'; }
|
||||
else if (compare("Chrome") && !ie11) {
|
||||
if (explorer.indexOf("Edge") > -1) {
|
||||
return 'Edge';
|
||||
} else {
|
||||
return 'Chrome';
|
||||
}
|
||||
else if (compare("Opera") && !ie11) { return 'Opera'; }
|
||||
else if (compare("Safari") && !ie11) { return 'Safari'; }
|
||||
})()
|
||||
if (getExplorer == 'ie') {
|
||||
$('#ie_info').css({display:'block'});
|
||||
$('#root').css({display:'none'});
|
||||
}
|
||||
</script>
|
||||
else if (compare("Opera") && !ie11) { return 'Opera'; }
|
||||
else if (compare("Safari") && !ie11) { return 'Safari'; }
|
||||
})()
|
||||
if (getExplorer == 'ie') {
|
||||
$('#ie_info').css({ display: 'block' });
|
||||
$('#root').css({ display: 'none' });
|
||||
}
|
||||
</script>
|
||||
<script src="%PUBLIC_URL%js/js_min_all.js"></script>
|
||||
<script src="%PUBLIC_URL%js/codemirror/codemirror.js"></script>
|
||||
<script src="%PUBLIC_URL%js/editormd/editormd.min.js"></script>
|
||||
<script src="%PUBLIC_URL%js/codemirror/merge/merge.js"></script>
|
||||
<%= htmlWebpackPlugin.tags.bodyTags %>
|
||||
<script>
|
||||
if (window.location.host.includes('osredm.com')) {
|
||||
var _hmt = _hmt || [];
|
||||
(function () {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "https://hm.baidu.com/hm.js?fda4c878a9a3b20e0220c144eb4c9108";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -526,7 +526,7 @@
|
|||
|
||||
.projectBannerBox{
|
||||
.imgBox{
|
||||
max-height: 250px;
|
||||
max-height: 14vw;
|
||||
}
|
||||
.slick-arrow{
|
||||
width: 70px;
|
||||
|
|
|
|||
|
|
@ -39,14 +39,14 @@ function FirstSection({ first }) {
|
|||
}, [first]);
|
||||
|
||||
|
||||
function goNext(){
|
||||
window.scrollTo({
|
||||
letf:0,
|
||||
top:document.querySelector(".home-second-section").offsetTop,
|
||||
behavior:"smooth"
|
||||
}
|
||||
)
|
||||
}
|
||||
// function goNext(){
|
||||
// window.scrollTo({
|
||||
// letf:0,
|
||||
// top:document.querySelector(".home-second-section").offsetTop,
|
||||
// behavior:"smooth"
|
||||
// }
|
||||
// )
|
||||
// }
|
||||
|
||||
return (
|
||||
<div className={`grid-picture ${first ? "active" : ""}`}>
|
||||
|
|
|
|||
|
|
@ -581,7 +581,7 @@ export default Form.create()(
|
|||
<ExportPaper id={id} download={download} taskName={detailData.name} />
|
||||
|
||||
{/* 若后台为“手动公示”,则显示按钮,是否公示由雇主与管理员是否点击“应征者名单公示”按钮决定,同时必须有成果,非关闭状态 */}
|
||||
{!detailData.showUserStatus && !detailData.expertReview && taskLimit && detailData.showUserMode === 2 && <a className="fr color-orange ml20" onClick={showUser}>应征者名单公示 >></a>}
|
||||
{!detailData.showUserStatus && !detailData.expertReview && taskLimit && detailData.showUserMode === 2 && [5,6,7,8].includes(detailData.status)&&<a className="fr color-orange ml20" onClick={showUser}>应征者名单公示 >></a>}
|
||||
|
||||
{detailData.isProofBoolean && <a className="fr color-orange ml20" onClick={showProof}>评审结果公示</a>}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
|
|||
|
||||
// 手机端适配
|
||||
useEffect(() => {
|
||||
window.scrollTo(0, 0)
|
||||
if (!IsPC()) {
|
||||
// 手动添加mate标签
|
||||
addMeta(
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|||
import { Base64 } from 'js-base64';
|
||||
|
||||
import Dialog from 'material-ui/Dialog';
|
||||
import { notification } from 'antd';
|
||||
import { notification,Input } from 'antd';
|
||||
|
||||
import axios from 'axios';
|
||||
import educoderLogo from './educoder.png';
|
||||
|
|
@ -178,8 +178,7 @@ class LoginDialog extends Component {
|
|||
};
|
||||
|
||||
passwordChange = () => {
|
||||
let value = this.refs.passwordText.value;
|
||||
|
||||
let value = this.refs.passwordText.input.value;
|
||||
let valuenum = value.length;
|
||||
this.setState({ disabled: false })
|
||||
this.setState({ bottonclass: 'log-botton mt5 edu-back-blue' })
|
||||
|
|
@ -531,8 +530,8 @@ class LoginDialog extends Component {
|
|||
<div style={{ height: '25px' }}><p className="color-orange edu-txt-left none" id="username_error_notice"
|
||||
style={{ display: Phonenumberisnotco === undefined ? 'none' : 'block' }}>{Phonenumberisnotco}</p></div>
|
||||
<div>
|
||||
<input
|
||||
type="password"
|
||||
<Input.Password
|
||||
// type="password"
|
||||
id="password_loggin_input"
|
||||
name="password"
|
||||
ref="passwordText"
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ function Login(props) {
|
|||
<div>
|
||||
<div className="right_cont login_content">
|
||||
<div className="logoimgbox">
|
||||
{settings && <img alt="红山开源" className="logoimg" src={getImageUrl(`/${settings.nav_logo_url}`)}></img>}
|
||||
{settings && <img alt="红山开源" className="loginlogo" src={getImageUrl(`/${settings.nav_logo_url}`)}></img>}
|
||||
</div>
|
||||
<div className="login_register_head">
|
||||
<span>欢迎登录 红山开源</span>
|
||||
|
|
@ -118,7 +118,7 @@ function Login(props) {
|
|||
|
||||
{
|
||||
settings && !is_local && settings.third_party_test && settings.third_party_test.length > 0 ?
|
||||
<p className="clearfix mt20">
|
||||
<p className="clearfix mt20 textcenter">
|
||||
<span className={"startlogin"}>———————— 快速登录 ————————</span>
|
||||
<div className="thirdBox">
|
||||
{settings.third_party_test.map((item, key) => {
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@
|
|||
}
|
||||
.logoimgbox{
|
||||
text-align: center;
|
||||
.logoimg{
|
||||
.loginlogo{
|
||||
width: 100px;
|
||||
max-width: 30vw;
|
||||
margin-bottom: 1vh;
|
||||
|
|
@ -278,7 +278,7 @@
|
|||
display: block;
|
||||
}
|
||||
.logoimgbox{
|
||||
.logoimg{
|
||||
.loginlogo{
|
||||
width: 150px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ function Register(props) {
|
|||
return (
|
||||
<div className="right_cont Register_content">
|
||||
<div className="logoimgbox">
|
||||
{settings&&<img alt="红山开源" className="logoimg" src={getImageUrl(`/${settings.nav_logo_url}`)}></img>}
|
||||
{settings&&<img alt="红山开源" className="loginlogo" src={getImageUrl(`/${settings.nav_logo_url}`)}></img>}
|
||||
</div>
|
||||
<div className="login_register_head">
|
||||
<span>欢迎注册 红山开源</span>
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ function ResetPassword(props) {
|
|||
<div>
|
||||
<div className="right_cont ResetPassword_content">
|
||||
<div className="logoimgbox">
|
||||
{settings&&<img alt="红山开源" className="logoimg" src={getImageUrl(`/${settings.nav_logo_url}`)}></img>}
|
||||
{settings&&<img alt="红山开源" className="loginlogo" src={getImageUrl(`/${settings.nav_logo_url}`)}></img>}
|
||||
</div>
|
||||
<div className="login_register_head">
|
||||
<span>找回密码</span>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Component } from 'react';
|
||||
import React, { Component, Fragment } from 'react';
|
||||
import { Link } from "react-router-dom";
|
||||
import AccountProfile from "../user/AccountProfile";
|
||||
import { getImageUrl,getLogoImageUrl } from 'educoder';
|
||||
import { getImageUrl, getLogoImageUrl } from 'educoder';
|
||||
import { getUserInfo } from 'src/military/expert/api';
|
||||
import axios from 'axios';
|
||||
import { Modal, Input, message, notification, Button, Popover, Badge } from 'antd';
|
||||
|
|
@ -25,7 +25,7 @@ let old_url;
|
|||
|
||||
window._header_componentHandler = null;
|
||||
// 非trustie链接则新开页跳转
|
||||
const str = ['www.trustie.net','forgeplus.trustie.net','forum.trustie.net','testforgeplus.trustie.net']
|
||||
const str = ['www.trustie.net', 'forgeplus.trustie.net', 'forum.trustie.net', 'testforgeplus.trustie.net']
|
||||
class NewHeader extends Component {
|
||||
constructor(props) {
|
||||
super(props)
|
||||
|
|
@ -54,7 +54,7 @@ class NewHeader extends Component {
|
|||
settings: null,
|
||||
goshowqqgtounp: false,
|
||||
visiblemyss: false,
|
||||
visible:false, //浮动消息框展示控制
|
||||
visible: false, //浮动消息框展示控制
|
||||
}
|
||||
}
|
||||
componentDidMount() {
|
||||
|
|
@ -86,7 +86,7 @@ class NewHeader extends Component {
|
|||
//获取游览器地址
|
||||
try {
|
||||
window.sessionStorage.setItem("yslgeturls", JSON.stringify(window.location.href))
|
||||
} catch (e) {}
|
||||
} catch (e) { }
|
||||
}
|
||||
|
||||
openNotification = (messge) => {
|
||||
|
|
@ -580,24 +580,24 @@ class NewHeader extends Component {
|
|||
const hostname = window.location.hostname;
|
||||
const port = window.location.port;
|
||||
const isDev = hostname == "localhost";
|
||||
let isdev2= isDev ?'http://117.50.100.12:49999':`http://${hostname}`;
|
||||
let isdev2 = isDev ? 'http://117.50.100.12:49999' : `http://${hostname}`;
|
||||
let str = "";
|
||||
if(url.indexOf("http")>-1){
|
||||
if(url.indexOf("https")>-1){
|
||||
if (url.indexOf("http") > -1) {
|
||||
if (url.indexOf("https") > -1) {
|
||||
isdev2 = `https://${hostname}`;
|
||||
}
|
||||
if(!isDev && port){
|
||||
isdev2+=`:${port}`;
|
||||
if (!isDev && port) {
|
||||
isdev2 += `:${port}`;
|
||||
}
|
||||
str = isdev2+match.path;
|
||||
}else{
|
||||
str = isdev2 + match.path;
|
||||
} else {
|
||||
str = match.path;
|
||||
}
|
||||
|
||||
console.log(str,(url+"/"),url && str === url);
|
||||
if (url && (str === url || str===(url+"/"))) {
|
||||
console.log(str, (url + "/"), url && str === url);
|
||||
if (url && (str === url || str === (url + "/"))) {
|
||||
return true
|
||||
}else {
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
@ -643,22 +643,22 @@ class NewHeader extends Component {
|
|||
goshowqqgtounp: bool
|
||||
})
|
||||
}
|
||||
needAdd=(url)=> {
|
||||
let {current_user,mygetHelmetapi,history}=this.props;
|
||||
needAdd = (url) => {
|
||||
let { current_user, mygetHelmetapi, history } = this.props;
|
||||
if (current_user.authentication || current_user.enterprise_certification) {
|
||||
history.push('/needs/new')
|
||||
} else {
|
||||
Modal.confirm({
|
||||
content: "请先完成实名认证再提交需求申请,是否前往认证?",
|
||||
onOk() {
|
||||
window.location.href=`${mygetHelmetapi && mygetHelmetapi.main_web_site_url}/users/${current_user.login}/profiles`;
|
||||
window.location.href = `${mygetHelmetapi && mygetHelmetapi.main_web_site_url}/users/${current_user.login}/profiles`;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const { resetUserInfo , showNotification, match, current_user } = this.props;
|
||||
const { resetUserInfo, showNotification, match, current_user } = this.props;
|
||||
|
||||
let { Addcoursestypes,
|
||||
tojoinitemtype,
|
||||
|
|
@ -677,7 +677,7 @@ class NewHeader extends Component {
|
|||
goshowqqgtounp,
|
||||
visible,
|
||||
} = this.state;
|
||||
let activeIndex =match.path === '/' || (match.path&&match.path.startsWith('/managements')) || (match.path&&match.path.startsWith('/admin'))?true: '';
|
||||
let activeIndex = match.path === '/' || (match.path && match.path.startsWith('/managements')) || (match.path && match.path.startsWith('/admin')) ? true : '';
|
||||
let headtypes = '/';
|
||||
if (settings) {
|
||||
if (settings.navbar) {
|
||||
|
|
@ -744,92 +744,92 @@ class NewHeader extends Component {
|
|||
/> : ""}
|
||||
{
|
||||
goshowqqgtounp === true ?
|
||||
<GotoQQgroup {...this.state} {...this.props} setgoshowqqgtounp={(bool) => this.setgoshowqqgtounp(bool)}></GotoQQgroup>
|
||||
:""
|
||||
<GotoQQgroup {...this.state} {...this.props} setgoshowqqgtounp={(bool) => this.setgoshowqqgtounp(bool)}></GotoQQgroup>
|
||||
: ""
|
||||
}
|
||||
<a href={settings && settings.new_course.default_url} className={"fl mr30"} style={{minWidth:"45px"}}>
|
||||
<a href={settings && settings.new_course.default_url} className={"fl mr30"} style={{ minWidth: "45px" }}>
|
||||
{
|
||||
settings && settings.nav_logo_url ?
|
||||
<img alt="红山开源社区" className="logoimg" style={{ heigth: "40px" }} src={activeIndex?logo:getLogoImageUrl(settings.nav_logo_url)}></img>
|
||||
:
|
||||
""
|
||||
<img alt="红山开源社区" className="logoimg" style={{ heigth: "40px" }} src={activeIndex ? logo : getLogoImageUrl(settings.nav_logo_url)}></img>
|
||||
:
|
||||
""
|
||||
}
|
||||
</a>
|
||||
<div className="head-nav pr" id={"head-navpre1"}>
|
||||
{
|
||||
settings && settings.navbar && settings.navbar.length > 0 ?
|
||||
<ul id="header-nav">
|
||||
{
|
||||
settings.navbar && settings.navbar.map((item, key) => {
|
||||
var new_link = item.link;
|
||||
var user_login = this.props.user && this.props.user.login;
|
||||
var is_hidden = item.hidden
|
||||
if (new_link && (new_link.indexOf("courses") > -1 || new_link.indexOf("contests") > -1)) {
|
||||
if (user_login) {
|
||||
if (new_link.indexOf("courses") > -1) {
|
||||
new_link = new_link.replace(/courses/g, user_login + "/courses")
|
||||
} else if (new_link.indexOf("contests") > -1) {
|
||||
new_link = new_link.replace(/contests/g, user_login + "/contests")
|
||||
<ul id="header-nav">
|
||||
{
|
||||
settings.navbar && settings.navbar.map((item, key) => {
|
||||
var new_link = item.link;
|
||||
var user_login = this.props.user && this.props.user.login;
|
||||
var is_hidden = item.hidden
|
||||
if (new_link && (new_link.indexOf("courses") > -1 || new_link.indexOf("contests") > -1)) {
|
||||
if (user_login) {
|
||||
if (new_link.indexOf("courses") > -1) {
|
||||
new_link = new_link.replace(/courses/g, user_login + "/courses")
|
||||
} else if (new_link.indexOf("contests") > -1) {
|
||||
new_link = new_link.replace(/contests/g, user_login + "/contests")
|
||||
}
|
||||
} else {
|
||||
is_hidden = true
|
||||
}
|
||||
} else {
|
||||
is_hidden = true
|
||||
}
|
||||
}
|
||||
if (user_login && (new_link && new_link.indexOf("homes") > -1)) {
|
||||
new_link = new_link.replace(/homes/g, user_login + "/user_activities")
|
||||
}
|
||||
|
||||
var waiLian = (new_link && str.filter(item=>new_link.indexOf(item)>-1) );
|
||||
var wl = waiLian && waiLian.length>0;
|
||||
return (
|
||||
<li key={key} onClick={() => this.headtypesonClick(item.link, true)} className={`${this.matchpaths(item.link) === true ? 'pr active' : 'pr'}`} style={!is_hidden ? { display: 'flex' } : { display: 'none' }}>
|
||||
<a href={new_link}>{item.name}</a>
|
||||
</li>
|
||||
)
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
: ""
|
||||
if (user_login && (new_link && new_link.indexOf("homes") > -1)) {
|
||||
new_link = new_link.replace(/homes/g, user_login + "/user_activities")
|
||||
}
|
||||
|
||||
var waiLian = (new_link && str.filter(item => new_link.indexOf(item) > -1));
|
||||
var wl = waiLian && waiLian.length > 0;
|
||||
return (
|
||||
<li key={key} onClick={() => this.headtypesonClick(item.link, true)} className={`${this.matchpaths(item.link) === true ? 'pr active' : 'pr'}`} style={!is_hidden ? { display: 'flex' } : { display: 'none' }}>
|
||||
<a href={new_link}>{item.name}</a>
|
||||
</li>
|
||||
)
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
: ""
|
||||
}
|
||||
</div>
|
||||
<div className="head-right">
|
||||
{this.props.user && this.props.user.login &&
|
||||
{this.props.user && this.props.user.login &&
|
||||
<div className='mr30'>
|
||||
<a href={current_user.isExpert ? '/expert/user/tasks' : current_user.expertDraft ? '/expert/user/register' : '/expert'}>
|
||||
<i className={`iconfont icon-ioon ${activeIndex?'color-home':'color-grey-9'} font-22`}></i>
|
||||
<i className={`iconfont icon-ioon ${activeIndex ? 'color-home' : 'color-grey-9'} font-22`}></i>
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
{this.props.user && this.props.user.login &&
|
||||
<div className="edu-menu-panel mr5">
|
||||
<i className={`iconfont icon-tianjiafangda ${activeIndex?'color-home':'color-grey-6'} `}></i>
|
||||
<i className={`iconfont icon-tianjiafangda ${activeIndex ? 'color-home' : 'color-grey-6'} `}></i>
|
||||
<div className="edu-menu-list" style={{ top: '48px' }}>
|
||||
<div className="overPart"></div>
|
||||
{
|
||||
(coursestypes === true && this.props.user.main_site === false && (settings && !settings.add && (settings.add && settings.add.length === 0))) ? "" :
|
||||
<ul className="edu-txt-center">
|
||||
{
|
||||
settings && settings.add && settings.add.map((item,key)=>{
|
||||
return(
|
||||
<li key={key}>
|
||||
{ item.url.indexOf('needs/new')<0?<a href={item.url}>{item.name}</a>:<a onClick={()=>{this.needAdd(item.url)}}>{item.name}</a>}
|
||||
</li>
|
||||
)
|
||||
})
|
||||
}
|
||||
<li>
|
||||
<AddProjectModal {...this.props} showNotification={this.props.showNotification}/>
|
||||
</li>
|
||||
</ul>
|
||||
<ul className="edu-txt-center">
|
||||
{
|
||||
settings && settings.add && settings.add.map((item, key) => {
|
||||
return (
|
||||
<li key={key}>
|
||||
{item.url.indexOf('needs/new') < 0 ? <a href={item.url}>{item.name}</a> : <a onClick={() => { this.needAdd(item.url) }}>{item.name}</a>}
|
||||
</li>
|
||||
)
|
||||
})
|
||||
}
|
||||
<li>
|
||||
<AddProjectModal {...this.props} showNotification={this.props.showNotification} />
|
||||
</li>
|
||||
</ul>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
{ (settings && settings.common && settings.common.notice) && (current_user && current_user.login)?
|
||||
{(settings && settings.common && settings.common.notice) && (current_user && current_user.login) ?
|
||||
<Popover
|
||||
overlayClassName="notice-popover"
|
||||
placement={`bottomRight`}
|
||||
content={<NoticeContent visible={visible} current_user={current_user} showNotification={showNotification} resetUserInfo={resetUserInfo}/>}
|
||||
content={<NoticeContent visible={visible} current_user={current_user} showNotification={showNotification} resetUserInfo={resetUserInfo} />}
|
||||
visible={visible}
|
||||
onVisibleChange={this.handleVisibleChange}
|
||||
destroyTooltipOnHide
|
||||
|
|
@ -837,7 +837,7 @@ class NewHeader extends Component {
|
|||
<Link to={"/settings/notice"} className="message-icon mt3">
|
||||
{current_user && <Badge count={current_user.message_unread_total}>
|
||||
{/* <img src={require(`./img/ring.png`)} alt="" width="16px" className="ml15 mr15"/> */}
|
||||
<i className={`iconfont icon-xiaoxilingdang ml20 ${activeIndex?'color-home':'color-grey-6'}`}></i>
|
||||
<i className={`iconfont icon-xiaoxilingdang ml20 ${activeIndex ? 'color-home' : 'color-grey-6'}`}></i>
|
||||
</Badge>}
|
||||
</Link>
|
||||
</Popover>
|
||||
|
|
@ -872,27 +872,31 @@ class NewHeader extends Component {
|
|||
</div>
|
||||
{user === undefined || user.login === "" ?
|
||||
<span className="login-box">
|
||||
<a onClick={() => this.educoderlogin()} className={`mr5 ${activeIndex ? 'color-home' : 'color-grey-6'}`}>登录</a>
|
||||
{
|
||||
// settings && settings.new_course && settings.new_course.register_url && (
|
||||
activeIndex ?
|
||||
<Button className="register-button" type="primary" size="large" ><a href={'/register'}>免费注册</a></Button> :
|
||||
<span><em className="vertical-line"></em><a className={`ml5 ${activeIndex ? 'color-home' : 'color-grey-6'}`} href={'/register'} target="_blank">注册</a></span>
|
||||
// )
|
||||
activeIndex ?
|
||||
<Fragment>
|
||||
<Link className="mr5 color-home" to={'/login'}>登录</Link>
|
||||
<Button className="register-button" type="primary" size="large" ><Link to={'/register'}>免费注册</Link></Button>
|
||||
</Fragment>
|
||||
:
|
||||
<Fragment>
|
||||
<a onClick={() => this.educoderlogin()} className={`mr5 color-grey-6`}>登录</a>
|
||||
<span><em className="vertical-line"></em><a className={`ml5 color-grey-6`} href={'/register'} target="_blank">注册</a></span>
|
||||
</Fragment>
|
||||
}
|
||||
</span>
|
||||
:
|
||||
<div className="ml30 edu-menu-panel" style={{ height: "70px", lineHeight: "70px" }}>
|
||||
{/* <a href={`/${this.props.current_user === undefined ? "" : this.props.current_user.login}/courses`}> */}
|
||||
<img alt="头像" className="radius" height="34" id="nh_user_logo" name="avatar_image"
|
||||
src={getImageUrl(user.image_url)} width="34">
|
||||
</img>
|
||||
<img alt="头像" className="radius" height="34" id="nh_user_logo" name="avatar_image"
|
||||
src={getImageUrl(user.image_url)} width="34">
|
||||
</img>
|
||||
{/* </a> */}
|
||||
<ul className="edu-menu-list" style={{ top: '60px', textAlign: 'center' }}>
|
||||
<li className="bor-bottom-greyE ellipsis-1" style={{cursor:"default",background:"#fff"}}>{this.props.current_user.username}</li>
|
||||
<li className="bor-bottom-greyE ellipsis-1" style={{ cursor: "default", background: "#fff" }}>{this.props.current_user.username}</li>
|
||||
{
|
||||
settings && settings.personal && settings.personal.length > 0 && settings.personal.map((item,key)=>{
|
||||
return(
|
||||
settings && settings.personal && settings.personal.length > 0 && settings.personal.map((item, key) => {
|
||||
return (
|
||||
<li key={key}><a href={item.url}>{item.name}</a></li>
|
||||
)
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue