Commit dc3f231d authored by yzl's avatar yzl

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

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