diff --git a/src/forge/AboutUs/AboutUs.jsx b/src/forge/AboutUs/AboutUs.jsx index 22989a36..142528bd 100644 --- a/src/forge/AboutUs/AboutUs.jsx +++ b/src/forge/AboutUs/AboutUs.jsx @@ -1,7 +1,9 @@ import React , { useEffect , useState } from 'react'; import { TPMIndexHOC} from '../../modules/tpm/TPMIndexHOC'; import { Timeline, Carousel } from 'antd'; +import { getImageUrl } from 'educoder'; import CountUp from 'react-countup'; +import axios from 'axios'; import './AboutUs.scss'; import subititle from './image/subtitle.png'; import achievements from './image/achievements.png'; @@ -15,26 +17,6 @@ import fun2 from './image/fun2.png'; import fun3 from './image/fun3.png'; import fun4 from './image/fun4.png'; import fun5 from './image/fun5.png'; -import img1 from './image/img1.png'; -import img2 from './image/img2.png'; -import img3 from './image/img3.png'; -import img4 from './image/img4.png'; -import img5 from './image/img5.png'; -import img6 from './image/img6.png'; -import img7 from './image/img7.png'; -import img8 from './image/img8.png'; -import img9 from './image/img9.png'; -import img10 from './image/img10.png'; -import img11 from './image/img11.png'; -import img12 from './image/img12.png'; -import img13 from './image/img13.png'; -import img14 from './image/img14.png'; -import img15 from './image/img15.png'; -import img16 from './image/img16.png'; -import img17 from './image/img17.png'; -import img18 from './image/img18.png'; -import img19 from './image/img19.png'; -import img20 from './image/img20.png'; function AboutUs(){ const countUpProps = { @@ -46,8 +28,17 @@ function AboutUs(){ const [selectTitle, setSelectTitle] = useState(1); //用于刷新组件 const [flush, setFlush] = useState(false); + //合作单位 + const [units, setUnits] = useState([]); + useEffect(()=>{ + //添加浏览器滚动监听事件 window.addEventListener('scroll', scrollListener); + //请求topics.json接口获取合作单位信息 + axios.get(`/topics.json`, { params: { topic_type: "cooperator", limit: 20, group_size: 5}}).then(response=>{ + response && setUnits(response.data.topics); + }); + return ()=>window.removeEventListener('scroll', scrollListener); },[]) function scrollListener(e){ @@ -269,34 +260,17 @@ function AboutUs(){
合作单位
- - - - - - - - - - - - - - - - - - - - - - - - - - - - + {units && units.map(group =>{ + return ( + + {group.map(item =>{ + return( + + ) + })} + + ) + })}
diff --git a/src/forge/AboutUs/AboutUs.scss b/src/forge/AboutUs/AboutUs.scss index 5399aa64..2c775771 100644 --- a/src/forge/AboutUs/AboutUs.scss +++ b/src/forge/AboutUs/AboutUs.scss @@ -319,13 +319,16 @@ width: 1200px; height: 550px; margin-top: 15px; - } - & img{ - width: 224px; - box-shadow: 0px 1px 8px 1px rgba(0, 0, 0, 0.06); - border-radius: 6px; - border: 2px solid #FFFFFF; - &:hover{ border: 1px solid #466AFF;} + border-collapse: separate; + border-spacing: 10px 10px; + & td{ + width: 224px; + height: 122px; + box-shadow: 0px 1px 8px 1px rgba(0, 0, 0, 0.06); + border-radius: 6px; + border: 2px solid #FFFFFF; + &:hover{ border: 1px solid #466AFF;} + } } } .au_cont{ diff --git a/src/forge/AboutUs/image/img1.png b/src/forge/AboutUs/image/img1.png deleted file mode 100644 index 1ca1947c..00000000 Binary files a/src/forge/AboutUs/image/img1.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img10.png b/src/forge/AboutUs/image/img10.png deleted file mode 100644 index 0e1d0934..00000000 Binary files a/src/forge/AboutUs/image/img10.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img11.png b/src/forge/AboutUs/image/img11.png deleted file mode 100644 index 4c61dbe5..00000000 Binary files a/src/forge/AboutUs/image/img11.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img12.png b/src/forge/AboutUs/image/img12.png deleted file mode 100644 index 5bb86e23..00000000 Binary files a/src/forge/AboutUs/image/img12.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img13.png b/src/forge/AboutUs/image/img13.png deleted file mode 100644 index 25114352..00000000 Binary files a/src/forge/AboutUs/image/img13.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img14.png b/src/forge/AboutUs/image/img14.png deleted file mode 100644 index 00293dff..00000000 Binary files a/src/forge/AboutUs/image/img14.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img15.png b/src/forge/AboutUs/image/img15.png deleted file mode 100644 index 56228add..00000000 Binary files a/src/forge/AboutUs/image/img15.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img16.png b/src/forge/AboutUs/image/img16.png deleted file mode 100644 index d3cbaa0c..00000000 Binary files a/src/forge/AboutUs/image/img16.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img17.png b/src/forge/AboutUs/image/img17.png deleted file mode 100644 index ba347abe..00000000 Binary files a/src/forge/AboutUs/image/img17.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img18.png b/src/forge/AboutUs/image/img18.png deleted file mode 100644 index 164122a2..00000000 Binary files a/src/forge/AboutUs/image/img18.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img19.png b/src/forge/AboutUs/image/img19.png deleted file mode 100644 index a3795f55..00000000 Binary files a/src/forge/AboutUs/image/img19.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img2.png b/src/forge/AboutUs/image/img2.png deleted file mode 100644 index a68c1320..00000000 Binary files a/src/forge/AboutUs/image/img2.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img20.png b/src/forge/AboutUs/image/img20.png deleted file mode 100644 index 287d00e0..00000000 Binary files a/src/forge/AboutUs/image/img20.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img3.png b/src/forge/AboutUs/image/img3.png deleted file mode 100644 index d70e26c7..00000000 Binary files a/src/forge/AboutUs/image/img3.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img4.png b/src/forge/AboutUs/image/img4.png deleted file mode 100644 index 867106fd..00000000 Binary files a/src/forge/AboutUs/image/img4.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img5.png b/src/forge/AboutUs/image/img5.png deleted file mode 100644 index 8c18d87e..00000000 Binary files a/src/forge/AboutUs/image/img5.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img6.png b/src/forge/AboutUs/image/img6.png deleted file mode 100644 index 159e7608..00000000 Binary files a/src/forge/AboutUs/image/img6.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img7.png b/src/forge/AboutUs/image/img7.png deleted file mode 100644 index 4036d117..00000000 Binary files a/src/forge/AboutUs/image/img7.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img8.png b/src/forge/AboutUs/image/img8.png deleted file mode 100644 index 35aa116e..00000000 Binary files a/src/forge/AboutUs/image/img8.png and /dev/null differ diff --git a/src/forge/AboutUs/image/img9.png b/src/forge/AboutUs/image/img9.png deleted file mode 100644 index 632cde5f..00000000 Binary files a/src/forge/AboutUs/image/img9.png and /dev/null differ