diff --git a/src/components/button/index.jsx b/src/components/button/index.jsx index 872a52dc4..e2f97d116 100644 --- a/src/components/button/index.jsx +++ b/src/components/button/index.jsx @@ -8,7 +8,7 @@ export const FlowBorderButton = ({ onClick, ...restProps }) => { - return + return
{children}
diff --git a/src/forge/Information/Component/memberApply.jsx b/src/forge/Information/Component/memberApply.jsx index 2db9d8109..cccadfd41 100644 --- a/src/forge/Information/Component/memberApply.jsx +++ b/src/forge/Information/Component/memberApply.jsx @@ -56,7 +56,7 @@ function MemberApply(props){ )} - setImageUrl(url) } url={ getImageUrlAbsolute(`/${current_user.image_url}`)} action={ getZoneUrl(`/api/cms/common/upload`) } /> + setImageUrl(url) } url={ getImageUrlAbsolute(`/${current_user.image_url}`)} action={ getZoneUrl(`/api/file/common/upload`) } /> {getFieldDecorator("introduction",{ diff --git a/src/forge/Information/Pages/main.jsx b/src/forge/Information/Pages/main.jsx index b819f13d1..6faccff6f 100644 --- a/src/forge/Information/Pages/main.jsx +++ b/src/forge/Information/Pages/main.jsx @@ -137,14 +137,14 @@ function Main(props){

{sectionCmsTitle}

- {role && role.role !== "None" &&
- {role.role === "Member" && } - {role.role === "Member" ? - - : } -
} + {role && role.role !== "None" && +
+ + +
+ }
{ mainList && mainList.length>0 && diff --git a/src/forge/Information/Pages/newsCreate.jsx b/src/forge/Information/Pages/newsCreate.jsx index cd7b17d88..71e3ced3d 100644 --- a/src/forge/Information/Pages/newsCreate.jsx +++ b/src/forge/Information/Pages/newsCreate.jsx @@ -12,7 +12,6 @@ import { httpUrl } from '../fetch'; function NewsCreate(props){ const {history, id, role, current_user} = props; - const temp = props.temp; const { getFieldDecorator, validateFields , setFieldsValue, setFields } = props.form; const { deptId, id: newsId } = props.match.params; const pathname = props.location.pathname; @@ -22,7 +21,7 @@ function NewsCreate(props){ const [dirList, setDirList] = useState(undefined); const [loading, setLoading] = useState(false); const [isEdit, setIsEdit] = useState(false); - const { sectionCmsTitle } = props.data; + const sectionCmsTitle = props.data && props.data.sectionCmsTitle; const layout = { labelCol: { span: 2 }, wrapperCol: { span: 14 }, @@ -129,7 +128,7 @@ function NewsCreate(props){
{ sectionCmsTitle } - {isEdit ? '编辑' : '新建'}文章 + {isEdit ? '编辑' : '新建'}资讯
@@ -161,7 +160,7 @@ function NewsCreate(props){ )} - + {getFieldDecorator("keywords", { rules:[{type: 'string', max: 30, message: "请精简文章标签,最大长度30"}], })( diff --git a/src/forge/Information/Pages/project/cateDetail/index.jsx b/src/forge/Information/Pages/project/cateDetail/index.jsx index a853ac05a..68e845703 100644 --- a/src/forge/Information/Pages/project/cateDetail/index.jsx +++ b/src/forge/Information/Pages/project/cateDetail/index.jsx @@ -243,7 +243,7 @@ function ProjectCateDetail(props) { {lists.map((item, key) => (
-
{item.projectProperties && item.projectProperties.name && item.projectProperties.name.split("/").pop()}
+
{item.projectProperties && item.projectProperties.fromOwner}/{item.projectProperties && item.projectProperties.name && item.projectProperties.name.split("/").pop()}
{item.projectProperties && item.projectProperties.description && ( diff --git a/src/forge/Information/Pages/project/cateList/CategorySection.jsx b/src/forge/Information/Pages/project/cateList/CategorySection.jsx index 75a9e5ddb..db39b62d3 100644 --- a/src/forge/Information/Pages/project/cateList/CategorySection.jsx +++ b/src/forge/Information/Pages/project/cateList/CategorySection.jsx @@ -1,6 +1,7 @@ import { useState, useEffect, Fragment } from 'react'; import { projectCateConfig } from '../projectCateConfig'; import icon6 from '../../../img/project/icon6.png' +import main6 from '../../../img/project/6_f_m.png' import GlowButton from '../../../../../components/button'; import Nodata from '../../../../Nodata'; import { Divider } from 'antd'; @@ -26,42 +27,43 @@ function CategorySection({ category, index, zoneId, nsccTitle }) { const layoutType = getLayoutType(index); // 渲染项目卡片 - const renderProjects = (showBtn) => { + const renderProjects = (showBtn,range) => { + console.log("-------------",category.name,showBtn, range && range[0]); if (!projects || projects.length === 0) { return ; } - - return projects.map((item, pIndex) => ( -
- - {item.projectProperties && item.projectProperties.description && ( + return projects.map((item, pIndex)=>{ + console.log(category.name,pIndex,range && pIndex === range[0]); + return( + (!range || (range && pIndex >= range[0] && pIndex < range[1])) ?
+
- {item.projectProperties.description} + {item.projectProperties && item.projectProperties.description}
- )} - {item.projectProperties && item.projectProperties.topics && ( -
    - {item.projectProperties.topics.split(",").map((t, k) => ( -
  • {t}
  • - ))} -
- )} -
-
- {item.projectType && {item.projectType}} - {item.projectProperties && item.projectProperties.language && - - {item.projectProperties.language} - } + {item.projectProperties && item.projectProperties.topics && ( +
    + {item.projectProperties.topics.split(",").map((t, k) => ( +
  • {t}
  • + ))} +
+ )} +
+
+ {item.projectType && {item.projectType}} + {item.projectProperties && item.projectProperties.language && + + {item.projectProperties.language} + } +
+ {item.projectProperties && item.projectProperties.timeAgo && 更新于{item.projectProperties.timeAgo}}
- {item.projectProperties && item.projectProperties.timeAgo && 更新于{item.projectProperties.timeAgo}} -
- {!!showBtn && 查看详情} -
- )); + {!!showBtn && 查看详情} +
:"" + ) + }) }; @@ -98,7 +100,7 @@ function CategorySection({ category, index, zoneId, nsccTitle }) {
{nsccTitle(category.name, 0.3, "pt80 center")}
{cateConfig.description}
-
+
天文及固体地球物理研究
{["天文地球物理是超算重要应用,研究宇宙及地球深部问题", "研究多尺度耦合,数据量大,向计算驱动转型", "超算助力科研模拟,支撑基础研究与灾害预警"].map((point, pIndex) => ( @@ -121,8 +123,47 @@ function CategorySection({ category, index, zoneId, nsccTitle }) { {layoutType === 'layout-3' && (
{parter_title()} +
+
+ {renderProjects(true)} +
+
)} + { layoutType ==="layout-4" &&
+ {parter_title()} +
+ {renderProjects(true,[0,1])} +
+ {renderProjects(false,[1,5])} +
+
+
} + { + layoutType ==="layout-5" &&
+ {parter_title()} +
+
+
+
+ {renderProjects(true)} +
+
+ } + { + layoutType ==="layout-6" &&
+
+
+ {nsccTitle(category.name, 0.3)} +
{cateConfig.description}
+
+ 查看更多 +
+
+ {renderProjects(false)} +
+
+ } ); } diff --git a/src/forge/Information/Pages/project/cateList/index.jsx b/src/forge/Information/Pages/project/cateList/index.jsx index 3cf49a3aa..e6ef98008 100644 --- a/src/forge/Information/Pages/project/cateList/index.jsx +++ b/src/forge/Information/Pages/project/cateList/index.jsx @@ -20,9 +20,9 @@ function ProjectCateList(props) { const [ visible ,setVisible ] =useState(false); const statsData = [ { label: '开源项目', value: statistics?.projectCount || 0, suffix: '个' }, - { label: '领域分类', value: statistics?.categoryCount || 0, suffix: '个' }, - { label: '行业应用场景', value: statistics?.applicationCount || 0, suffix: '个' }, - { label: '贡献者', value: statistics?.contributorCount || 0, suffix: '个' } + { label: '领域分类', value: statistics?.categoryCount || 6, suffix: '个' }, + { label: '行业应用场景', value: statistics?.applicationCount || 19, suffix: '个' }, + { label: '贡献者', value: statistics?.communityUserCount || 0, suffix: '个' } ]; // 页面访问统计 @@ -76,7 +76,7 @@ function ProjectCateList(props) { function getStatistics() { getZoneStatistics(id).then(result => { if (result && result.data) { - setStatistics(result.data); + setStatistics(result.data.data); } }); } @@ -106,7 +106,7 @@ function ProjectCateList(props) { return (
- setVisible(false)} role={role && role.role} onFresh={()=>{}}/> + setVisible(false)} role={role && role.role} onFresh={()=>{getTypeList();}}/> {/* 数据统计部分 */}
{nsccTitle("数聚开源力量,实时见证开源生态的每一次进化", 0.1, "center pt80")} @@ -125,8 +125,10 @@ function ProjectCateList(props) { {role && role.role !== "None" &&
{role.role === "Member" ? "我的项目" : "管理项目" } { + console.log("3333333333"); + + setVisible(true); e.stopPropagation(); - setVisible(true) }}>添加项目
}
@@ -152,11 +154,9 @@ function ProjectCateList(props) { {/* 底部区域 */}
-
+
共同构建超算开源生态
- + 提交项目
diff --git a/src/forge/Information/Pages/project/cateList/index.scss b/src/forge/Information/Pages/project/cateList/index.scss index 5dff5b71c..6af26ac9e 100644 --- a/src/forge/Information/Pages/project/cateList/index.scss +++ b/src/forge/Information/Pages/project/cateList/index.scss @@ -96,6 +96,9 @@ padding-bottom: 80px; background-image: url('../../../img/project/cate_page_3.png'); background-size: 100% 100%; + .projectCateContent{ + background-color: #fff; + } .project_cate_home_part3_left{ padding: 40px; width:582px; @@ -104,7 +107,9 @@ background-size: 100% 100%; } .project_cate_home_part3_right{ - background-color: #FFFFFF; + background-image: url("../../../img/project/cate_4_c.png"); + background-position: 100% 0px; + background-size: 200% 100%; padding: 25px; } .cate_project_list_box{ @@ -126,6 +131,189 @@ } } + .project_cate_home_part4{ + padding-bottom: 80px; + background-image: url('../../../img/project/cate_page_4.png'); + background-size: 100% 100%; + .project_cate_home_part4_list{ + border-radius:15px; + padding:25px; + background-color: rgba(255, 255, 255, 0.16); + margin-top: 40px; + .cate_project_list_box{ + display: flex; + gap: 20px; + flex-wrap: wrap; + .cate-project-card{ + flex: 0 0 calc(33.7% - 20px); + background-color: #ffffff; + border-radius:15px; + padding:40px; + &:hover{ + background-image: url('../../../img/project/cate_page_card.png'); + background-size: 101% 100%; + background-position: -2px -2px; + } + } + } + } + } + + + .project_cate_home_part5{ + background: url('../../../img/project/ffbc.png') 100% 50% no-repeat; + background-position: top; + padding-top: 60px; + .cate_project_list_box{ + padding: 40px 0 80px; + >.cate-project-card{ + width: 30%; + margin-right: 20px; + background: url('../../../img/project/5_h_b.png') 98% 98% no-repeat; + color: #fff; + justify-content: flex-start; + padding:50px 80px 50px 45px; + background-size: 100% 100%; + .project-list-item-title{ + a{ + color: #fff; + } + } + .project-list-item-btn{ + width: 160px; + background: unset; + background-color: #fff!important; + color:#091221!important; + font-size:15px; + } + } + } + .newLeftMainCard{ + background: url('../../../img/project/cate_3_c.png') #fff no-repeat; + background-position: right; + background-repeat: no-repeat; + background-size: 120% 100%; + flex-wrap: wrap; + padding:15px; + border-radius: 12px; + flex: 1; + position: relative; + &::after{ + position: absolute; + content: ""; + left: 50%; + width:1px; + height:100%; + background:linear-gradient(270.06deg,rgba(231, 240, 255, 0.17) 0%,#e8f1ff 53.58%,rgba(231, 240, 255, 0.35) 97.98%); + top: 0; + } + .cate-project-card{ + width: 50%; + border-radius: 12px; + position: relative; + .project-list-item-title .icon-jiantou21.iconfont { + color: #091221; + } + &:hover{ + background-image: url('../../../img/project/project3.png'); + background-size: 100% 100%; + } + &:nth-child(1)::before,&:nth-child(2)::before{ + position: absolute; + content: ""; + left: -15px; + height:1px; + background:linear-gradient(270.06deg,rgba(231, 240, 255, 0.17) 0%,#e8f1ff 53.58%,rgba(231, 240, 255, 0.35) 97.98%); + bottom: 0; + right: 0; + } + &:nth-child(2)::before{ + right: -15px; + } + } + } + } + .project_cate_home_part6{ + background: url('../../../img/project/ffbc.png') 100% 50% no-repeat; + background-position: bottom; + padding-bottom: 80px; + padding-top: 70px; + background-size: 100% 100%; + .cate_project_list_box{ + flex-wrap: wrap; + margin-top: 40px; + .cateSixMain{ + background: url('../../../img/project/6_f_b.png') 100% 100% no-repeat; + padding:20px; + box-sizing: border-box; + width: 43.7%; + margin-bottom: 20px; + background-size: 100% 100%; + margin-right: 20px; + .cateSixMainBox{ + overflow: hidden; + } + img{ + transition: 0.5s; + } + &:hover{ + img{ + transform: scale(1.05); + } + } + } + .cate-project-card{ + width: calc(50% - 20px); + margin-right: 20px; + background-color: #fff; + margin-bottom: 20px; + &:hover{ + background: url('../../../img/project/6_h.png') -4px -2px no-repeat; + background-size: 102% 101%; + } + &:nth-child(2),&:nth-child(3){ + width: calc(27.5% - 20px); + } + } + } + } + + .project_cate_home_part7{ + padding:90px 0 80px; + background-image: url('../../../img/project/7_b.png'); + background-size: 100% 100%; + .toolCateHead{ + align-items: center; + background-image: url('../../../img/project/7_h_b.png'); + background-size: 100% 100%; + padding:0 60px; + height: 182px; + .toolCateFlex{ + flex: 1; + } + } + .cate_project_list_box{ + padding:40px 50px; + background: url('../../../img/project/7_l_b.png') -20px 17px #fff; + background-size: 103% 100%; + flex-wrap: wrap; + .cate-project-card{ + margin-right: 45px; + width: calc(33% - 30px); + &:nth-child(3n){ + margin-right: 0px; + } + .icon-jiantou21{ + color: #091221!important; + } + &:hover{ + background-image: url('../../../img/project/project3.png'); + background-size: 100% 100%; + } + } + } + } + .statistics-cards { width: 80%; margin: 25px auto; @@ -161,10 +349,6 @@ position: relative; &:hover { - .project-list-item-btn { - opacity: 1 !important; - bottom: 35px; - } .project-list-item-title { .icon-jiantou21 { top: 0px; @@ -174,7 +358,10 @@ } } } - + .in_b_desc{ + height: 30px; + line-height: 30px; + } .project-list-item-title .icon-jiantou21 { color: white; opacity: 0; @@ -199,18 +386,18 @@ } } .project-list-item-btn { - width: 90%; - position: absolute; - bottom: 0px; - background: #091221; + width: 100%; border-radius: 6px; - color: #ffffff; + color:#091221; text-align: center; - padding: 1px 0; - opacity: 0; - transition: all .3s ease; + height: 38px; + line-height: 38px; + margin-top: 35px; + background:linear-gradient(272.02deg,rgba(10, 145, 255, 0.12) 0.05%,rgba(43, 103, 238, 0.12) 55.23%,rgba(133, 110, 250, 0.12) 99.86%); &:hover { + background-color: #091221; + color: #fff; .iconfont { display: inline-block; animation: arrow-move 1.2s ease-in-out infinite; @@ -741,33 +928,39 @@ // 底部区域 .footer-section { - background: linear-gradient(135deg, #091221 0%, #1a2535 100%); - padding: 80px 0; - margin-top: 80px; + height: 300px; + display: flex; + flex-direction: column; + align-items: flex-start; + justify-content: center; + background-image: url('../../../img/project/footer.png'); + background-size: 100% 100%; .footer-content { .footer-title { font-size: 32px; font-weight: bold; color: #ffffff; - margin-bottom: 50px; + margin-bottom: 40px; } - .footer-action { - .submit-project-btn { - display: inline-block; - padding: 15px 50px; - background: linear-gradient(90deg, #1E6BFF 0%, #3B8DFF 100%); - color: #ffffff; - border-radius: 30px; - font-size: 18px; - font-weight: bold; - text-decoration: none; - transition: all 0.3s ease; + .submit-project-btn { + display: inline-flex; + justify-content: center; + width: 160px; + height: 44px; + line-height: 44px; + text-align: center; + background-color: #ffffff; + color:#091221; + border-radius: 8px; + font-size: 15px; + text-decoration: none; + transition: all 0.3s ease; - &:hover { - transform: translateY(-2px); - box-shadow: 0px 5px 15px rgba(30, 107, 255, 0.3); + &:hover { + .iconfont { + animation: arrow-move 1.2s ease-in-out infinite; } } } diff --git a/src/forge/Information/Pages/search/index.jsx b/src/forge/Information/Pages/search/index.jsx index e7beedc85..d45e05669 100644 --- a/src/forge/Information/Pages/search/index.jsx +++ b/src/forge/Information/Pages/search/index.jsx @@ -95,7 +95,7 @@ function SearchIndex(props){

- 立即查看 + 立即查看
: type==="resource" ?
{/* #资源聚合 */}

diff --git a/src/forge/Information/Pages/selfList.jsx b/src/forge/Information/Pages/selfList.jsx index 2337f3cfb..2312efd61 100644 --- a/src/forge/Information/Pages/selfList.jsx +++ b/src/forge/Information/Pages/selfList.jsx @@ -1,7 +1,7 @@ import React,{ useState, useEffect } from 'react'; import { Breadcrumb , Spin , Pagination , Modal, Button } from 'antd'; import { Link } from 'react-router-dom'; -import { getNewsMyList , getSourceMyList , delNewsMyList , delSourceMyList , getProjectMyList , removeProject , getManageProjectMyList , deleteMemberProject } from '../api'; +import { getNewsMyList , getSourceMyList , getSourceManage , delNewsMyList , delNews , delSourceMyList , delManageSource , getProjectMyList , removeProject , getManageProjectMyList , deleteMemberProject } from '../api'; import moment from 'moment'; import nodata from '../img/nodata.png'; import { tempEnum } from '../tempInfo'; @@ -86,22 +86,27 @@ function SelfList(props){ setIsSpin(false); } - function getSource(){ - getSourceMyList({ + async function getSource(){ + let result ={}; + let params = { auditStatus:status, zoneId:id, pageSize:limit, pageNum:page - }).then(result=>{ - let rows = result.data && result.data.rows; - if(rows && rows.length>0){ - setList(rows); - }else{ - setList([]); - } - setTotal(result.data.total); - setIsSpin(false); - }) + } + if(role && role.role === "Member"){ + result = await getSourceMyList(params) + }else{ + result = await getSourceManage(params) + } + let rows = result.data && result.data.rows; + if(rows && rows.length>0){ + setList(rows); + }else{ + setList([]); + } + setTotal(result.data.total); + setIsSpin(false); } function getNew(){ @@ -125,23 +130,25 @@ function SelfList(props){ setVisible(false); setDeleId(undefined); } - function sureFunc(){ - if(source){ - delSourceMyList(deleId).then(response=>{ + async function sureFunc(){ + if(source === "source"){ + const response =(role && role.role==="Member") ? await delSourceMyList(deleId) : await delManageSource(deleId); + if(response){ setVisible(false); props.showNotification("删除成功!"); getSource(); - }) + } }else{ - delNewsMyList(deleId).then(response=>{ + const response =(role && role.role==="Member") ? await delNewsMyList(deleId) : await delNews(deleId); + if(response){ setVisible(false); if(status ===1){ props.showNotification("提交成功!"); }else{ props.showNotification("删除成功!"); - getNew(); } - }) + getNew(); + } } } @@ -164,7 +171,7 @@ function SelfList(props){

-

确定删除该{source==="source"?"资源":source==="news"?"文章":"项目"}?

+

确定删除该{source==="source"?"资源":source==="news"?"资讯":"项目"}?

{(source || (!source && status === 1 && (data && data.docNeedAudit===1))) &&

{source?"删除后所有资源文件将被清除,请谨慎操作":"此操作将提交删除申请,管理员同意申请后该文章将被删除"}

}
@@ -183,7 +190,7 @@ function SelfList(props){ { source==="source"?sectionResourceTitle:source==="news"?sectionCmsTitle:sectionProjectTitle } - 我的{source==="source"?"资源":source==="news"?"文章":"项目"} + 我的{source==="source"?"资源":source==="news"?"资讯":"项目"}
  • setStatus(1)} className={status===1?"active":""}>已发布
  • @@ -216,7 +223,7 @@ function SelfList(props){
    {i.domainName || i.dirName} - { (i.domainName || i.dirName) && (i.timeAgo || i.createTime) && |} + {(i.domainName || i.dirName) && | } {i.timeAgo || moment(i.createTime).format("YYYY/MM/DD")} diff --git a/src/forge/Information/Pages/source.jsx b/src/forge/Information/Pages/source.jsx index 0a8fa4c81..d14042e06 100644 --- a/src/forge/Information/Pages/source.jsx +++ b/src/forge/Information/Pages/source.jsx @@ -97,14 +97,6 @@ function Source(props){ setPage(1); } - function addSource(){ - if(role && role.role === "Manager"){ - window.open(role.resourceManageUrl); - }else{ - history.push(`/zone/${deptId}/source/add`) - } - } - return(
    @@ -128,10 +120,10 @@ function Source(props){ enterButton={temp === "zone" ? 搜索 :undefined} />} {role && role.role !== "None" &&
    - {role.role === "Member" && } - + +
    }
    diff --git a/src/forge/Information/Pages/sourceCreate.jsx b/src/forge/Information/Pages/sourceCreate.jsx index 729191de9..7bda40baa 100644 --- a/src/forge/Information/Pages/sourceCreate.jsx +++ b/src/forge/Information/Pages/sourceCreate.jsx @@ -3,7 +3,7 @@ import { Breadcrumb, Button, Form, Icon, Input, message, Select, Upload } from ' import { getZoneUrl } from 'educoder'; import '../index.scss'; import { Link } from 'react-router-dom'; -import { getTypeByFileId, getSourceZoneList, addResource, getSourceDetailByAu , getSourceDetailByM , updateMyResource , updateManageResource } from '../api'; +import { getTypeByFileId, getSourceZoneList, addResource , addManageResource, getSourceDetailByAu , getSourceDetailByM , updateMyResource , updateManageResource } from '../api'; function SourceCreate(props){ const {history, id, role, current_user} = props; @@ -111,15 +111,14 @@ function SourceCreate(props){ } return; } - addResource(params).then((res)=>{ - const {data:{code, msg, data}} = res; - if(code === 200){ - message.success("提交成功"); - history.push(`/zone/${deptId}/source/${data.id}`); - }else{ - message.error(msg || '提交失败,请联系管理员!') - } - }) + let res = (role && role.role === "Member") ? await addResource(params) : await addManageResource(params); + const {data:{code, msg, data}} = res; + if(code === 200){ + message.success("提交成功"); + history.push(`/zone/${deptId}/source/${data.id}`); + }else{ + message.error(msg || '提交失败,请联系管理员!') + } }) } diff --git a/src/forge/Information/api.js b/src/forge/Information/api.js index f761ea6d8..ea68a9b33 100644 --- a/src/forge/Information/api.js +++ b/src/forge/Information/api.js @@ -225,6 +225,14 @@ export function addResource(data) { data: data }); } +// 保存资源(管理员) +export function addManageResource(data){ + return fetch({ + url: `/zone/resource`, + method: 'post', + data: data + }); +} export function getSourceTypeList(id){ return fetch({ url:`/zone/open/${id}/resourceType/list`, @@ -339,7 +347,14 @@ export function updateDoc(id, data) { data: data }); } - +// 获取待审核、已通过、未通过资源列表 +export function getSourceManage(params){ + return fetch({ + url:`/zone/resource/list`, + method: 'get', + params + }) +} // 获取资源详细信息(需要用户权限) export function getSourceDetailByAu(id){ return fetch({ diff --git a/src/forge/Information/fetch.js b/src/forge/Information/fetch.js index dd148bf97..5cddf0d4c 100644 --- a/src/forge/Information/fetch.js +++ b/src/forge/Information/fetch.js @@ -14,8 +14,8 @@ function beforeFetch(actionUrl){ const service = axios.create(config); service.interceptors.request.use(request => { - let deptId = sessionStorage.getItem('deptId') - // request.headers.Authorization = '752c217562d13940a37e20d2f48c186e5bc56323' + let deptId = sessionStorage.getItem('deptId'); + // request.headers.Authorization = 'c2361e926a027ef8f6beeca3bc03daf905b5685e' if (deptId) { // 用于权限区分 request.headers['Dept-Id'] = deptId diff --git a/src/forge/Information/img/project/5_h_b.png b/src/forge/Information/img/project/5_h_b.png new file mode 100644 index 000000000..254063294 Binary files /dev/null and b/src/forge/Information/img/project/5_h_b.png differ diff --git a/src/forge/Information/img/project/6_f_b.png b/src/forge/Information/img/project/6_f_b.png new file mode 100644 index 000000000..94e055bf8 Binary files /dev/null and b/src/forge/Information/img/project/6_f_b.png differ diff --git a/src/forge/Information/img/project/6_f_m.png b/src/forge/Information/img/project/6_f_m.png new file mode 100644 index 000000000..6c3427211 Binary files /dev/null and b/src/forge/Information/img/project/6_f_m.png differ diff --git a/src/forge/Information/img/project/6_h.png b/src/forge/Information/img/project/6_h.png new file mode 100644 index 000000000..8d42fedd2 Binary files /dev/null and b/src/forge/Information/img/project/6_h.png differ diff --git a/src/forge/Information/img/project/7_b.png b/src/forge/Information/img/project/7_b.png new file mode 100644 index 000000000..9ff6b2dbe Binary files /dev/null and b/src/forge/Information/img/project/7_b.png differ diff --git a/src/forge/Information/img/project/7_h_b.png b/src/forge/Information/img/project/7_h_b.png new file mode 100644 index 000000000..eb5f51fdb Binary files /dev/null and b/src/forge/Information/img/project/7_h_b.png differ diff --git a/src/forge/Information/img/project/7_l_b.png b/src/forge/Information/img/project/7_l_b.png new file mode 100644 index 000000000..0b0b58e25 Binary files /dev/null and b/src/forge/Information/img/project/7_l_b.png differ diff --git a/src/forge/Information/img/project/cate_3_c.png b/src/forge/Information/img/project/cate_3_c.png new file mode 100644 index 000000000..1fc5b62df Binary files /dev/null and b/src/forge/Information/img/project/cate_3_c.png differ diff --git a/src/forge/Information/img/project/cate_4_c.png b/src/forge/Information/img/project/cate_4_c.png new file mode 100644 index 000000000..fc9e7381d Binary files /dev/null and b/src/forge/Information/img/project/cate_4_c.png differ diff --git a/src/forge/Information/img/project/cate_page_4.png b/src/forge/Information/img/project/cate_page_4.png new file mode 100644 index 000000000..0909b8260 Binary files /dev/null and b/src/forge/Information/img/project/cate_page_4.png differ diff --git a/src/forge/Information/img/project/cate_page_card.png b/src/forge/Information/img/project/cate_page_card.png new file mode 100644 index 000000000..6d0cb4b4b Binary files /dev/null and b/src/forge/Information/img/project/cate_page_card.png differ diff --git a/src/forge/Information/img/project/ffbc.png b/src/forge/Information/img/project/ffbc.png new file mode 100644 index 000000000..f89451c67 Binary files /dev/null and b/src/forge/Information/img/project/ffbc.png differ diff --git a/src/forge/Information/img/project/footer.png b/src/forge/Information/img/project/footer.png new file mode 100644 index 000000000..32736e964 Binary files /dev/null and b/src/forge/Information/img/project/footer.png differ diff --git a/src/forge/Information/index.jsx b/src/forge/Information/index.jsx index e5024f5c2..99b5d8d96 100644 --- a/src/forge/Information/index.jsx +++ b/src/forge/Information/index.jsx @@ -175,6 +175,8 @@ function Index(props){ } setData(data); document.title= data && data.mainTitle; + // 存储deptId,所有专区接口header带上 + sessionStorage.setItem('deptId', data.deptId) if(data && data.id){ setId(data.id); @@ -182,8 +184,6 @@ function Index(props){ getRole(data.id) } configShareForCustom(data.mainTitle, data.subTitle, data.introductionImage) - // 存储deptId,所有专区接口header带上 - sessionStorage.setItem('deptId', data.deptId) setSeoMeta(`${data.name},`, data.name, data.subTitle, `/zone/${deptId}`) } }).catch(console.error()) @@ -203,6 +203,7 @@ function Index(props){ if(current_user && current_user.login){ getCurrentRole(id).then(res=>{ setRole(res.data.data); + sessionStorage.setItem('deptId', res.data.data.deptId); }).catch(error=>{}) } }