dev_aliyun2
harry 5 years ago
parent 8e6e13264d
commit ae22ebeeeb

@ -16,9 +16,6 @@ import LoginDialog from '../login/LoginDialog';
import GotoQQgroup from '../../modal/GotoQQgroup'
import './TPMIndex.css';
const $ = window.$
// TODO 这部分脚本从公共脚本中直接调用
@ -505,9 +502,8 @@ class NewHeader extends Component {
this.setState({
isRender: true
})
return;
}
}
if (user && user.profile_completed === false) {
this.setState({
@ -516,13 +512,6 @@ class NewHeader extends Component {
return;
}
onKeywordSearchKeyDowns = () => {
this.setState(
{
setevaluatinghides: false
}
)
}
if (type === "newshixuns") {
if (this.props && this.props.current_user && this.props.current_user.is_shixun_marker === false) {
@ -531,89 +520,23 @@ class NewHeader extends Component {
}
}
if (type === "projects") {
if (this.props.user && this.props.user.email === undefined || this.props.user && this.props.user.email === null || this.props.user && this.props.user.email === "") {
this.openNotification("请先绑定邮箱,谢谢");
return
}
}
let { user } = this.state;
if (user === undefined) {
this.setState({
isRender: true
})
return
}
if (user && user.login === "") {
this.setState({
isRender: true
})
return;
}
if (user && user.profile_completed === false) {
this.setState({
AccountProfiletype: true
})
return;
}
if (type === "newshixuns") {
if (this.props && this.props.current_user && this.props.current_user.is_shixun_marker === false) {
this.setgoshowqqgtounp(true);
return;
}
}
if (url !== undefined || url !== "") {
window.location.href = url;
}
}
//修改登录方法
Modifyloginvalue = () => {
this.setState({
isRender: false,
})
}
hideAccountProfile = () => {
this.setState({
AccountProfiletype: false
})
};
headtypesonClick = (url, bool) => {
this.setState({
headtypess: url,
headtypesonClickbool: bool,
})
}
//获取数据为空的时候
gettablogourlnull = () => {
this.setState({
mygetHelmetapi2: undefined
});
document.title = "EduCoder";
var link = document.createElement('link'),
oldLink = document.getElementById('dynamic-favicon');
link.id = 'dynamic-favicon';
link.rel = 'shortcut icon';
link.href = "/react/build/./favicon.ico";
if (oldLink) {
document.head.removeChild(oldLink);
}
document.head.appendChild(link);
};
//修改登录方法
Modifyloginvalue = () => {
this.setState({
isRender: false,
})
}
hideAccountProfile = () => {
@ -817,6 +740,9 @@ class NewHeader extends Component {
if (mygetHelmetapi2) {
if (mygetHelmetapi2.navbar) {
if (mygetHelmetapi2.navbar.length > 0) {
// console.log("mygetHelmetapi2.navbar.length>0====-=-=--=-=-=-=");
//
// console.log(match.path);
if (match.path === '/') {
if (headtypesonClickbool === false) {
headtypes = undefined;
@ -929,7 +855,7 @@ class NewHeader extends Component {
""
}
<a href={"/"} onClick={() => this.headtypesonClick("/", false)} className={"fl mr30 ml25 mt10"}>
<Link to={"/"} onClick={() => this.headtypesonClick("/", false)} className={"fl mr30 ml25 mt10"}>
{
mygetHelmetapi2 === null ?
""
@ -939,7 +865,7 @@ class NewHeader extends Component {
:
<img alt="高校智能化教学与实训平台" className="logoimg" style={{ heigth: "40px" }} src={getImageUrl(mygetHelmetapi2.nav_logo_url)}></img>
}
</a>
</Link>
<style>
{

Loading…
Cancel
Save