This commit is contained in:
向明星 2024-11-10 17:57:35 +08:00
parent 40f507f9b3
commit ef83677ac6
8 changed files with 2847 additions and 12 deletions

View File

@ -3947,17 +3947,62 @@ html>body #ajax-indicator {
padding-right:40px;
}
.downMenus{
background: #ffffff;
box-shadow: 0px 10px 16px 0px #cecece;
border-radius: 6px;
position: absolute;
z-index: 999;
left: -20px;
top: -15px;
padding: 20px;
line-height: 1.5;
min-width: 105px;
}
.downMenus li{
cursor: pointer;
}
.downMenus li:hover aside{
color: #165dff!important;
}
.namediv{
display: flex;
}
.head-nav ul#header-nav li a {
display: block;
/* display: block;
height: 100%;
width: 100%;
color: #fff;
font-size: 16px; */
display: flex;
align-items: center;
height: 100%;
width: 100%;
color: #fff;
font-size: 16px;
position: relative;
}
#header-nav li .namediv i{
font-size: 14px !important;
display: inline-block;
color: #979797;
margin:0px 3.58px 0px 3px;
transform: translateY(0.5px);
}
.head-nav ul#header-nav li a:hover,.head-nav ul#header-nav li.active a {
color: #5091FF;
}
#header-nav li.active a::before{
content: '';
width: 100%;
height: 2px;
background: #c5c5c5;
position: absolute;
bottom: 17px;
left: 0;
border-radius: 1px;
}
.head-nav ul#header-nav li:last-child {
margin-right: 0px

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2,7 +2,7 @@ import React, { Component } from 'react';
import AccountProfile from "../../modules/user/AccountProfile";
import { getImageUrl } from 'educoder'
import axios from 'axios';
import { Input , notification , Dropdown , Menu } from 'antd';
import { Input , notification , Dropdown , Menu, Divider } from 'antd';
import LoginDialog from '../../modules/login/LoginDialog';
import AddProjectModal from './AddProjectModal';
import '../../modules/tpm/TPMIndex.css';
@ -291,6 +291,33 @@ class NewHeader extends Component {
)
}
menus=(item)=>{
return(
<div className="downMenus">
{
item.map((i,k)=>{
return(
!i.hidden && <li onClick={()=>{window.location.href=this.checkLink(i.link)}}>
{k!==0 &&<Divider />}
<aside className="font-16 color-ooo">{i.name}</aside>
<div className="font-14" style={{color:"rgb(159, 167, 179)",whiteSpace:'nowrap'}}>{i.content}</div>
</li>
)
})
}
</div>
)
}
checkLink=(link)=>{
let { settings,} = this.state;
if(link.indexOf("http")>-1){
return link;
}else{
return settings.new_course.default_url + link;
}
}
render() {
const { match} = this.props;
let current_user = this.props.user;
@ -434,13 +461,26 @@ class NewHeader extends Component {
var waiLian = (new_link && str.filter(item=>new_link.indexOf(item)>-1) );
var wl = waiLian && waiLian.length>0;
if(new_link.indexOf("http")<0){
new_link = settings.new_course.default_url + new_link
}
// if(new_link.indexOf("http")<0){
// new_link = settings.new_course.default_url + new_link
// }
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} target={wl ? "_self":"_blank"}><div dangerouslySetInnerHTML={{ __html: item.name }}></div></a>
// </li>
<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} target={wl ? "_self":"_blank"}><div dangerouslySetInnerHTML={{ __html: item.name }}></div></a>
</li>
{
item.subitem && item.subitem.length>0 ?
<Dropdown overlay={this.menus(item.subitem)}>
<div className="namediv">
<a href={this.checkLink(new_link)} target={wl ? "_self":"_blank"}><div dangerouslySetInnerHTML={{ __html: item.name }}></div> </a>
<i className="iconfont icon-xiala1 font-14 ml3 mt5 mr3" style={{color:"#979797",fontSize:'14px'}}></i>
</div>
</Dropdown>
:
<a href={this.checkLink(new_link)} ><div dangerouslySetInnerHTML={{ __html: item.name }}></div></a>
}
</li>
)
})
}