9
- {basicData.user_learn_top10[8] &&
- basicData.user_learn_top10[8].user_id &&
- basicData.user_learn_top10_users[
- basicData.user_learn_top10[8].user_id
- ] && (
-
- {
- basicData.user_learn_top10_users[
- basicData.user_learn_top10[8].user_id
- ].name
- }
-
- )}
+ {basicData.user_learn_top10[8] && (
+
+ {
+ basicData.user_learn_top10_users[
+ basicData.user_learn_top10[8].user_id
+ ]?.name
+ }
+
+ )}
{basicData.user_learn_top10[8] && (
@@ -495,19 +459,15 @@ const DashboardPage = () => {
10
- {basicData.user_learn_top10[9] &&
- basicData.user_learn_top10[9].user_id &&
- basicData.user_learn_top10_users[
- basicData.user_learn_top10[9].user_id
- ] && (
-
- {
- basicData.user_learn_top10_users[
- basicData.user_learn_top10[9].user_id
- ].name
- }
-
- )}
+ {basicData.user_learn_top10[9] && (
+
+ {
+ basicData.user_learn_top10_users[
+ basicData.user_learn_top10[9].user_id
+ ]?.name
+ }
+
+ )}
{basicData.user_learn_top10[9] && (
From 76a88e4e5e0efbed82fa704e15b02330cf979340 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com>
Date: Mon, 22 May 2023 10:50:56 +0800
Subject: [PATCH 03/10] =?UTF-8?q?=E7=BA=BF=E4=B8=8A=E8=AF=BE=E8=AF=BE?=
=?UTF-8?q?=E6=97=B6=E6=B7=BB=E5=8A=A0bug=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/course/compenents/create.tsx | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/src/pages/course/compenents/create.tsx b/src/pages/course/compenents/create.tsx
index 41f8e87..43ea3a3 100644
--- a/src/pages/course/compenents/create.tsx
+++ b/src/pages/course/compenents/create.tsx
@@ -242,6 +242,16 @@ export const CourseCreate: React.FC
= ({
const selectData = (arr: any, videos: any) => {
let keys = [...hours];
+ let init = false;
+ keys.map((item: any) => {
+ if (arr.indexOf(item) !== -1) {
+ init = true;
+ }
+ });
+ if (init) {
+ message.error("请选择视频");
+ return;
+ }
let data = [...treeData];
keys = keys.concat(arr);
data = data.concat(videos);
@@ -253,6 +263,16 @@ export const CourseCreate: React.FC = ({
const selectChapterData = (arr: any, videos: any) => {
const data = [...chapters];
const keys = [...chapterHours];
+ let init = false;
+ keys[addvideoCurrent].map((item: any) => {
+ if (arr.indexOf(item) !== -1) {
+ init = true;
+ }
+ });
+ if (init) {
+ message.error("请选择视频");
+ return;
+ }
keys[addvideoCurrent] = keys[addvideoCurrent].concat(arr);
data[addvideoCurrent].hours = data[addvideoCurrent].hours.concat(videos);
setChapters(data);
From 4606a8f8965aa4da04efaea21d71759913e2dd68 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com>
Date: Mon, 22 May 2023 11:08:32 +0800
Subject: [PATCH 04/10] =?UTF-8?q?=E7=BA=BF=E4=B8=8A=E8=AF=BE=E8=AF=BE?=
=?UTF-8?q?=E6=97=B6=E6=B7=BB=E5=8A=A0bug=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/compenents/select-resource/index.tsx | 6 +++++-
src/compenents/upload-video-sub/index.tsx | 2 +-
src/pages/course/compenents/create.tsx | 22 +++++----------------
src/pages/course/compenents/hour-update.tsx | 8 ++++++++
4 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/src/compenents/select-resource/index.tsx b/src/compenents/select-resource/index.tsx
index b0f74f7..e7f9525 100644
--- a/src/compenents/select-resource/index.tsx
+++ b/src/compenents/select-resource/index.tsx
@@ -62,7 +62,11 @@ export const SelectResource = (props: PropsInterface) => {
open={props.open}
width={800}
maskClosable={false}
- onOk={() => props.onSelected(selectKeys, selectVideos)}
+ onOk={() => {
+ props.onSelected(selectKeys, selectVideos);
+ setSelectKeys([]);
+ setSelectVideos([]);
+ }}
>
diff --git a/src/compenents/upload-video-sub/index.tsx b/src/compenents/upload-video-sub/index.tsx
index d7819fb..ce9179f 100644
--- a/src/compenents/upload-video-sub/index.tsx
+++ b/src/compenents/upload-video-sub/index.tsx
@@ -218,7 +218,7 @@ export const UploadVideoSub = (props: PropsInterface) => {
paddingLeft: 10,
}}
>
- {videoList.length > 0 && (
+ {videoList.length > 0 && total > 10 && (
= ({
};
const selectData = (arr: any, videos: any) => {
- let keys = [...hours];
- let init = false;
- keys.map((item: any) => {
- if (arr.indexOf(item) !== -1) {
- init = true;
- }
- });
- if (init) {
+ if (arr.length === 0) {
message.error("请选择视频");
return;
}
+ let keys = [...hours];
let data = [...treeData];
keys = keys.concat(arr);
data = data.concat(videos);
@@ -261,18 +255,12 @@ export const CourseCreate: React.FC = ({
};
const selectChapterData = (arr: any, videos: any) => {
- const data = [...chapters];
- const keys = [...chapterHours];
- let init = false;
- keys[addvideoCurrent].map((item: any) => {
- if (arr.indexOf(item) !== -1) {
- init = true;
- }
- });
- if (init) {
+ if (arr.length === 0) {
message.error("请选择视频");
return;
}
+ const data = [...chapters];
+ const keys = [...chapterHours];
keys[addvideoCurrent] = keys[addvideoCurrent].concat(arr);
data[addvideoCurrent].hours = data[addvideoCurrent].hours.concat(videos);
setChapters(data);
diff --git a/src/pages/course/compenents/hour-update.tsx b/src/pages/course/compenents/hour-update.tsx
index 5d25b7d..cf7529f 100644
--- a/src/pages/course/compenents/hour-update.tsx
+++ b/src/pages/course/compenents/hour-update.tsx
@@ -117,6 +117,10 @@ export const CourseHourUpdate: React.FC = ({
});
}
}
+ if (hours.length === 0) {
+ message.error("请选择视频");
+ return;
+ }
courseHour
.storeCourseHourMulti(id, hours)
.then((res: any) => {
@@ -148,6 +152,10 @@ export const CourseHourUpdate: React.FC = ({
});
}
}
+ if (hours.length === 0) {
+ message.error("请选择视频");
+ return;
+ }
courseHour
.storeCourseHourMulti(id, hours)
.then((res: any) => {
From 7ddf77276437913633c4b7148ca62bc9aec78aab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com>
Date: Tue, 30 May 2023 16:09:23 +0800
Subject: [PATCH 05/10] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE?=
=?UTF-8?q?=E6=92=AD=E6=94=BE=E8=AE=BE=E7=BD=AE=E4=B8=AD=E5=A2=9E=E5=8A=A0?=
=?UTF-8?q?=E7=A6=81=E6=AD=A2=E6=8B=96=E5=8A=A8=E8=BF=9B=E5=BA=A6=E6=9D=A1?=
=?UTF-8?q?=E6=8C=89=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/system/config/index.tsx | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/src/pages/system/config/index.tsx b/src/pages/system/config/index.tsx
index 625934b..26f140e 100644
--- a/src/pages/system/config/index.tsx
+++ b/src/pages/system/config/index.tsx
@@ -65,6 +65,14 @@ const SystemConfigPage = () => {
form.setFieldsValue({
"player.poster": configData[i].key_value,
});
+ } else if (configData[i].key_name === "player.disabled_drag") {
+ let value = 0;
+ if (configData[i].key_value === "1") {
+ value = 1;
+ }
+ form.setFieldsValue({
+ "player.disabled_drag": value,
+ });
} else if (
configData[i].key_name === "player.is_enabled_bullet_secret"
) {
@@ -122,6 +130,14 @@ const SystemConfigPage = () => {
}
};
+ const onDragChange = (checked: boolean) => {
+ if (checked) {
+ form.setFieldsValue({ "player.disabled_drag": 1 });
+ } else {
+ form.setFieldsValue({ "player.disabled_drag": 0 });
+ }
+ };
+
const addName = (e: CheckboxChangeEvent) => {
var value = form.getFieldValue("player.bullet_secret_text");
if (e.target.checked) {
@@ -307,6 +323,16 @@ const SystemConfigPage = () => {
onFinishFailed={onFinishFailed}
autoComplete="off"
>
+
+
+
+
+
+
+ (打开后禁止学员在首次学习中拖动进度条,以防刷课)
+
+
+
Date: Tue, 30 May 2023 17:49:10 +0800
Subject: [PATCH 06/10] =?UTF-8?q?=E6=92=AD=E6=94=BE=E5=99=A8=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/system/config/index.tsx | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/pages/system/config/index.tsx b/src/pages/system/config/index.tsx
index 26f140e..f92930d 100644
--- a/src/pages/system/config/index.tsx
+++ b/src/pages/system/config/index.tsx
@@ -402,7 +402,6 @@ const SystemConfigPage = () => {
Date: Tue, 30 May 2023 18:00:51 +0800
Subject: [PATCH 07/10] =?UTF-8?q?=E6=92=AD=E6=94=BE=E5=99=A8=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/system/config/index.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pages/system/config/index.tsx b/src/pages/system/config/index.tsx
index f92930d..c7b60cb 100644
--- a/src/pages/system/config/index.tsx
+++ b/src/pages/system/config/index.tsx
@@ -437,7 +437,7 @@ const SystemConfigPage = () => {
}}
>
- (推荐尺寸:19200x1080px,视频播放未开始时展示)
+ (推荐尺寸:1920x1080px,视频播放未开始时展示)
From 7ea1333690d6a7be391ff136c48d108131ddbd09 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com>
Date: Wed, 31 May 2023 09:03:15 +0800
Subject: [PATCH 08/10] =?UTF-8?q?=E6=92=AD=E6=94=BE=E5=99=A8=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE=E6=96=87=E6=A1=88=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/system/config/index.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pages/system/config/index.tsx b/src/pages/system/config/index.tsx
index c7b60cb..49c45f6 100644
--- a/src/pages/system/config/index.tsx
+++ b/src/pages/system/config/index.tsx
@@ -415,7 +415,7 @@ const SystemConfigPage = () => {
}}
>
- (推荐尺寸:19200x1080px,视频播放未开始时展示)
+ (推荐尺寸:1920x1080px,视频播放未开始时展示)
From ca7b8823aedbd3c08a3c7feb927103896fc0f376 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com>
Date: Wed, 31 May 2023 09:28:29 +0800
Subject: [PATCH 09/10] =?UTF-8?q?=E5=A2=9E=E5=8A=A0MinIO=E9=85=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/system/config/index.tsx | 100 ++++++++++++++++++++++++++++++
1 file changed, 100 insertions(+)
diff --git a/src/pages/system/config/index.tsx b/src/pages/system/config/index.tsx
index 49c45f6..d8bc858 100644
--- a/src/pages/system/config/index.tsx
+++ b/src/pages/system/config/index.tsx
@@ -117,6 +117,26 @@ const SystemConfigPage = () => {
form.setFieldsValue({
"member.default_avatar": configData[i].key_value,
});
+ } else if (configData[i].key_name === "minio.access_key") {
+ form.setFieldsValue({
+ "minio.access_key": configData[i].key_value,
+ });
+ } else if (configData[i].key_name === "minio.secret_key") {
+ form.setFieldsValue({
+ "minio.secret_key": configData[i].key_value,
+ });
+ } else if (configData[i].key_name === "minio.bucket") {
+ form.setFieldsValue({
+ "minio.bucket": configData[i].key_value,
+ });
+ } else if (configData[i].key_name === "minio.endpoint") {
+ form.setFieldsValue({
+ "minio.endpoint": configData[i].key_value,
+ });
+ } else if (configData[i].key_name === "minio.domain") {
+ form.setFieldsValue({
+ "minio.domain": configData[i].key_value,
+ });
}
}
});
@@ -527,6 +547,86 @@ const SystemConfigPage = () => {
),
},
+ {
+ key: "4",
+ label: `MinIO存储`,
+ children: (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ),
+ },
];
const onChange = (key: string) => {
From 0e6435a47241936a5cbb63b0ce6a45e3b8a11e78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com>
Date: Wed, 31 May 2023 10:15:31 +0800
Subject: [PATCH 10/10] =?UTF-8?q?=E5=9B=BE=E7=89=87=E8=B5=84=E6=BA=90?=
=?UTF-8?q?=E9=A1=B5=E5=88=A0=E9=99=A4=E5=9B=BE=E7=89=87=E5=90=8E=E9=87=8D?=
=?UTF-8?q?=E7=BD=AE=E9=80=89=E4=B8=AD=E7=8A=B6=E6=80=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/compenents/left-menu/index.tsx | 1 +
src/pages/resource/images/index.tsx | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/compenents/left-menu/index.tsx b/src/compenents/left-menu/index.tsx
index ccfe912..90be2ef 100644
--- a/src/compenents/left-menu/index.tsx
+++ b/src/compenents/left-menu/index.tsx
@@ -104,6 +104,7 @@ export const LeftMenu: React.FC = () => {
}
newOpenKeys.push(openKeys[i]);
}
+
return newOpenKeys;
};
diff --git a/src/pages/resource/images/index.tsx b/src/pages/resource/images/index.tsx
index 4ca1430..a6113b1 100644
--- a/src/pages/resource/images/index.tsx
+++ b/src/pages/resource/images/index.tsx
@@ -98,6 +98,7 @@ const ResourceImagesPage = () => {
const resetImageList = () => {
setPage(1);
setImageList([]);
+ setSelectKey([]);
setRefresh(!refresh);
};