Commit 6c0a598a authored by yzl's avatar yzl

- 优化新产品导航图界面

parent a6be700e
Pipeline #60113 passed with stages
...@@ -35,6 +35,7 @@ import { ...@@ -35,6 +35,7 @@ import {
store, store,
event event
} from '@wisdom-utils/utils'; } from '@wisdom-utils/utils';
import { Storeage as Store } from '@wisdom-utils/utils/lib/helpers';
import { waterMark } from '../utils/mark'; import { waterMark } from '../utils/mark';
import layoutStyles from './BasicLayout.less'; import layoutStyles from './BasicLayout.less';
...@@ -246,6 +247,8 @@ const transformFloatMenu = (routes, homepage) => { ...@@ -246,6 +247,8 @@ const transformFloatMenu = (routes, homepage) => {
}; };
const Layout = (props) => { const Layout = (props) => {
const currentProduct = new Store(`__global__recent_productIndex__micro_${window.location.hostname}`);
const menuState = sessionStorage.getItem('menuState') || 'open';
const [cityData, setCityData] = useState({}); const [cityData, setCityData] = useState({});
const [siteLoading, setSiteLoading] = useState(false); const [siteLoading, setSiteLoading] = useState(false);
const [siteAction, setSiteAction] = useState(() => new Site(props, setSiteLoading)); const [siteAction, setSiteAction] = useState(() => new Site(props, setSiteLoading));
...@@ -410,7 +413,7 @@ const Layout = (props) => { ...@@ -410,7 +413,7 @@ const Layout = (props) => {
// onLoadingChange: (loading) => setMenuLoading(loading) // onLoadingChange: (loading) => setMenuLoading(loading)
}} }}
logo={logo} logo={logo}
topMenuActiveKey={props.currentMenuIndex < 0 ? 0 : props.currentMenuIndex} topMenuActiveKey={currentProduct.get('currentMenuIndex') || 0}
rightContentRender={() => <RightContent />} rightContentRender={() => <RightContent />}
onPageChange={() => { onPageChange={() => {
// if(!props.global.token) { // if(!props.global.token) {
......
...@@ -2,17 +2,11 @@ import React from 'react'; ...@@ -2,17 +2,11 @@ import React from 'react';
import classnames from 'classnames'; import classnames from 'classnames';
import styles from './index.less'; import styles from './index.less';
import cover from './images/default.png'; import cover from './images/default.png';
import tagHot from './images/hot.png';
import tagNew from './images/new.png';
import desc from './images/副标题.png'; import { chunk } from 'lodash-es';
import descActive from './images/副标题_active.png';
const assetPath = `${window.location.origin}/PandaWorkFlow/WorkFlow/AccountManage/DownloadFiles`; const assetPath = `${window.location.origin}/PandaWorkFlow/WorkFlow/AccountManage/DownloadFiles`;
const tags = {
'New': tagNew,
'Hot': tagHot,
}
const Card = ({onCardClick, ...props}) => { const Card = ({onCardClick, ...props}) => {
const { config } = props; const { config } = props;
...@@ -24,8 +18,6 @@ const Card = ({onCardClick, ...props}) => { ...@@ -24,8 +18,6 @@ const Card = ({onCardClick, ...props}) => {
config['系统特点'] = config['系统特点'] + ','; 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'])}>
...@@ -54,15 +46,21 @@ const Card = ({onCardClick, ...props}) => { ...@@ -54,15 +46,21 @@ const Card = ({onCardClick, ...props}) => {
<div className={classnames(styles['card-tags'])}> <div className={classnames(styles['card-tags'])}>
<div className={classnames(styles['card-list'])}> <div className={classnames(styles['card-list'])}>
{ {
config && config['系统特点'] && config['系统特点'].split(',').map((item, index) => { config && config['系统特点'] && chunk(config['系统特点'].split(',') , 2).map((item, index) => {
return <div className={classnames(styles['card-tag'])} return <div key={index} className={classnames(styles['card-list-content'])}>
style={{ {
height: config['系统特点'].split(',').length <= 6 ? 44 : 40, item.map((child, key) => {
lineHeight: config['系统特点'].split(',').length <= 6 ? '44px' : '40px', return <div className={classnames(styles['card-tag'])}
marginTop: config['系统特点'].split(',').length <= 8 ? 10 : 0 style={{
}} key={index}> height: config['系统特点'].split(',').length <= 6 ? 44 : 40,
<i className={classnames(styles['card-tag-icon'])} /> lineHeight: config['系统特点'].split(',').length <= 6 ? '44px' : '40px',
{item} marginTop: config['系统特点'].split(',').length <= 8 ? 10 : 0
}} key={key + index}>
<i className={classnames(styles['card-tag-icon'])} />
{child}
</div>
})
}
</div> </div>
}) })
} }
......
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
left: 4%; left: 4%;
font-size: 1.5rem; font-size: 1.5rem;
font-weight: 400; font-weight: 400;
color: #000000; color: #262626;
font-family: "zihun"; font-family: "zihun";
} }
.back { .back {
...@@ -229,6 +229,10 @@ ...@@ -229,6 +229,10 @@
background-image: url(./images/副标题_active.png); background-image: url(./images/副标题_active.png);
color: #000000; color: #000000;
} }
.card-title{
color: #000;
}
} }
.card-content{ .card-content{
...@@ -262,29 +266,42 @@ ...@@ -262,29 +266,42 @@
.card-list { .card-list {
&::after{ .card-list-content {
content: ""; border-bottom: 1px solid #2781A8;
display: block;
clear: both; &::after{
} content: "";
display: block;
clear: both;
}
&:last-child {
border-bottom: none;
}
.card-tag{ .card-tag{
float: left; float: left;
width: 50%; width: 50%;
height: 35px; height: 35px;
line-height: 35px; line-height: 35px;
font-size: 0.88rem; font-size: 0.88rem;
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
.card-tag-icon { .card-tag-icon {
display: inline-block; display: inline-block;
margin-right: .5rem; margin-right: .5rem;
width: 5px; width: 5px;
height: 5px; height: 5px;
background: #E1F4FD; background: #E1F4FD;
opacity: 0.53 opacity: 0.53;
-webkit-transform:rotate(45deg) ; //Webkit / Safari / Chrome
-moz-transform:rotate(45deg) ; //Firefox
-ms-transform:rotate(45deg) ; //Internet Explorer
-o-transform:rotate(45deg) ; //Opera
transform:rotate(45deg) ;
}
} }
} }
} }
......
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