问题修复
This commit is contained in:
parent
ae0b77258f
commit
e6c26ca320
|
|
@ -72,7 +72,7 @@ function HeaderPage(props){
|
|||
}
|
||||
{
|
||||
// 新闻动态
|
||||
data && data.cmsShow && newsList && newsList.length>0 &&
|
||||
data && data.cmsShow === 1 && newsList && newsList.length>0 &&
|
||||
<div className="zone_news">
|
||||
<p className="in_title mb40">{ data.homepageCmsTitle }</p>
|
||||
<div className="boxmain" style={{display:"flex"}}>
|
||||
|
|
@ -112,7 +112,7 @@ function HeaderPage(props){
|
|||
}
|
||||
{
|
||||
// 精选项目
|
||||
data && data.projectShow &&
|
||||
data && data.projectShow === 1 &&
|
||||
<div className="zone_projects">
|
||||
<p className="in_title mb40">{ data.homepageProjectTitle }</p>
|
||||
{
|
||||
|
|
@ -137,7 +137,7 @@ function HeaderPage(props){
|
|||
}
|
||||
{
|
||||
// 核心贡献者
|
||||
data && data.memberShow &&
|
||||
data && data.memberShow === 1 &&
|
||||
<div className="zone_contributor">
|
||||
<p className="in_title">{ data.homepageMemberTitle }</p>
|
||||
{
|
||||
|
|
@ -162,7 +162,7 @@ function HeaderPage(props){
|
|||
|
||||
{
|
||||
// 合作伙伴
|
||||
data && data.partnersShow &&
|
||||
data && data.partnersShow === 1 &&
|
||||
<div className="zone_parter">
|
||||
<p className="in_title">{ data.homepagePartnersTitle }</p>
|
||||
<Partner id={ id }></Partner>
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ function HeaderPage(props){
|
|||
</div>
|
||||
{
|
||||
// 新闻动态
|
||||
data && data.cmsShow && newsList && newsList.length>0 &&
|
||||
data && data.cmsShow === 1 && newsList && newsList.length>0 &&
|
||||
<div className="zone_news">
|
||||
<div className="boxmain" style={{display:"flex"}}>
|
||||
<p className="news_title">{ data.homepageCmsTitle }</p>
|
||||
|
|
@ -179,7 +179,7 @@ function HeaderPage(props){
|
|||
}
|
||||
{
|
||||
// 精选项目
|
||||
data && data.projectShow &&
|
||||
data && data.projectShow === 1 && projectList && projectList.length > 0 &&
|
||||
<div className="zone_projects pt50 pb30">
|
||||
<p className="in_title mb40">{ data.homepageProjectTitle }</p>
|
||||
<Projects projectList={projectList}></Projects>
|
||||
|
|
@ -187,7 +187,7 @@ function HeaderPage(props){
|
|||
}
|
||||
{
|
||||
// 核心贡献者
|
||||
data && data.memberShow &&
|
||||
data && data.memberShow === 1 && personList && personList.length > 0 &&
|
||||
<div className="zone_contributor">
|
||||
<p className="in_title">{ data.homepageMemberTitle }</p>
|
||||
<Contributor personList={personList}></Contributor>
|
||||
|
|
@ -262,7 +262,7 @@ function HeaderPage(props){
|
|||
</div>
|
||||
{
|
||||
// 合作伙伴
|
||||
data && data.partnersShow &&
|
||||
data && data.partnersShow === 1 &&
|
||||
<div className="zone_parter">
|
||||
<p className="in_title">{ data.homepagePartnersTitle }</p>
|
||||
<Partner id={ id }></Partner>
|
||||
|
|
|
|||
|
|
@ -2,10 +2,11 @@
|
|||
import fetch from './fetch';
|
||||
|
||||
/**入口页接口***/
|
||||
export function getMainInfos(deptId) {
|
||||
export function getMainInfos(deptId, params) {
|
||||
return fetch({
|
||||
url: `/zone/open/zoneName/${deptId}`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
import React ,{ useEffect , useState } from "react";
|
||||
|
||||
import { Route, Switch, useLocation } from "react-router-dom";
|
||||
import { Route, Switch } from "react-router-dom";
|
||||
import { withRouter } from "react-router";
|
||||
import { httpUrl } from './fetch';
|
||||
|
||||
import { SnackbarHOC } from "educoder";
|
||||
import { CNotificationHOC } from "../../modules/courses/common/CNotificationHOC";
|
||||
import { TPMIndexHOC } from "../../modules/tpm/TPMIndexHOC";
|
||||
import Loadable from "react-loadable";
|
||||
import Loading from "../../Loading";
|
||||
import axios from 'axios';
|
||||
import { getMainInfos , getCheckZoneRole } from './api';
|
||||
import PublicBanner from "./Component/publicBanner";
|
||||
import './index.scss';
|
||||
import "slick-carousel/slick/slick.css";
|
||||
|
|
@ -66,16 +65,13 @@ function Index(props){
|
|||
setTheme()
|
||||
|
||||
function getDetail(){
|
||||
const url = `${httpUrl}/zone/open/zoneName/${deptId}`;
|
||||
axios.get(url, {params:{
|
||||
template: temp
|
||||
}}).then(result=>{
|
||||
getMainInfos(deptId, { template: temp }).then(result=>{
|
||||
if(result){
|
||||
if (result.data.code === 404) {
|
||||
if (result.code === 404) {
|
||||
props.history.push('/nopage');
|
||||
return
|
||||
}
|
||||
let data = result.data.data;
|
||||
let data = result.data;
|
||||
setData(data);
|
||||
document.title= data&& data.name;
|
||||
setId(data.id);
|
||||
|
|
@ -87,12 +83,8 @@ function Index(props){
|
|||
}
|
||||
|
||||
function getAdminUrl(id){
|
||||
const url = `${httpUrl}/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){
|
||||
getCheckZoneRole(id).then(response=>{
|
||||
if(response && response.data && response.data.data){
|
||||
setAdminUrl(response.data.data);
|
||||
}else{
|
||||
setAdminUrl(undefined);
|
||||
|
|
|
|||
|
|
@ -536,7 +536,7 @@
|
|||
position: absolute;
|
||||
z-index: 10;
|
||||
background-image: -webkit-linear-gradient(0deg,#fffcf9 0%,#ffffff 51.47%,#fed5a6 100%);
|
||||
background-clip: text;
|
||||
-webkit-background-clip: text;
|
||||
-webkit-text-fill-color: transparent;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue