|
@@ -4,15 +4,17 @@
|
4
|
4
|
* https://github.com/ant-design/ant-design-pro-layout
|
5
|
5
|
*/
|
6
|
6
|
import ProLayout from '@ant-design/pro-layout';
|
7
|
|
-import React, { useEffect } from 'react';
|
|
7
|
+import React, { useState, useEffect } from 'react';
|
8
|
8
|
import Link from 'umi/link';
|
9
|
9
|
import { connect } from 'dva';
|
|
10
|
+import request from '../utils/request'
|
10
|
11
|
import { formatMessage } from 'umi-plugin-react/locale';
|
11
|
12
|
import Authorized from '@/utils/Authorized';
|
12
|
13
|
import RightContent from '@/components/GlobalHeader/RightContent';
|
13
|
14
|
import { isAntDesignPro } from '@/utils/utils';
|
14
|
15
|
// import logo from '../assets/logo.svg';
|
15
|
16
|
import logo from '../assets/logo.png';
|
|
17
|
+import apis from '../services/apis'
|
16
|
18
|
|
17
|
19
|
/**
|
18
|
20
|
* use Authorized check all menu item
|
|
@@ -24,29 +26,6 @@ const menuDataRender = menuList =>
|
24
|
26
|
});
|
25
|
27
|
|
26
|
28
|
const footerRender = (_, defaultDom) => {
|
27
|
|
- // if (!isAntDesignPro()) {
|
28
|
|
- // return defaultDom;
|
29
|
|
- // }
|
30
|
|
-
|
31
|
|
- // return (
|
32
|
|
- // <>
|
33
|
|
- // {defaultDom}
|
34
|
|
- // <div
|
35
|
|
- // style={{
|
36
|
|
- // padding: '0px 24px 24px',
|
37
|
|
- // textAlign: 'center',
|
38
|
|
- // }}
|
39
|
|
- // >
|
40
|
|
- // <a href="https://www.netlify.com" target="_blank" rel="noopener noreferrer">
|
41
|
|
- // <img
|
42
|
|
- // src="https://www.netlify.com/img/global/badges/netlify-color-bg.svg"
|
43
|
|
- // width="82px"
|
44
|
|
- // alt="netlify logo"
|
45
|
|
- // />
|
46
|
|
- // </a>
|
47
|
|
- // </div>
|
48
|
|
- // </>
|
49
|
|
- // );
|
50
|
29
|
return (
|
51
|
30
|
<footer className="ant-pro-global-footer">
|
52
|
31
|
<div className="ant-pro-global-footer-copyright">Copyright @ 营销云</div>
|
|
@@ -55,9 +34,21 @@ const footerRender = (_, defaultDom) => {
|
55
|
34
|
};
|
56
|
35
|
|
57
|
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
|
+
|
58
|
49
|
return (
|
59
|
50
|
<Link to="/">
|
60
|
|
- {logo}
|
|
51
|
+ <img src={logoInfo}/>
|
61
|
52
|
{title}
|
62
|
53
|
</Link>
|
63
|
54
|
);
|
|
@@ -83,6 +74,9 @@ const BasicLayout = props => {
|
83
|
74
|
* init variables
|
84
|
75
|
*/
|
85
|
76
|
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
86
|
80
|
const handleMenuCollapse = payload => {
|
87
|
81
|
if (dispatch) {
|
88
|
82
|
dispatch({
|