|
@@ -34,21 +34,9 @@ const footerRender = (_, defaultDom) => {
|
34
|
34
|
};
|
35
|
35
|
|
36
|
36
|
const menuHeaderRender = (logo, title) => {
|
37
|
|
- const [logoInfo, setLogoInfo] = useState([]);
|
38
|
|
-
|
39
|
|
- useEffect(() => {
|
40
|
|
- getLogoInfo();
|
41
|
|
- })
|
42
|
|
-
|
43
|
|
- const getLogoInfo = e => {
|
44
|
|
- request({ ...apis.image.logo }).then(data => {
|
45
|
|
- setLogoInfo(data.channelImg)
|
46
|
|
- })
|
47
|
|
- }
|
48
|
|
-
|
49
|
37
|
return (
|
50
|
38
|
<Link to="/">
|
51
|
|
- <img src={logoInfo}/>
|
|
39
|
+ {logo}
|
52
|
40
|
{title}
|
53
|
41
|
</Link>
|
54
|
42
|
);
|
|
@@ -56,6 +44,7 @@ const menuHeaderRender = (logo, title) => {
|
56
|
44
|
|
57
|
45
|
const BasicLayout = props => {
|
58
|
46
|
const { dispatch, children, settings } = props;
|
|
47
|
+ const [logoInfo, setLogoInfo] = useState(logo);
|
59
|
48
|
/**
|
60
|
49
|
* constructor
|
61
|
50
|
*/
|
|
@@ -69,12 +58,11 @@ const BasicLayout = props => {
|
69
|
58
|
type: 'settings/getSetting',
|
70
|
59
|
});
|
71
|
60
|
}
|
72
|
|
- }, []);
|
73
|
|
- /**
|
74
|
|
- * init variables
|
75
|
|
- */
|
76
|
61
|
|
77
|
|
-
|
|
62
|
+ request({ ...apis.image.logo }).then(data => {
|
|
63
|
+ setLogoInfo(data.channelImg)
|
|
64
|
+ })
|
|
65
|
+ }, []);
|
78
|
66
|
|
79
|
67
|
|
80
|
68
|
const handleMenuCollapse = payload => {
|
|
@@ -88,7 +76,7 @@ const BasicLayout = props => {
|
88
|
76
|
|
89
|
77
|
return (
|
90
|
78
|
<ProLayout
|
91
|
|
- logo={logo}
|
|
79
|
+ logo={logoInfo}
|
92
|
80
|
onCollapse={handleMenuCollapse}
|
93
|
81
|
menuItemRender={(menuItemProps, defaultDom) => {
|
94
|
82
|
if (menuItemProps.isUrl) {
|