This commit is contained in:
caishi 2021-11-11 13:41:55 +08:00
parent b4e2c6148a
commit 6fc441d7c5
11 changed files with 75 additions and 27 deletions

View File

@ -137,7 +137,7 @@ class App extends Component {
this.unlisten = this.props.history.listen((location) => {
let newPathname = location.pathname.split('/')[1];
if (this.state.pathName !== newPathname) {
// this.setState({ pathType: '' });
this.setState({ pathType: '' });
newPathname && this.getPathnameType(newPathname);
}
});

View File

@ -25,7 +25,7 @@ if (isDev) {
}
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin'
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || ''
}
window._debugType = debugType;
export function initAxiosInterceptors(props) {

View File

@ -389,7 +389,7 @@ class NewHeader extends Component {
/> : ""}
{
publicNav &&
<a href={settings && settings.new_course.default_url} className={"fl pr15"}>
<a href={'https://www.ccf.org.cn/'} className={"fl pr15"}>
<img src={MainLogo} alt="" style={{ heigth: "40px" }}/>
</a>
}
@ -471,8 +471,12 @@ class NewHeader extends Component {
<span className="font-15 ml30">
<a onClick={() => this.educoderlogin()} className="mr5 color-white">登录</a>
{
settings && settings.common && settings.common.register &&
<span><em className="vertical-line"></em><Link className="ml5 color-white" to={`/register`}></Link></span>
(settings && settings.common && settings.common.register) ?
publicNav ?
<Link to={`/register`} className="regBtn">立即注册</Link>
:
<span><em className="vertical-line"></em><Link className="ml5 color-white" to={`/register`}></Link></span>
:""
}
</span>
:

View File

@ -343,4 +343,20 @@
a{
color: #BDC2D1!important;
}
}
.regBtn{
height: 40px;
background: #466AFF;
border-radius: 2px;
display: inline-block;
padding:0px 18px;
margin-left: 20px;
font-size: 14px;
font-weight: 400;
color: #FFFFFF!important;
line-height: 40px;
&:hover{
color: #FFFFFF!important;
background-color: #355CFF;
}
}

View File

@ -191,6 +191,12 @@
.shortStyle{
.setStyleRule{
min-height: 35px;
#merge_whitelist_usernames{
li.ant-select-selection__choice{
margin-top: 0px!important;
margin-bottom: 3px!important;
}
}
}
.columsRadio{
display: block;

BIN
src/home/Img/left.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1018 B

BIN
src/home/Img/right.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1018 B

View File

@ -68,7 +68,7 @@ function Index(props) {
{/* <HeadNav {...props}/> */}
<TopEdition register={register} current_user={current_user}/>
{
bannerTab && bannerTab.lenth > 0 ?
bannerTab && bannerTab.length > 0 ?
<ul className="topEditionUl">
{
bannerTab.map((i,k)=>{

View File

@ -63,9 +63,14 @@ body{
height: 100%;
.regform{
&>div{
background-size:cover;
background-position: center;
background-repeat: no-repeat;
overflow: hidden;
img{
height: 100%;
width: 1920px;
position: relative;
left: 50%;
margin-left: -960px;
}
}
}
.regPrg{
@ -74,7 +79,7 @@ body{
width: 1200px;
left: 50%;
margin-left: -600px;
top:50%;
top:54%;
margin-top: -23px;
a{
color: #fff!important;
@ -87,6 +92,10 @@ body{
text-align: center;
font-size: 18px;
letter-spacing: 2px;
&:hover{
color: #FFFFFF!important;
background-color: #355CFF;
}
}
}
}
@ -107,6 +116,8 @@ body{
&:hover{
.slick-arrow{
display: block!important;
cursor: pointer;
z-index: 2;
}
}
.slick-arrow{
@ -142,6 +153,7 @@ body{
bottom: 25%;
position: absolute;
display: flex!important;
z-index: 2;
li{
background-color: rgba(225,225,225,0.5);
position: relative;
@ -186,6 +198,7 @@ body{
display: flex;
align-items: center;
justify-content: center;
z-index: 3;
a{
background-image: url('./Img/top-2.png');
height: 139px;
@ -839,6 +852,10 @@ body{
background-color: #466AFF;
border-radius: 6px;
font-size: 18px;
&:hover{
color: #FFFFFF!important;
background-color: #355CFF;
}
}
.forthUl{
display: flex;

View File

@ -30,16 +30,16 @@ function ThirdEdition() {
},[flag])
useEffect(()=>{
// let box = document.getElementById('thirdUl');
// var myTimer = setTimeout(intervalActive, 2500);
// box.onmouseover = () => {
// clearTimeout(myTimer);
// setFlag(false);
// }
// box.onmouseleave = () => {
// myTimer = setTimeout(intervalActive, 2500);
// setFlag(true);
// }
let box = document.getElementById('thirdUl');
var myTimer = setTimeout(intervalActive, 2500);
box.onmouseover = () => {
clearTimeout(myTimer);
setFlag(false);
}
box.onmouseleave = () => {
myTimer = setTimeout(intervalActive, 2500);
setFlag(true);
}
},[active,flag])
function intervalActive() {
@ -142,7 +142,7 @@ function ThirdEdition() {
<li>
<a href={i.url} target="_blank">{i.title}</a>
<span className="listboxcount"><i className="iconfont icon-a-liulanicon2x mr5"></i>{i.visits}</span>
<span>{i.time}</span>
<span>{i.created_time && i.created_time.split(" ")[0]}</span>
</li>
)
}):""
@ -180,7 +180,7 @@ function ThirdEdition() {
<li>
<a href={i.url} target="_blank">{i.title}</a>
<span className="listboxcount"><i className="iconfont icon-a-liulanicon2x mr5"></i>{i.visits}</span>
<span>{i.time}</span>
<span>{i.created_time && i.created_time.split(" ")[0]}</span>
</li>
)
}):""
@ -199,7 +199,7 @@ function ThirdEdition() {
<li>
<a href={i.url} target="_blank">{i.title}</a>
<span className="listboxcount"><i className="iconfont icon-a-liulanicon2x mr5"></i>{i.visits}</span>
<span>{i.time}</span>
<span>{i.created_time && i.created_time.split(" ")[0]}</span>
</li>
)
}):""

View File

@ -2,6 +2,9 @@ import React , { useEffect , useState } from 'react';
import Slider from 'react-slick';
import axios from 'axios';
import { getImageUrl } from 'educoder';
import Left from './Img/left.png';
import Right from './Img/right.png';
let setting={
dots:true,
@ -14,8 +17,8 @@ let setting={
pauseOnFocus:true,
autoplay:true,
arrows:true,
prevArrow:<button type='button' class='slick-prev slick-arrow'><i className="iconfont icon-xiangzuojiantou"></i></button>,
nextArrow:<button type='button' class='slick-prev slick-arrow'><i className="iconfont icon-xiangyoujiantou"></i></button>
prevArrow:<button type='button' class='slick-prev slick-arrow'><img src={Left} width="70px" alt=""/></button>,
nextArrow:<button type='button' class='slick-prev slick-arrow'><img src={Right} width="70px" alt=""/></button>
}
function TopEdition({register,current_user}) {
@ -44,10 +47,12 @@ function TopEdition({register,current_user}) {
bannerList.map((i,k)=>{
return(
<div className={`regform`}>
<div style={{backgroundImage:`url(${getImageUrl(i.image)})`}}>
{/* style={{backgroundImage:`url(${getImageUrl(i.image)})`}} */}
<div>
<img src={getImageUrl(i.image)} alt="" height="100%"/>
{
k +1 === bannerList.length && (!(current_user && current_user.login)) ?
<p className="regPrg"><a href={register}>注册</a></p>
<p className="regPrg"><a href={register}>立即注册</a></p>
:""
}
</div>