From 6fc441d7c58e0ea036c18db9c6e28cbd41d4bce2 Mon Sep 17 00:00:00 2001 From: caishi Date: Thu, 11 Nov 2021 13:41:55 +0800 Subject: [PATCH] issues --- src/App.js | 2 +- src/AppConfig.js | 2 +- src/forge/Head/Header.js | 10 +++++++--- src/forge/Head/header.scss | 16 ++++++++++++++++ src/forge/Settings/setting.scss | 6 ++++++ src/home/Img/left.png | Bin 0 -> 1018 bytes src/home/Img/right.png | Bin 0 -> 1018 bytes src/home/Index.jsx | 2 +- src/home/Index.scss | 25 +++++++++++++++++++++---- src/home/ThirdEdition.jsx | 26 +++++++++++++------------- src/home/TopEdition.jsx | 13 +++++++++---- 11 files changed, 75 insertions(+), 27 deletions(-) create mode 100644 src/home/Img/left.png create mode 100644 src/home/Img/right.png diff --git a/src/App.js b/src/App.js index e265ff3b..821fc953 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 665e85f0..bb5405c6 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 8e496d80..864f1522 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 58e7184d..dbe640d5 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 dc7d1380..f1855ddb 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 0000000000000000000000000000000000000000..e51738608fc1f9f9313d4d60276d249bc2454866 GIT binary patch literal 1018 zcmVPx&v`IukRCr$PoV%{nFc5}+bBCUe8h8PEXyFwosF0wcKtf2+K#jyhAS6l}9s-G1 z00Ba@6cp^a><;>KoE#^c#JSp&i=|ceXwSyuZ)g4)J5CG&HW4`kfG^`5`JOF3iv62M zzIN%+7{m8LT58NForws~f7U|av2T9_wY9Le#+Vf1;P&@5wA3IGA%t^|R}5~r<4woL z7{VH~4GKm?2qOhDsG**dF~kVyc&JVX0b@Pny!DWwZ0m9!0y-MPgL;9n8gjwvNSA?( z^&N)RVIK|Z490p1p>#gSSX7*>MmU}Hr_-QBgg~ezQ)twl!?uRD1|uSu6lh7?aqf&U zn>Jr+494oo#R)=5c~F=Sn(9s?Ff)MC8ctI%Qw*P~$Y~T-UN95Y6rY@U;naeeSoZP3 zD1Kg>tt!FTI)!38=SDFut#eAjSh1z9ctdUC)Hplelx3hXJ7DhI}{r*Iy$#Ks9{ww_Z2vqW#ns$zFOm4R8Pwp4133uZ}~ zs7flb43&UUTDQ=)y8x~M_ypir0O8B(niLEdoivFq?RpI0wuSK@%A*hM13DHu&F zaz!XK_78xEfxskls1(d)CFOq^6wYPd0QeFJj2L778GG53X*zbRg7Ox?=fK8o2u6dx zXo7O0Ga|wZWqieIgz^Z$9mfEMPYh2+Fmi-0r8o+n2 zwc-9DipJ1eUI4hM7)}BvM!II7F9F<83MWa|u?jrRaFPNq=9EAyoMcK6dlJb4lbWL` ztddD2cWTF8cF+cAqiLZ^3!IaMs-*tav)Ql;&MN>v0+lhjrOntn1A)mc zhSPI2ZTlb`);ZTLjGq9W1^|=4d}6~XRy|WSUc$K#;3|L*0KNqPlfU3*!Eis!+;>p< z*k;>7){FY5sB&9D)@>lCV5+x)*pP}bsr0${*q_&L99po}__vxV%}`@{Ota027L2yK zW-Ku6wzDoMq}pwOPJbRnbEq*qrrVZz2hJR`RKJ@nW(vm(h2w5?ufTdES4||(0M78Y z{<*v&U2f?szKz1i?W9pC6|I_BwhD85u_MS_rdV%CFZ1Q~5eA+JUmtqm2edvWrH;}1 oU>&~)G3%|5V)7LmQ+jyUe?eQcl385#F8}}l07*qoM6N<$g2nmH&Hw-a literal 0 HcmV?d00001 diff --git a/src/home/Img/right.png b/src/home/Img/right.png new file mode 100644 index 0000000000000000000000000000000000000000..f5a134bd99983cd6430b8ea413460d3c91fa2f9d GIT binary patch literal 1018 zcmVPx&v`IukRCr$PoI8@#Fc5}+@me4yfPk1sQN>jVNZ}k*0Vx3q6h*Qp-~z;CB#?0i zGA_XE?9Pb#jpUU*w&jPW-F~QQ%Cj{)a_gJ!za_bC1Hopky#jzQ6CC-T%^$7%n@7I( z{%DNhdy(diIm*ebwe0_@gTUj^^AXg}!P*&PJjCSo4>h#XAZsllTnoG+x#58~T^M5s zD``s###&1l9!OF{Bb_nC2(tK8{5t$ZCYsOMiL|%34bx)RHMQYR|T-p`F24Yi}yhlCI<28)G(I zzSJ6w)02}4Lh(E(%x7(NrxlnPKg}-tUS;IFbfHx zGKYhZssb~o)ZEtN53*DNjN4D)I%tWF3(kB$rwnF^-jdIX!}U}SW}(_rt2H5*C1s*I zsmL=_21a<^au>ie0Dk~{b-VsrG%cUkcre^_k`mo_03J9JKLLDD1}76?4@PoF?jwNv zfs1H^ldYjVm|KF=|0e)mmpoJx9BYjEYusg1rfJFc6u>LRa5e-ZsV^aX&2Y8^!wY46 zjnTBiIVYI0=Pw%J>qxn0>|&+A2-ojImLr9m@ZWDq1OA?!o=uw@N*QI0{>vk~;Glz`ekKwSj4lP(~;-zN787k$k-nXxI#fc7#y2Cu5jq1n>2LiD zc`2!m=pwTG-&WxhcG@bG%2rG)TglvB90)SEDb^d(t9*BTgh3>t*N0xj0j-ZoX=1cK oSSRj5%zEpim|~NQDLuUFALdKAl9XFA6951J07*qoM6N<$f+*+Fp#T5? literal 0 HcmV?d00001 diff --git a/src/home/Index.jsx b/src/home/Index.jsx index f1c628d1..bd74ab0f 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 25d5f83f..7678aba4 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 5a14becb..278cef9f 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 d24ad15c..9d68ef19 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)) ? -

    注册

    +

    立即注册

    :"" }