diff --git a/src/compenents/index.ts b/src/compenents/index.ts
index 14b2134..9575d06 100644
--- a/src/compenents/index.ts
+++ b/src/compenents/index.ts
@@ -1,6 +1,6 @@
export * from "./footer";
export * from "./header";
-export * from "./leftMenu";
+export * from "./left-menu";
export * from "./upload-image-button";
export * from "./treeDepartment";
export * from "./back-bar";
\ No newline at end of file
diff --git a/src/compenents/leftMenu/index.module.less b/src/compenents/left-menu/index.module.less
similarity index 100%
rename from src/compenents/leftMenu/index.module.less
rename to src/compenents/left-menu/index.module.less
diff --git a/src/compenents/leftMenu/index.tsx b/src/compenents/left-menu/index.tsx
similarity index 87%
rename from src/compenents/leftMenu/index.tsx
rename to src/compenents/left-menu/index.tsx
index bf3b92a..95c552e 100644
--- a/src/compenents/leftMenu/index.tsx
+++ b/src/compenents/left-menu/index.tsx
@@ -21,15 +21,13 @@ function getItem(label: any, key: any, icon: any, children: any, type: any) {
}
const items = [
getItem("首页概览", "/", , null, null),
- getItem("网校装修", "/decoration", , null, null),
getItem(
- "课程内容",
+ "资源管理",
"3",
,
[
- getItem("视频", "/vod", null, null, null),
- getItem("文章", "/topic", null, null, null),
- getItem("试卷", "/paper", null, null, null),
+ getItem("视频", "/videos", null, null, null),
+ getItem("图片", "/images", null, null, null),
],
null
),
@@ -47,7 +45,6 @@ const items = [
[getItem("部门", "/department", null, null, null)],
null
),
- getItem("证书管理", "5", , [], null),
getItem(
"系统设置",
"6",
diff --git a/src/pages/department/index.tsx b/src/pages/department/index.tsx
index 8153ac6..1e20f1c 100644
--- a/src/pages/department/index.tsx
+++ b/src/pages/department/index.tsx
@@ -161,6 +161,7 @@ export const DepartmentPage: React.FC = () => {
= () => {
+ const navigate = useNavigate();
+
return (
-
+ {
+ navigate("/");
+ }}
+ >
+ 返回首页
+
+ }
+ />
);
};
diff --git a/src/utils/index.ts b/src/utils/index.ts
index 3a5e40a..7220245 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -17,11 +17,11 @@ export function dateFormat(dateStr: string) {
}
export const generateUUID = (): string => {
- var guid = "";
- for (var i = 1; i <= 32; i++) {
- var n = Math.floor(Math.random() * 16.0).toString(16);
+ let guid = "";
+ for (let i = 1; i <= 32; i++) {
+ let n = Math.floor(Math.random() * 16.0).toString(16);
guid += n;
- if (i == 8 || i == 12 || i == 16 || i == 20) guid += "-";
+ if (i === 8 || i === 12 || i === 16 || i === 20) guid += "-";
}
return guid;
-};
\ No newline at end of file
+};