diff --git a/src/forge/SoftwareFactory/components/Home/index.jsx b/src/forge/SoftwareFactory/components/Home/index.jsx
index 892657e36..1fa905a16 100644
--- a/src/forge/SoftwareFactory/components/Home/index.jsx
+++ b/src/forge/SoftwareFactory/components/Home/index.jsx
@@ -10,6 +10,7 @@ import "slick-carousel/slick/slick.css";
import "slick-carousel/slick/slick-theme.css";
import Slider from "react-slick";
import RightContent from "./rightContent";
+import { getNewsAllList } from '../../../Information/api';
// let focuseWorkList = [
// {
@@ -68,19 +69,32 @@ const setting = {
};
function Home(props) {
- const { newsList,timeObj,dayMap,weekMap,monthMap,weatherObj,currentMonth } = props;
+ const {id, newsList,timeObj,dayMap,weekMap,monthMap,weatherObj,currentMonth } = props;
const [firstNews, setFirstNews] = useState({});
const [focuseWorkList, setFocuseWorkList] = useState([]);
const rightContentDom = React.useRef(null)
// const [focuseWorkList, setFocuseWorkList] = useState([]);
+ useEffect(()=>{
+ let timer = null
+ if(id){
+ getNewsList()
+ timer = setInterval(()=>{
+ getNewsList()
+ },Number(localStorage.getItem('apiTime')) || 300000)
+ return () =>{
+ clearInterval(timer)
+ }
+ }
+ },[id])
-
- useEffect(() => {
- if (newsList && newsList.length) {
- // //重点工作
+ function getNewsList() {
+ getNewsAllList(id).then(result => {
+ if (result && result.data.rows && result.data.rows.length) {
+ let rows = result.data.rows;
+ // //重点工作
let allList = [];
- newsList.map((item) => {
+ rows.map((item) => {
if (item.name === "开源中心要闻") {
item.cmsDocList.map((item) => {
allList.push(item);
@@ -114,9 +128,9 @@ function Home(props) {
}
});
setFocuseWorkList(finalList);
- }
- }, newsList);
-
+ }
+ }).catch(error => { })
+ }
return (
diff --git a/src/forge/SoftwareFactory/components/ProjectStatus/index.scss b/src/forge/SoftwareFactory/components/ProjectStatus/index.scss
index 186beeb8f..f6b4d3f7a 100644
--- a/src/forge/SoftwareFactory/components/ProjectStatus/index.scss
+++ b/src/forge/SoftwareFactory/components/ProjectStatus/index.scss
@@ -1,7 +1,7 @@
.project-wrap {
width: 1920px;
height: 1080px;
- overflow-x: scroll;
+ // overflow-x: scroll;
background-image: url(../../img/bj2.png);
background-size: 100% 100%;
display: flex;
diff --git a/src/forge/SoftwareFactory/index.jsx b/src/forge/SoftwareFactory/index.jsx
index 9de4ea562..6f29e8556 100644
--- a/src/forge/SoftwareFactory/index.jsx
+++ b/src/forge/SoftwareFactory/index.jsx
@@ -6,7 +6,7 @@ import { withRouter } from "react-router";
import { ImageLayerOfCommentHOC } from "../../modules/page/layers/ImageLayerOfCommentHOC";
import Home from './components/Home/index'
import ProjectStatus from './components/ProjectStatus/index'
-import { getNewsAllList, getMainInfos } from '../Information/api';
+import { getMainInfos } from '../Information/api';
import next from "./img/next.png";
import Slider from "react-slick";
import './index.scss';
@@ -69,27 +69,6 @@ function Index(props){
};
},[])
- useEffect(()=>{
- let timer = null
- if(id){
- getNewsList()
- timer = setInterval(()=>{
- getNewsList()
- },Number(localStorage.getItem('apiTime')) || 300000)
- return () =>{
- clearInterval(timer)
- }
- }
- },[id])
-
- function getNewsList() {
- getNewsAllList(id).then(result => {
- if (result) {
- let rows = result.data.rows;
- setNewsList(rows);
- }
- }).catch(error => { })
- }
function getId(){
getMainInfos('xjykyzx').then(result=>{
@@ -198,7 +177,7 @@ function Index(props){
return (
)
diff --git a/src/forge/SoftwareFactory/index.scss b/src/forge/SoftwareFactory/index.scss
index 8240529a3..b3d3e7be6 100644
--- a/src/forge/SoftwareFactory/index.scss
+++ b/src/forge/SoftwareFactory/index.scss
@@ -52,11 +52,11 @@ $blue-color-light: rgba(39, 118, 217, 1);
bottom: 0;
left: 0;
z-index: 99;
- height: 100vh;
- width: 100vw;
+ height: 1080px;
+ width: 1920px;
.home-wrap {
- height: 100vh;
- width: 100vw;
+ height: 1080px;
+ width: 1920px;
background-image: url(./img/bj1.png);
background-size: 100% 100%;
display: flex;