|
@@ -10,7 +10,6 @@ import styles from "./index.module.scss";
|
|
|
import SpinLoding from "@/components/SpinLoding";
|
|
|
import { Route, Switch, useLocation } from "react-router-dom";
|
|
|
import AuthRoute from "@/components/AuthRoute";
|
|
|
-import NotFound from "@/components/NotFound";
|
|
|
import classNames from "classnames";
|
|
|
import history from "@/utils/history";
|
|
|
import { Button, Form, Input, Modal, Popconfirm } from "antd";
|
|
@@ -21,14 +20,16 @@ import { getTokenInfo, removeTokenInfo } from "@/utils/storage";
|
|
|
import { useDispatch, useSelector } from "react-redux";
|
|
|
import { getPermissionsAPI } from "@/store/action/role";
|
|
|
import { RootState } from "@/store";
|
|
|
-import inco1 from '@/assets/img/inco1.png'
|
|
|
-import inco2 from '@/assets/img/inco2.png'
|
|
|
-import inco3 from '@/assets/img/inco3.png'
|
|
|
-import inco4 from '@/assets/img/inco4.png'
|
|
|
-import inco5 from '@/assets/img/inco5.png'
|
|
|
-import inco6 from '@/assets/img/inco6.png'
|
|
|
+import inco1 from "@/assets/img/inco1.png";
|
|
|
+import inco2 from "@/assets/img/inco2.png";
|
|
|
+import inco3 from "@/assets/img/inco3.png";
|
|
|
+import inco4 from "@/assets/img/inco4.png";
|
|
|
+import inco5 from "@/assets/img/inco5.png";
|
|
|
+import inco6 from "@/assets/img/inco6.png";
|
|
|
import { MessageFu } from "@/utils/message";
|
|
|
|
|
|
+const NotFound = React.lazy(() => import("@/components/NotFound"));
|
|
|
+
|
|
|
function Layout() {
|
|
|
const dispatch = useDispatch();
|
|
|
|
|
@@ -40,7 +41,7 @@ function Layout() {
|
|
|
path: "/",
|
|
|
done: false,
|
|
|
Com: React.lazy(() => import("../Hot")),
|
|
|
- inco:inco1
|
|
|
+ inco: inco1,
|
|
|
},
|
|
|
{
|
|
|
id: 200,
|
|
@@ -48,7 +49,7 @@ function Layout() {
|
|
|
path: "/wall",
|
|
|
done: false,
|
|
|
Com: React.lazy(() => import("../Wall")),
|
|
|
- inco:inco2
|
|
|
+ inco: inco2,
|
|
|
},
|
|
|
{
|
|
|
id: 300,
|
|
@@ -56,7 +57,7 @@ function Layout() {
|
|
|
path: "/goods",
|
|
|
done: false,
|
|
|
Com: React.lazy(() => import("../Goods")),
|
|
|
- inco:inco3
|
|
|
+ inco: inco3,
|
|
|
},
|
|
|
];
|
|
|
}, []);
|
|
@@ -77,7 +78,7 @@ function Layout() {
|
|
|
path: "/user",
|
|
|
done: true,
|
|
|
Com: React.lazy(() => import("../User")),
|
|
|
- inco:inco4
|
|
|
+ inco: inco4,
|
|
|
},
|
|
|
{
|
|
|
id: 500,
|
|
@@ -85,7 +86,7 @@ function Layout() {
|
|
|
path: "/role",
|
|
|
done: true,
|
|
|
Com: React.lazy(() => import("../Role")),
|
|
|
- inco:inco5
|
|
|
+ inco: inco5,
|
|
|
},
|
|
|
{
|
|
|
id: 600,
|
|
@@ -93,7 +94,7 @@ function Layout() {
|
|
|
path: "/log",
|
|
|
done: true,
|
|
|
Com: React.lazy(() => import("../Log")),
|
|
|
- inco:inco6
|
|
|
+ inco: inco6,
|
|
|
}
|
|
|
);
|
|
|
}
|
|
@@ -101,7 +102,7 @@ function Layout() {
|
|
|
|
|
|
// 权限的数据和页面判断
|
|
|
useEffect(() => {
|
|
|
- if(authPageArr&&authPageArr.length){
|
|
|
+ if (authPageArr && authPageArr.length) {
|
|
|
authPageArr.forEach((v) => {
|
|
|
if (v.authority) {
|
|
|
listTemp.forEach((v2) => {
|