diff --git a/src/App.js b/src/App.js index e265ff3b2..821fc9532 100644 --- a/src/App.js +++ b/src/App.js @@ -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); } }); diff --git a/src/AppConfig.js b/src/AppConfig.js index 665e85f0f..bb5405c6f 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -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) { diff --git a/src/forge/Head/Header.js b/src/forge/Head/Header.js index 8e496d801..864f15227 100644 --- a/src/forge/Head/Header.js +++ b/src/forge/Head/Header.js @@ -389,7 +389,7 @@ class NewHeader extends Component { /> : ""} { publicNav && - + } @@ -471,8 +471,12 @@ class NewHeader extends Component { this.educoderlogin()} className="mr5 color-white">登录 { - settings && settings.common && settings.common.register && - 注册 + (settings && settings.common && settings.common.register) ? + publicNav ? + 立即注册 + : + 注册 + :"" } : diff --git a/src/forge/Head/header.scss b/src/forge/Head/header.scss index 58e7184d9..dbe640d57 100644 --- a/src/forge/Head/header.scss +++ b/src/forge/Head/header.scss @@ -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; + } } \ No newline at end of file diff --git a/src/forge/Settings/setting.scss b/src/forge/Settings/setting.scss index dc7d1380c..f1855ddb6 100644 --- a/src/forge/Settings/setting.scss +++ b/src/forge/Settings/setting.scss @@ -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; diff --git a/src/home/Img/left.png b/src/home/Img/left.png new file mode 100644 index 000000000..e51738608 Binary files /dev/null and b/src/home/Img/left.png differ diff --git a/src/home/Img/right.png b/src/home/Img/right.png new file mode 100644 index 000000000..f5a134bd9 Binary files /dev/null and b/src/home/Img/right.png differ diff --git a/src/home/Index.jsx b/src/home/Index.jsx index f1c628d13..bd74ab0fe 100644 --- a/src/home/Index.jsx +++ b/src/home/Index.jsx @@ -68,7 +68,7 @@ function Index(props) { {/* */} { - bannerTab && bannerTab.lenth > 0 ? + bannerTab && bannerTab.length > 0 ? { bannerTab.map((i,k)=>{ diff --git a/src/home/Index.scss b/src/home/Index.scss index 25d5f83fe..7678aba43 100644 --- a/src/home/Index.scss +++ b/src/home/Index.scss @@ -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; diff --git a/src/home/ThirdEdition.jsx b/src/home/ThirdEdition.jsx index 5a14becbb..278cef9f7 100644 --- a/src/home/ThirdEdition.jsx +++ b/src/home/ThirdEdition.jsx @@ -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() { {i.title} {i.visits} - {i.time} + {i.created_time && i.created_time.split(" ")[0]} ) }):"" @@ -180,7 +180,7 @@ function ThirdEdition() { {i.title} {i.visits} - {i.time} + {i.created_time && i.created_time.split(" ")[0]} ) }):"" @@ -199,7 +199,7 @@ function ThirdEdition() { {i.title} {i.visits} - {i.time} + {i.created_time && i.created_time.split(" ")[0]} ) }):"" diff --git a/src/home/TopEdition.jsx b/src/home/TopEdition.jsx index d24ad15c0..9d68ef190 100644 --- a/src/home/TopEdition.jsx +++ b/src/home/TopEdition.jsx @@ -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:, - nextArrow: + prevArrow:, + nextArrow: } function TopEdition({register,current_user}) { @@ -44,10 +47,12 @@ function TopEdition({register,current_user}) { bannerList.map((i,k)=>{ return( - + {/* style={{backgroundImage:`url(${getImageUrl(i.image)})`}} */} + + { k +1 === bannerList.length && (!(current_user && current_user.login)) ? - 注册 + 立即注册 :"" }
注册
立即注册