diff --git a/src/App.js b/src/App.js index 57c94765..7f739d5a 100644 --- a/src/App.js +++ b/src/App.js @@ -45,6 +45,11 @@ const License = Loadable({ loader: () => import('./mulan/license/Index'), loading: Loading, }) +//关于我们 +const About = Loadable({ + loader: () => import('./mulan/About/Index'), + loading: Loading, +}) //403页面 const Shixunauthority = Loadable({ loader: () => import('./modules/403/Shixunauthority'), @@ -177,6 +182,13 @@ class App extends Component { ) } /> + ( + + ) + } + /> ( diff --git a/src/mulan/About/Index.jsx b/src/mulan/About/Index.jsx new file mode 100644 index 00000000..fc6dca13 --- /dev/null +++ b/src/mulan/About/Index.jsx @@ -0,0 +1,30 @@ +import React, { useEffect, useState } from 'react'; +import { HomeHoc } from '../HOC/HomeHoc'; +import'./Index.scss'; +import axios from 'axios'; + +function Index(){ + const [ about , setAbout ] = useState(undefined); + + useEffect(()=>{ + getAbout(); + },[]) + + function getAbout(){ + const url = `/helps/about.json`; + axios.get(url).then(result=>{ + if(result && result.data){ + setAbout(result.data.data); + } + }).catch(error=>{}) + } + return( +
+

关于我们

+
+ {about && about.content} +
+
+ ) +} +export default HomeHoc(Index); \ No newline at end of file diff --git a/src/mulan/About/Index.scss b/src/mulan/About/Index.scss new file mode 100644 index 00000000..f9c4053d --- /dev/null +++ b/src/mulan/About/Index.scss @@ -0,0 +1,21 @@ +.aboutBox{ + max-width: 1200px; + margin:20px auto; + border:1px solid #eee; + border-radius: 4px; + .aboutTitle{ + font-size: 20px; + padding:10px 0px; + text-align: center; + border-bottom:1px solid #eee; + margin-bottom: 0px; + } + .desc{ + line-height: 22px; + font-size: 16px; + color: #333; + text-indent: 2em; + text-align: justify; + padding:40px; + } +} \ No newline at end of file diff --git a/src/mulan/HOC/HomeHoc.jsx b/src/mulan/HOC/HomeHoc.jsx index f89b4b02..8b2a96a2 100644 --- a/src/mulan/HOC/HomeHoc.jsx +++ b/src/mulan/HOC/HomeHoc.jsx @@ -52,13 +52,14 @@ export function HomeHoc(Sub){ render(){ const { users } = this.state; const { headData } = this.props; + console.log(this.props); return(
+
-
) } diff --git a/src/mulan/HOC/Index.scss b/src/mulan/HOC/Index.scss index b564693d..12bf5a98 100644 --- a/src/mulan/HOC/Index.scss +++ b/src/mulan/HOC/Index.scss @@ -53,7 +53,9 @@ .homebody{ padding-top: 60px; + padding-bottom: 136px; min-height: 100%; + position: relative; } .footsnav{ position: absolute; @@ -73,6 +75,10 @@ color: #666; text-align: center; padding:30px 0px; + position: absolute; + width: 100%; + left: 0px; + bottom: 0px; .homeFooterUl{ display: flex; align-items: center; diff --git a/src/mulan/Index.jsx b/src/mulan/Index.jsx index 51ca58bf..3c33b08d 100644 --- a/src/mulan/Index.jsx +++ b/src/mulan/Index.jsx @@ -128,7 +128,7 @@ function Index(props){
{about.name}
- {about.content} + {about.content}查看更多