module-menu 0.2.37 → 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 +1 -1
- package/src/.umi/.cache/babel-loader/0373a5643899ba8332f46d5b310d4095.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/2263d16027a39c738899b682762b634a.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/25c2db5524b548644eafcd31e1f6baf9.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/7ae4287997aac2394b3316acbd00fb9c.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/8d6b35feae4547f26e00fa08cf1aed14.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/9eb8afb066569c2f8065c4e56d6155f7.json.gz +0 -0
- package/src/.umi/.cache/babel-loader/acd06c34328d2dc25d3c7100b09d5114.json.gz +0 -0
- package/src/pages/ModuleMenu/index.jsx +21 -21
- package/src/pages/ModuleUser/index.less +3 -0
- package/src/pages/index.jsx +1 -1
package/package.json
CHANGED
|
@@ -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
|
-
// (
|
|
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{
|
package/src/pages/index.jsx
CHANGED