module-menu 0.2.38 → 0.2.39

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.39",
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{
@@ -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;