Commit dc3f231d authored by yzl's avatar yzl

- 修复菜单无数据加载问题

- 优化新产品导航图界面
parent 6b1448c9
......@@ -410,7 +410,7 @@ const Layout = (props) => {
// onLoadingChange: (loading) => setMenuLoading(loading)
}}
logo={logo}
topMenuActiveKey={props.currentMenuIndex}
topMenuActiveKey={props.currentMenuIndex < 0 ? 0 : props.currentMenuIndex}
rightContentRender={() => <RightContent />}
onPageChange={() => {
// if(!props.global.token) {
......
......@@ -60,7 +60,8 @@ const BootPage = props => {
setPercentNum(100);
setTimeout(() => {
window.history.pushState('', null, `/cloud/introduction/newproducts`);
props.history.push('/cloud/introduction/newproducts');
// window.history.pushState('', null, `/cloud/introduction/newproducts`);
}, 500);
});
......
......@@ -16,6 +16,14 @@ const tags = {
const Card = ({onCardClick, ...props}) => {
const { config } = props;
if(config['副标题'].indexOf('\\n') === -1){
config['副标题'] = config['副标题'] + '\\n';
}
if(config['系统特点'].indexOf(',') === -1){
config['系统特点'] = config['系统特点'] + ',';
}
return (
<div className={styles.card} onClick={e => onCardClick(e, props)}>
<div className={classnames(styles['card-title'], styles['nowrap-text'])}>
......@@ -34,17 +42,31 @@ const Card = ({onCardClick, ...props}) => {
}
</div>
<div className={classnames(styles['card-info'])}>
<div className={classnames(styles['card-desc'], styles.default)}><span>{config && config['副标题']}</span></div>
<div className={classnames(styles['card-tags'])}>
<div className={classnames(styles['card-desc'])}>
{
config && config['系统特点'] && config['系统特点'].split(',').map((item, index) => {
return <div className={classnames(styles['card-tag'])} key={index}>
<i className={classnames(styles['card-tag-icon'])} />
{item}
</div>
})
config && config['副标题'] && config && config['副标题'].split("\\n").map((item, index) => {
return <div key={index}>{item}</div>
})
}
</div>
<div className={classnames(styles['card-tags'])}>
<div className={classnames(styles['card-list'])}>
{
config && config['系统特点'] && config['系统特点'].split(',').map((item, index) => {
return <div className={classnames(styles['card-tag'])}
style={{
height: config['系统特点'].split(',').length <= 6 ? 44 : 36,
lineHeight: config['系统特点'].split(',').length <= 6 ? '44px' : '36px',
marginTop: config['系统特点'].split(',').length <= 8 ? 10 : 0
}} key={index}>
<i className={classnames(styles['card-tag-icon'])} />
{item}
</div>
})
}
</div>
</div>
</div>
</div>
</div>
......
......@@ -31,6 +31,7 @@ const NewProducts = props => {
const [time, setTime] = useState(moment().format('YYYY-MM-DD HH:mm:ss'))
const ref = useRef();
// 计时器
useEffect(() => {
setInterval(() => {
setTime(moment().format('YYYY-MM-DD HH:mm:ss'))
......@@ -152,7 +153,9 @@ const NewProducts = props => {
<div className={classnames(styles['page-time'])}>
<span>{time}</span>
<img src={icon} onClick={() => {
window.history.pushState('', null, `/industry`);
window.history.go(-1);
// window.history.pushState('', null, `/industry`);
// props.history.push(`/industry`);
}} className={classnames(styles.pageIcon)} alt='退出' />
</div>
......
......@@ -23,7 +23,7 @@
position: relative;
overflow: hidden;
background-position: center;
background-size: 100% 100%;
background-size: cover;
background-repeat: no-repeat;
background-image: url('./images/bg.png');
font-size: 20px;
......@@ -46,7 +46,7 @@
text-shadow: 0 11px 15px rgba(0, 18, 44, 0.48);
text-align: center;
background-image: url('./images/标题.png');
background-size: cover;
background-size: 100% 100%;
background-repeat: no-repeat;
font-family: "zihun";
}
......@@ -141,17 +141,17 @@
flex-wrap: wrap;
gap: 1em;
margin: 0 auto;
width: 40em;
width: 42em;
&[num="2"],
&[num="4"] {
width: (40em * 2 + 1em);
width: (42em * 2 + 1em);
}
&[num="3"],
&[num="5"],
&[num="6"] {
width: (40em * 3 + 2em);
width: (42em * 3 + 2em);
}
&[num="1"],
......@@ -169,13 +169,13 @@
width: 49%;
height: 24rem;
background-image: url('./images/框.png');
background-size: contain;
background-size: cover;
background-position: center;
.card-title {
position: relative;
margin-top: 0.75rem;
left: 5%;
margin-top: 0.5rem;
left: 3%;
font-size: 1.5rem;
font-weight: 400;
color: #000000;
......@@ -201,11 +201,13 @@
}
.card-desc{
display: flex;
padding: 1rem;
text-align: center;
//display: flex;
font-size: 1rem;
background-position-x: -.5rem;
align-items: center;
justify-content: center;
//align-items: center;
//justify-content: center;
height: 5rem;
padding-left: 0.5rem;
padding-right: 0.5rem;
......@@ -231,9 +233,8 @@
}
.card-content{
position: relative;
left: 1rem;
padding: 1rem;
padding: 1rem 1rem 1rem 1.8rem;
&::after{
content: "";
......@@ -244,12 +245,9 @@
.card-img {
position: relative;
float: left;
width: 60%;
height: 17.5rem;
img{
width: 100%;
height: 100%;
height: 17.5rem;
}
}
......@@ -259,25 +257,36 @@
}
.card-tags {
padding: 0.5rem 1rem;
.card-tag{
float: left;
width: 50%;
height: 35px;
line-height: 35px;
font-size: 0.88rem;
font-family: Microsoft YaHei;
font-weight: 400;
color: #FFFFFF;
.card-tag-icon {
display: inline-block;
margin-right: .5rem;
width: 5px;
height: 5px;
background: #E1F4FD;
opacity: 0.53
position: relative;
padding: 0 1rem;
height: 12rem;
.card-list {
&::after{
content: "";
display: block;
clear: both;
}
.card-tag{
float: left;
width: 50%;
height: 35px;
line-height: 35px;
font-size: 0.88rem;
font-family: Microsoft YaHei;
font-weight: 400;
color: #FFFFFF;
.card-tag-icon {
display: inline-block;
margin-right: .5rem;
width: 5px;
height: 5px;
background: #E1F4FD;
opacity: 0.53
}
}
}
}
......@@ -306,6 +315,18 @@
height: 21rem;
}
.card-content{
.card-img {
img{
height: 9rem !important;
}
}
}
.card-info {
width: 50% !important;
}
.panel {
font-size: 14px;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment