diff --git a/src/forge/Information/Pages/newsDetail.jsx b/src/forge/Information/Pages/newsDetail.jsx index 7865d17bf..7bd2f35c0 100644 --- a/src/forge/Information/Pages/newsDetail.jsx +++ b/src/forge/Information/Pages/newsDetail.jsx @@ -1,5 +1,5 @@ import React,{ useState , useEffect } from 'react'; -import { Breadcrumb , Divider } from 'antd'; +import { Breadcrumb , Divider, Spin } from 'antd'; import liulan from '../img/liulan.png'; import RenderHtml from '../../../components/render-html'; import { Base64 } from 'js-base64'; @@ -12,6 +12,7 @@ function NewsDetail(props){ const [ detail , setDetail ] = useState(undefined); const [ cmsDir , setCmsDir ] = useState(undefined); const [ content , setContent]=useState(undefined); + const [ isSpin , setIsSpin]=useState(false); const temp = props.temp useEffect(()=>{ @@ -22,44 +23,48 @@ function NewsDetail(props){ },[id]) function getDetails(){ + setIsSpin(true) getNewsDetail(id).then(result=>{ if(result){ let data = result.data.data; setDetail(data); setCmsDir(data.cmsDir); setContent(Base64.decode(data.content)); + setIsSpin(false) } }).catch(error=>{}) } return(
{detail.name}
-{detail.name}
+