module-menu 0.2.38 → 0.2.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "module-menu",
3
- "version": "0.2.38",
3
+ "version": "0.2.40",
4
4
  "description": "城市大数据平台公共头部及尾部",
5
5
  "main": "src/pages/index.jsx",
6
6
  "scripts": {
@@ -33,27 +33,9 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
33
33
  {},
34
34
  )
35
35
  .then((res) => {
36
- const resD = JSON.parse(localStorage.getItem('moduleRoutes'))
37
- let menuGet =
38
- (resD?.map((item) => {
39
- return {
40
- ...item,
41
- path:
42
- item.path.indexOf('/') !== -1
43
- ? item.path
44
- : '/' + item.path,
45
- };
46
- })) ||
47
- [];
48
- console.log('menuGet', menuGet)
49
- setSessionMenu(menuGet);
50
- const menuLists = getNewMenuList(menuGet);
51
- setMenuList(menuLists);
52
-
53
- // if (res.data.code === 0) {
36
+ // const resD = JSON.parse(localStorage.getItem('moduleRoutes'))
54
37
  // let menuGet =
55
- // (res.data.data &&
56
- // res.data.data[0]?.routes?.map((item) => {
38
+ // (resD?.map((item) => {
57
39
  // return {
58
40
  // ...item,
59
41
  // path:
@@ -67,7 +49,25 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
67
49
  // setSessionMenu(menuGet);
68
50
  // const menuLists = getNewMenuList(menuGet);
69
51
  // setMenuList(menuLists);
70
- // }
52
+
53
+ if (res.data.code === 0) {
54
+ let menuGet =
55
+ (res.data.data &&
56
+ res.data.data[0]?.routes?.map((item) => {
57
+ return {
58
+ ...item,
59
+ path:
60
+ item.path.indexOf('/') !== -1
61
+ ? item.path
62
+ : '/' + item.path,
63
+ };
64
+ })) ||
65
+ [];
66
+ console.log('menuGet', menuGet)
67
+ setSessionMenu(menuGet);
68
+ const menuLists = getNewMenuList(menuGet);
69
+ setMenuList(menuLists);
70
+ }
71
71
  })
72
72
  .catch((e) => console.log('e', e));
73
73
  }else{
@@ -323,13 +323,15 @@ const ModuleMenu = ({ sysName, stash = '' }) => {
323
323
  className={cn(stash !== 'LNRD'? 'menuIcon_size':'menuIcon_size_LNRD', 'menuIcon')}
324
324
  onMouseOver={() => setshowMenuList(true)}
325
325
  style={{
326
- backgroundImage: `url(${menuIconSrc})`,
326
+ // backgroundImage: `url(${menuIconSrc})`,
327
327
  backgroundRepeat: 'no-repeat',
328
328
  backgroundSize: '50%',
329
329
  backgroundPosition: 'center',
330
330
  backgroundColor: stash !== 'LNRD'? '#4091F7':'#EA1A1A'
331
331
  }}
332
- ></div>
332
+ >
333
+ <img src={menuIconSrc} className={cn(stash !== 'LNRD'? null:'menuIcon_img')}></img>
334
+ </div>
333
335
  <div className={cn(stash !== 'LNRD'? 'menu_title_content_size':'menu_title_content_size_LNRD', 'menu_title_content')}
334
336
 
335
337
  >
@@ -58,7 +58,7 @@
58
58
  :global(.right-select_LNRD> .ant-select-arrow>.anticon) {
59
59
  color: #FFFFFF !important;
60
60
  }
61
- .right-select_LNRD > .ant-select{
61
+ .right-select_LNRD .ant-select-selection-item{
62
62
  color: #FFFFFF !important;
63
63
  }
64
64
 
@@ -2,4 +2,4 @@ import ModuleMenu from './ModuleMenu';
2
2
  import ModuleUser from './ModuleUser';
3
3
  import Footer from './Footer';
4
4
  export { ModuleMenu, ModuleUser, Footer };
5
- // export default ModuleMenu;
5
+ // export default ModuleUser;