From 09f695fb2d944fcd1f60d900cde9f424b7f8fe73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Thu, 21 Sep 2023 09:55:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E8=BA=AB=E4=BB=BD?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=96=87=E6=A1=88=E6=94=B9=E4=B8=BA=E7=AE=A1?= =?UTF-8?q?=E7=90=86XX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Information/Pages/main.jsx | 16 ++++------------ src/forge/Information/Pages/source.jsx | 2 +- src/forge/Information/fetch.js | 2 ++ 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/forge/Information/Pages/main.jsx b/src/forge/Information/Pages/main.jsx index 668aee4b1..0952af045 100644 --- a/src/forge/Information/Pages/main.jsx +++ b/src/forge/Information/Pages/main.jsx @@ -29,10 +29,10 @@ function Main(props){ const menu = ( - {addNew("richEditor")}}>富文本编辑器 + {history.push(`/zone/${deptId}/news/add?type=richEditor`)}}>富文本编辑器 - {addNew("mdEditor")}}>MD编辑器 + {history.push(`/zone/${deptId}/news/add?type=mdEditor`)}}>MD编辑器 ); @@ -56,14 +56,6 @@ function Main(props){ } }, [newCateId]) - function addNew(type){ - if(role && role.role === "Manager"){ - window.open(role.docManageUrl); - }else{ - history.push(`/zone/${deptId}/news/add?type=${type}`) - } - } - function getMainList(){ getNewsAllList(id).then(result=>{ if(result){ @@ -134,9 +126,9 @@ function Main(props){ {role.role === "Member" && } - + {role.role === "Member" ? - + : } } { diff --git a/src/forge/Information/Pages/source.jsx b/src/forge/Information/Pages/source.jsx index 266c6f153..eed911c1d 100644 --- a/src/forge/Information/Pages/source.jsx +++ b/src/forge/Information/Pages/source.jsx @@ -95,7 +95,7 @@ function Source(props){ {role.role === "Member" && } - + } diff --git a/src/forge/Information/fetch.js b/src/forge/Information/fetch.js index 29cc15d28..69f62c0a0 100644 --- a/src/forge/Information/fetch.js +++ b/src/forge/Information/fetch.js @@ -1,5 +1,6 @@ import axios from 'axios'; import { message , notification } from 'antd'; +// import cookie from 'react-cookies'; function beforeFetch(actionUrl){ if (window.location.href.indexOf('localhost') < 0) { @@ -7,6 +8,7 @@ function beforeFetch(actionUrl){ } const service = axios.create({ + // headers:{Authorization: cookie.load("autologin_trustie")}, baseURL: actionUrl, timeout: 1800000, // 请求超时时间 });