diff --git a/src/forge/Information/Pages/headerPage.jsx b/src/forge/Information/Pages/headerPage.jsx
index 5f9e93caf..f682c39ca 100644
--- a/src/forge/Information/Pages/headerPage.jsx
+++ b/src/forge/Information/Pages/headerPage.jsx
@@ -21,7 +21,7 @@ function HeaderPage(props){
},[id])
function getPersonList(){
- getHomePageList({id}).then(result=>{
+ getHomePageList(id).then(result=>{
if(result){
setPersonList(result.data.rows);
}
@@ -29,7 +29,7 @@ function HeaderPage(props){
}
function getNewsList(){
- gethomePageDocList({id}).then(result=>{
+ gethomePageDocList(id).then(result=>{
if(result){
setNewsList(result.data.rows);
}
@@ -37,7 +37,7 @@ function HeaderPage(props){
}
function getProjectList(){
- getAllList({id,isHomepage:1}).then(result=>{
+ getAllList(id,{isHomepage:1}).then(result=>{
if(result){
setProjectList(result.data.rows);
}
diff --git a/src/forge/Information/Pages/main.jsx b/src/forge/Information/Pages/main.jsx
index 014116dc3..e8617b5fb 100644
--- a/src/forge/Information/Pages/main.jsx
+++ b/src/forge/Information/Pages/main.jsx
@@ -10,7 +10,7 @@ import shijian from '../img/shijian.png';
import liulan from '../img/liulan.png';
import emptydata from '../../Images/nodata.png';
import DefaultImg from '../Component/defaultImg';
-import { httpUrl } from '../fetch';
+import { getNewsAllList , getNewsHotList } from '../api';
function Main(props){
const [ key , setKey ] = useState("1");
@@ -32,8 +32,7 @@ function Main(props){
},[id])
function getMainList(){
- const url = `${httpUrl}/cms/doc/open/zone/${id}/docOverviewList`;
- axios.get(url).then(result=>{
+ getNewsAllList(id).then(result=>{
if(result){
let rows = result.data.rows;
setMainList(rows);
@@ -50,9 +49,8 @@ function Main(props){
}
function getHotList(){
- const url = `${httpUrl}/cms/doc/open/zone/${id}/hotDocList`;
- axios.get(url,{
- params:{pageSize:15,pageNum:1}
+ getNewsHotList(id,{
+ pageSize:15,pageNum:1
}).then(result=>{
if(result){
setHotList(result.data.rows);
diff --git a/src/forge/Information/Pages/newsDetail.jsx b/src/forge/Information/Pages/newsDetail.jsx
index f8d559b8a..8684724b3 100644
--- a/src/forge/Information/Pages/newsDetail.jsx
+++ b/src/forge/Information/Pages/newsDetail.jsx
@@ -4,7 +4,7 @@ import liulan from '../img/liulan.png';
import RenderHtml from '../../../components/render-html';
import { Base64 } from 'js-base64';
import axios from 'axios';
-import { httpUrl } from '../fetch';
+import { getNewsDetail } from '../api';
function NewsDetail(props){
const { deptId , id } = props.match.params;
@@ -20,8 +20,7 @@ function NewsDetail(props){
},[id])
function getDetails(){
- const url = `${httpUrl}/cms/doc/open/${id}`;
- axios.get(url).then(result=>{
+ getNewsDetail(id).then(result=>{
if(result){
let data = result.data.data;
setDetail(data);
diff --git a/src/forge/Information/Pages/projectSource.jsx b/src/forge/Information/Pages/projectSource.jsx
index 2ce0b9d6b..b093147e8 100644
--- a/src/forge/Information/Pages/projectSource.jsx
+++ b/src/forge/Information/Pages/projectSource.jsx
@@ -5,7 +5,7 @@ import { Input , Menu , Pagination , Spin } from 'antd';
import { Link } from 'react-router-dom';
import Nodata from '../../Nodata';
import axios from 'axios';
-import { httpUrl } from '../fetch';
+import { getProjectsLists , getProjectsTypeLists } from '../api';
const { Search } = Input;
function ProjectSource(props){
@@ -35,14 +35,11 @@ function ProjectSource(props){
},[id,typeId,page,searchName])
function getLists(){
- const url = `${httpUrl}/zone/open/${id}/project/list`;
- axios.get(url,{
- params:{
- pageNum:page,
- name:searchName,
- pageSize,
- projectTypeId:typeId===0?undefined:typeId
- }
+ getProjectsLists(id,{
+ pageNum:page,
+ name:searchName,
+ pageSize,
+ projectTypeId:typeId===0?undefined:typeId
}).then(result=>{
if(result){
setLists(result.data.rows);
@@ -52,15 +49,14 @@ function ProjectSource(props){
}).catch(error=>{})
}
-
function getTypeList(){
- const url = `${httpUrl}/zone/open/${id}/projectType/list`;
- axios.get(url).then(result=>{
+ getProjectsTypeLists(id).then(result=>{
if(result){
setTypeList(result.data.rows);
}
}).catch(error=>{})
}
+
const menu = (