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(
    <div className="aboutBox">
      <p className="aboutTitle">关于我们</p>
      <div className="desc">
        {about && about.content}
      </div>
    </div>
  )
}
export default HomeHoc(Index);