+
@@ -134,9 +134,9 @@ function HeaderPage(props){
personList.map((i,k)=>{
return(
-
+
{i.name}
- {i.introduction}
+ {i.introduction || "暂无~"}
)
})
diff --git a/src/forge/Information/Pages/main.jsx b/src/forge/Information/Pages/main.jsx
index bff930efc..694a06f08 100644
--- a/src/forge/Information/Pages/main.jsx
+++ b/src/forge/Information/Pages/main.jsx
@@ -1,9 +1,9 @@
import React , { useState , useEffect } from 'react';
-import Banner from '../Component/publicBanner';
import { Menu , Spin , Skeleton } from 'antd';
import Hot from '../Component/hot';
import { Box , LongWidth } from '../../Component/layout';
import { Link } from 'react-router-dom';
+import Lists from './newsList';
import guideArrow from '../img/guideArrow.png';
import axios from 'axios';
import shijian from '../img/shijian.png';
@@ -15,9 +15,11 @@ import DefaultImg from '../Component/defaultImg';
function Main(props){
const [ key , setKey ] = useState("1");
const [ mainList , setMainList ] = useState(undefined);
+ const [ name , setName] = useState(undefined);
+ const [ menuH , setMenuH ] = useState(true);
const [ hotList , setHotList ] = useState(undefined);
const [ isSpin , setIsSpin ] = useState(true);
- const { deptId } = props.match.params;
+ const { deptId , cateId } = props.match.params;
const { address } = props;
@@ -37,8 +39,16 @@ function Main(props){
}
}).then(result=>{
if(result){
- setMainList(result.data.rows);
- setIsSpin(false);
+ let rows = result.data.rows;
+ setMainList(rows);
+ setTimeout(() => {
+ let ele = document.getElementById("menus");
+ if(ele){
+ let h = ele.clientHeight;
+ setMenuH(h>56);
+ }
+ setIsSpin(false);
+ }, 100);
}
}).catch(error=>{})
}
@@ -61,42 +71,47 @@ function Main(props){
return(
-
-
领域资讯
- {
- mainList && mainList.length>0 &&
-
- {
- mainList.map((i,k)=>{
- return(
- clickTab(`${k+1}`,`main_card_item_${k+1}`)}>{i.name}
- )
- })
- }
-
- }
- {
- !mainList &&
- }
+
+
领域资讯
+ {
+ mainList && mainList.length>0 &&
+
+ }
+ {
+ !mainList &&
+ }
+
-
{
- mainList && mainList.length>0 &&
- mainList.map((i,k)=>{
- return(
-
-
-
{i.name}
-
更多
-
-
- {
- i.cmsDocList && i.cmsDocList.length>0 ?
-
- {i.cmsDocList.map((j,e)=>{
+ cateId ?
+
+ :
+
+ {
+ mainList && mainList.length>0 &&
+ mainList.map((i,k)=>{
+ return(
+
+
+
{i.name}
+ { i.cmsDocList && i.cmsDocList.length> 0 &&
{window.scrollTo(0,400)}}>更多
}
+
+
+ {
+ i.cmsDocList && i.cmsDocList.length>0 ?
+ i.cmsDocList.map((j,e)=>{
return(
{props.history.push(`/information/${deptId}/newdetail/${j.id}`)}}>
{e===0 &&
@@ -120,27 +135,24 @@ function Main(props){
)
})
+ :
+
+
+
暂无数据~
+
}
-
-
- :
-
-
-
暂无数据~
-
-
- }
+
-
- )
- })
+ )
+ })
+ }
+
}
-
-
+
diff --git a/src/forge/Information/Pages/newsDetail.jsx b/src/forge/Information/Pages/newsDetail.jsx
index 7ddac2101..f57c3f07d 100644
--- a/src/forge/Information/Pages/newsDetail.jsx
+++ b/src/forge/Information/Pages/newsDetail.jsx
@@ -14,6 +14,7 @@ function NewsDetail(props){
useEffect(()=>{
if(id && address){
+ window.scrollTo(0,450);
getDetails();
}
},[id,address])
diff --git a/src/forge/Information/Pages/newsList.jsx b/src/forge/Information/Pages/newsList.jsx
index c1a3ced7a..d729cf540 100644
--- a/src/forge/Information/Pages/newsList.jsx
+++ b/src/forge/Information/Pages/newsList.jsx
@@ -25,21 +25,22 @@ function NewsList(props){
useEffect(()=>{
if(deptId && cateId && address){
+ setMenuSpin(true);
getMainList();
}
},[deptId,cateId,pageNum,address])
- useEffect(()=>{
- if(deptId && cateId){
- setMenuSpin(true);
- getMainList();
- getHotList();
- getColumnList();
- getColumnDetail();
- }
- },[deptId,cateId])
+ // useEffect(()=>{
+ // if(deptId && cateId){
+ // setMenuSpin(true);
+ // getMainList();
+ // getHotList();
+ // getColumnList();
+ // getColumnDetail();
+ // }
+ // },[deptId,cateId])
function getColumnDetail(){
const url = `${address}/cms/doc/open/dir/${cateId}`;
@@ -71,6 +72,7 @@ function NewsList(props){
if(result){
setMainList(result.data.rows);
setTotal(result.data.total);
+ setMenuSpin(false);
}
}).catch(error=>{})
}
@@ -89,82 +91,85 @@ function NewsList(props){
}
return(
-
- {/*
*/}
-
-
- 领域资讯
- {details && details.name}
-
-
{details && details.name}
-
-
-
- {
- columnList && columnList.length>0 &&
-
+ //
+ //
+ //
+ // 领域资讯
+ // {details && details.name}
+ //
+ //
{details && details.name}
+ //
+ //
+ //
+ // {
+ // columnList && columnList.length>0 &&
+ //
+ // {
+ // columnList.map((i,k)=>{
+ // return(
+ // {if(document.documentElement.scrollTop > 600)window.scrollTo(0,480);}} to={`/information/${deptId}/news/${i.id}`} title={i.name}>{i.name}
+ // )
+ // })
+ // }
+ //
+ // }
+ //
+ //
+ //
+ //
+
+
+ {
+ mainList && mainList.length>0 &&
+ mainList.map((i,k)=>{
+ return(
+
{props.history.push(`/information/${deptId}/newdetail/${i.id}`)}} key={k}>
{
- columnList.map((i,k)=>{
- return(
-
{if(document.documentElement.scrollTop > 600)window.scrollTo(0,480);}} to={`/information/${deptId}/news/${i.id}`} title={i.name}>{i.name}
- )
- })
+ i.headImg ?
+
+ :
+
}
-
- }
+
+
{i.name}
+
+ {i.summary}
+
+
+
{i.publishTime}
+
{i.visits}
+
+
+
+ )
+ })
+ }
+ {
+ mainList && mainList.length === 0 &&
+
+
+
暂无数据~
-
-
-
-
- {
- mainList && mainList.length>0 ?
- mainList.map((i,k)=>{
- return(
-
{props.history.push(`/information/${deptId}/newdetail/${i.id}`)}} key={k}>
- {
- i.headImg ?
-
- :
-
- }
-
-
{i.name}
-
- {i.summary}
-
-
-
{i.publishTime}
-
{i.visits}
-
-
-
- )
- })
- :
-
-
-
暂无数据~
-
- }
- {
- total > pageSize &&
-
- }
-
-
- {
+ }
+ {
+ total > pageSize &&
+
+ }
+
+
+ //
+ /* {
hostList && hostList.length>0 &&
- }
-
+ } */
+ /*
-
-
+ */
+ //
)
}
export default NewsList;
\ No newline at end of file
diff --git a/src/forge/Information/Pages/projectSource.jsx b/src/forge/Information/Pages/projectSource.jsx
index 4fbdee588..c4926f3f8 100644
--- a/src/forge/Information/Pages/projectSource.jsx
+++ b/src/forge/Information/Pages/projectSource.jsx
@@ -83,12 +83,12 @@ function ProjectSource(props){
项目分类
- setTypeId(0)}>全部分类
+ {setTypeId(0)}}>全部分类
{
typeList && typeList.length>0 &&
typeList.map((i,k)=>{
return(
- setTypeId(i.id)}>{i.name}
+ {setTypeId(i.id);window.scrollTo(0,0)}}>{i.name}
)
})
}
diff --git a/src/forge/Information/Pages/zoneVIP.jsx b/src/forge/Information/Pages/zoneVIP.jsx
index 59efdaf27..0487ea549 100644
--- a/src/forge/Information/Pages/zoneVIP.jsx
+++ b/src/forge/Information/Pages/zoneVIP.jsx
@@ -1,6 +1,7 @@
import React , { useState , useEffect } from 'react';
import Crown from '../img/crown.png';
import Nodata from '../../Nodata';
+import { Link } from 'react-router-dom';
import { Spin } from 'antd';
import axios from 'axios';
@@ -47,13 +48,13 @@ function ZoneVIP(props){
{i.typeIntroduction}
{
- i.zoneMemberList && i.zoneMemberList.length > 0 &&
+ i.zoneMemberList && i.zoneMemberList.length > 0 ?
{
i.zoneMemberList.map((j,key)=>{
return(
-
+
{j.name} {j.memberLevel && {j.memberLevel} }
{j.introduction}
@@ -63,6 +64,8 @@ function ZoneVIP(props){
})
}
+ :
+
}
)
diff --git a/src/forge/Information/index.jsx b/src/forge/Information/index.jsx
index 179d20505..f7c8607e0 100644
--- a/src/forge/Information/index.jsx
+++ b/src/forge/Information/index.jsx
@@ -42,7 +42,6 @@ function Index(props){
const [ address , setAddress ] = useState("");
const { deptId } = props.match.params;
const isDev = window.location.port === '3007' || window.location.origin === "https://testforgeplus.trustie.net";
- console.log(isDev,window.location);
useEffect(()=>{
const isDev = window.location.port === '3007' || window.location.origin === "https://testforgeplus.trustie.net";
@@ -80,6 +79,9 @@ function Index(props){
function getAdminUrl(){
const url = `${address}/zone/zoneDetail/${deptId}/checkZoneRole`;
+ if (window.location.href.indexOf('localhost') < 0) {
+ axios.defaults.withCredentials = true;
+ }
axios.get(url).then(response=>{
if(response && response.data.code === 200){
setAdminUrl(response.data.data);
@@ -106,7 +108,7 @@ function Index(props){
(
-
+
)}
>
img{
+ & >a >img{
width: 80px;
height: 80px;
border-radius: 50%;
@@ -789,6 +789,9 @@
line-height:26px;
text-align:center;
-webkit-line-clamp: 3;
+ align-items: center;
+ height: 78px;
+ word-break: break-all;
}
}
}
@@ -888,7 +891,7 @@
&:last-child{
border-bottom: none;
}
- &>img{
+ & > a >img{
width: 100px;
height: 100px;
border-radius: 50%;
diff --git a/src/forge/SecuritySetting/notice/fetch.js b/src/forge/SecuritySetting/notice/fetch.js
index dba00b140..ab4064212 100644
--- a/src/forge/SecuritySetting/notice/fetch.js
+++ b/src/forge/SecuritySetting/notice/fetch.js
@@ -5,6 +5,7 @@ const developUrl = "https://test-search.trustie.net";
const testUrl = "https://test-search.trustie.net";
const productUrl = "https://wiki-api.trustie.net";
+
const { service, actionUrl } = javaFetch(productUrl, testUrl, developUrl);
export const httpUrl = actionUrl;
export default service;
\ No newline at end of file