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 && -
- - {tempConfig[temp].mainTitle} - { cmsDir && {cmsDir.name} } - 正文 - -
-
-

{detail.name}

-
    - { cmsDir &&
  • { detail.publishUser }
  • } - { cmsDir &&
  • 发布于{detail.publishTime}
  • } - { detail.visits &&
  • {detail.visits}
  • } -
+ + { + detail && +
+ + {tempConfig[temp].mainTitle} + { cmsDir && {cmsDir.name} } + 正文 + +
+
+

{detail.name}

+
    + { cmsDir &&
  • { detail.publishUser }
  • } + { cmsDir &&
  • 发布于{detail.publishTime}
  • } + { detail.visits &&
  • {detail.visits}
  • } +
+
+ + { + content ? + + : + 暂无详情~ + }
- - { - content ? - - : - 暂无详情~ - }
-
- } + } +
) }