mirror of
https://github.com/PlayEdu/backend
synced 2025-06-14 14:57:00 +08:00
commit
b2e67e1a99
@ -104,6 +104,7 @@ export const LeftMenu: React.FC = () => {
|
|||||||
}
|
}
|
||||||
newOpenKeys.push(openKeys[i]);
|
newOpenKeys.push(openKeys[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return newOpenKeys;
|
return newOpenKeys;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -62,7 +62,11 @@ export const SelectResource = (props: PropsInterface) => {
|
|||||||
open={props.open}
|
open={props.open}
|
||||||
width={800}
|
width={800}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
onOk={() => props.onSelected(selectKeys, selectVideos)}
|
onOk={() => {
|
||||||
|
props.onSelected(selectKeys, selectVideos);
|
||||||
|
setSelectKeys([]);
|
||||||
|
setSelectVideos([]);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<Row>
|
<Row>
|
||||||
<Tabs defaultActiveKey="1" items={items} onChange={onChange} />
|
<Tabs defaultActiveKey="1" items={items} onChange={onChange} />
|
||||||
|
@ -218,7 +218,7 @@ export const UploadVideoSub = (props: PropsInterface) => {
|
|||||||
paddingLeft: 10,
|
paddingLeft: 10,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{videoList.length > 0 && (
|
{videoList.length > 0 && total > 10 && (
|
||||||
<Col
|
<Col
|
||||||
span={24}
|
span={24}
|
||||||
style={{ display: "flex", flexDirection: "row-reverse" }}
|
style={{ display: "flex", flexDirection: "row-reverse" }}
|
||||||
|
@ -241,6 +241,10 @@ export const CourseCreate: React.FC<PropInterface> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const selectData = (arr: any, videos: any) => {
|
const selectData = (arr: any, videos: any) => {
|
||||||
|
if (arr.length === 0) {
|
||||||
|
message.error("请选择视频");
|
||||||
|
return;
|
||||||
|
}
|
||||||
let keys = [...hours];
|
let keys = [...hours];
|
||||||
let data = [...treeData];
|
let data = [...treeData];
|
||||||
keys = keys.concat(arr);
|
keys = keys.concat(arr);
|
||||||
@ -251,6 +255,10 @@ export const CourseCreate: React.FC<PropInterface> = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const selectChapterData = (arr: any, videos: any) => {
|
const selectChapterData = (arr: any, videos: any) => {
|
||||||
|
if (arr.length === 0) {
|
||||||
|
message.error("请选择视频");
|
||||||
|
return;
|
||||||
|
}
|
||||||
const data = [...chapters];
|
const data = [...chapters];
|
||||||
const keys = [...chapterHours];
|
const keys = [...chapterHours];
|
||||||
keys[addvideoCurrent] = keys[addvideoCurrent].concat(arr);
|
keys[addvideoCurrent] = keys[addvideoCurrent].concat(arr);
|
||||||
|
@ -117,6 +117,10 @@ export const CourseHourUpdate: React.FC<PropInterface> = ({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (hours.length === 0) {
|
||||||
|
message.error("请选择视频");
|
||||||
|
return;
|
||||||
|
}
|
||||||
courseHour
|
courseHour
|
||||||
.storeCourseHourMulti(id, hours)
|
.storeCourseHourMulti(id, hours)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
@ -148,6 +152,10 @@ export const CourseHourUpdate: React.FC<PropInterface> = ({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (hours.length === 0) {
|
||||||
|
message.error("请选择视频");
|
||||||
|
return;
|
||||||
|
}
|
||||||
courseHour
|
courseHour
|
||||||
.storeCourseHourMulti(id, hours)
|
.storeCourseHourMulti(id, hours)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
|
@ -263,7 +263,7 @@ const DashboardPage = () => {
|
|||||||
{
|
{
|
||||||
basicData.user_learn_top10_users[
|
basicData.user_learn_top10_users[
|
||||||
basicData.user_learn_top10[0].user_id
|
basicData.user_learn_top10[0].user_id
|
||||||
].name
|
]?.name
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -288,7 +288,7 @@ const DashboardPage = () => {
|
|||||||
{
|
{
|
||||||
basicData.user_learn_top10_users[
|
basicData.user_learn_top10_users[
|
||||||
basicData.user_learn_top10[1].user_id
|
basicData.user_learn_top10[1].user_id
|
||||||
].name
|
]?.name
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -313,7 +313,7 @@ const DashboardPage = () => {
|
|||||||
{
|
{
|
||||||
basicData.user_learn_top10_users[
|
basicData.user_learn_top10_users[
|
||||||
basicData.user_learn_top10[2].user_id
|
basicData.user_learn_top10[2].user_id
|
||||||
].name
|
]?.name
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -334,7 +334,7 @@ const DashboardPage = () => {
|
|||||||
{
|
{
|
||||||
basicData.user_learn_top10_users[
|
basicData.user_learn_top10_users[
|
||||||
basicData.user_learn_top10[3].user_id
|
basicData.user_learn_top10[3].user_id
|
||||||
].name
|
]?.name
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -355,7 +355,7 @@ const DashboardPage = () => {
|
|||||||
{
|
{
|
||||||
basicData.user_learn_top10_users[
|
basicData.user_learn_top10_users[
|
||||||
basicData.user_learn_top10[4].user_id
|
basicData.user_learn_top10[4].user_id
|
||||||
].name
|
]?.name
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -380,7 +380,7 @@ const DashboardPage = () => {
|
|||||||
{
|
{
|
||||||
basicData.user_learn_top10_users[
|
basicData.user_learn_top10_users[
|
||||||
basicData.user_learn_top10[5].user_id
|
basicData.user_learn_top10[5].user_id
|
||||||
].name
|
]?.name
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -401,7 +401,7 @@ const DashboardPage = () => {
|
|||||||
{
|
{
|
||||||
basicData.user_learn_top10_users[
|
basicData.user_learn_top10_users[
|
||||||
basicData.user_learn_top10[6].user_id
|
basicData.user_learn_top10[6].user_id
|
||||||
].name
|
]?.name
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -422,7 +422,7 @@ const DashboardPage = () => {
|
|||||||
{
|
{
|
||||||
basicData.user_learn_top10_users[
|
basicData.user_learn_top10_users[
|
||||||
basicData.user_learn_top10[7].user_id
|
basicData.user_learn_top10[7].user_id
|
||||||
].name
|
]?.name
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -443,7 +443,7 @@ const DashboardPage = () => {
|
|||||||
{
|
{
|
||||||
basicData.user_learn_top10_users[
|
basicData.user_learn_top10_users[
|
||||||
basicData.user_learn_top10[8].user_id
|
basicData.user_learn_top10[8].user_id
|
||||||
].name
|
]?.name
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
@ -464,7 +464,7 @@ const DashboardPage = () => {
|
|||||||
{
|
{
|
||||||
basicData.user_learn_top10_users[
|
basicData.user_learn_top10_users[
|
||||||
basicData.user_learn_top10[9].user_id
|
basicData.user_learn_top10[9].user_id
|
||||||
].name
|
]?.name
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
@ -98,6 +98,7 @@ const ResourceImagesPage = () => {
|
|||||||
const resetImageList = () => {
|
const resetImageList = () => {
|
||||||
setPage(1);
|
setPage(1);
|
||||||
setImageList([]);
|
setImageList([]);
|
||||||
|
setSelectKey([]);
|
||||||
setRefresh(!refresh);
|
setRefresh(!refresh);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -65,6 +65,14 @@ const SystemConfigPage = () => {
|
|||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
"player.poster": configData[i].key_value,
|
"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 (
|
} else if (
|
||||||
configData[i].key_name === "player.is_enabled_bullet_secret"
|
configData[i].key_name === "player.is_enabled_bullet_secret"
|
||||||
) {
|
) {
|
||||||
@ -109,6 +117,26 @@ const SystemConfigPage = () => {
|
|||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
"member.default_avatar": configData[i].key_value,
|
"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,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -122,6 +150,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) => {
|
const addName = (e: CheckboxChangeEvent) => {
|
||||||
var value = form.getFieldValue("player.bullet_secret_text");
|
var value = form.getFieldValue("player.bullet_secret_text");
|
||||||
if (e.target.checked) {
|
if (e.target.checked) {
|
||||||
@ -307,6 +343,16 @@ const SystemConfigPage = () => {
|
|||||||
onFinishFailed={onFinishFailed}
|
onFinishFailed={onFinishFailed}
|
||||||
autoComplete="off"
|
autoComplete="off"
|
||||||
>
|
>
|
||||||
|
<Form.Item style={{ marginBottom: 30 }} label="禁止拖动进度条">
|
||||||
|
<Space align="baseline" style={{ height: 32 }}>
|
||||||
|
<Form.Item name="player.disabled_drag" valuePropName="checked">
|
||||||
|
<Switch onChange={onDragChange} />
|
||||||
|
</Form.Item>
|
||||||
|
<div className="helper-text ml-24">
|
||||||
|
(打开后禁止学员在首次学习中拖动进度条,以防刷课)
|
||||||
|
</div>
|
||||||
|
</Space>
|
||||||
|
</Form.Item>
|
||||||
<Form.Item style={{ marginBottom: 30 }} label="播放器跑马灯">
|
<Form.Item style={{ marginBottom: 30 }} label="播放器跑马灯">
|
||||||
<Space align="baseline" style={{ height: 32 }}>
|
<Space align="baseline" style={{ height: 32 }}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
@ -376,7 +422,6 @@ const SystemConfigPage = () => {
|
|||||||
<div className="d-flex">
|
<div className="d-flex">
|
||||||
<Image
|
<Image
|
||||||
preview={false}
|
preview={false}
|
||||||
width={320}
|
|
||||||
height={180}
|
height={180}
|
||||||
src={thumb}
|
src={thumb}
|
||||||
style={{ borderRadius: 6 }}
|
style={{ borderRadius: 6 }}
|
||||||
@ -390,7 +435,7 @@ const SystemConfigPage = () => {
|
|||||||
}}
|
}}
|
||||||
></UploadImageButton>
|
></UploadImageButton>
|
||||||
<div className="helper-text ml-24">
|
<div className="helper-text ml-24">
|
||||||
(推荐尺寸:19200x1080px,视频播放未开始时展示)
|
(推荐尺寸:1920x1080px,视频播放未开始时展示)
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -412,7 +457,7 @@ const SystemConfigPage = () => {
|
|||||||
}}
|
}}
|
||||||
></UploadImageButton>
|
></UploadImageButton>
|
||||||
<div className="helper-text ml-24">
|
<div className="helper-text ml-24">
|
||||||
(推荐尺寸:19200x1080px,视频播放未开始时展示)
|
(推荐尺寸:1920x1080px,视频播放未开始时展示)
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -502,6 +547,86 @@ const SystemConfigPage = () => {
|
|||||||
</Form>
|
</Form>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: "4",
|
||||||
|
label: `MinIO存储`,
|
||||||
|
children: (
|
||||||
|
<Form
|
||||||
|
form={form}
|
||||||
|
name="IO-basic"
|
||||||
|
labelCol={{ span: 3 }}
|
||||||
|
wrapperCol={{ span: 21 }}
|
||||||
|
style={{ width: 1000, paddingTop: 30 }}
|
||||||
|
onFinish={onFinish}
|
||||||
|
onFinishFailed={onFinishFailed}
|
||||||
|
autoComplete="off"
|
||||||
|
>
|
||||||
|
<Form.Item
|
||||||
|
style={{ marginBottom: 30 }}
|
||||||
|
label="AccessKey"
|
||||||
|
name="minio.access_key"
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
style={{ width: 274 }}
|
||||||
|
allowClear
|
||||||
|
placeholder="请填写AccessKey"
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
style={{ marginBottom: 30 }}
|
||||||
|
label="SecretKey"
|
||||||
|
name="minio.secret_key"
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
style={{ width: 274 }}
|
||||||
|
allowClear
|
||||||
|
placeholder="请填写SecretKey"
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
style={{ marginBottom: 30 }}
|
||||||
|
label="Bucket"
|
||||||
|
name="minio.bucket"
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
style={{ width: 274 }}
|
||||||
|
allowClear
|
||||||
|
placeholder="请填写Bucket"
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
style={{ marginBottom: 30 }}
|
||||||
|
label="Endpoint"
|
||||||
|
name="minio.endpoint"
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
style={{ width: 274 }}
|
||||||
|
allowClear
|
||||||
|
placeholder="请填写Endpoint"
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
style={{ marginBottom: 30 }}
|
||||||
|
label="Domain"
|
||||||
|
name="minio.domain"
|
||||||
|
>
|
||||||
|
<Input
|
||||||
|
style={{ width: 274 }}
|
||||||
|
allowClear
|
||||||
|
placeholder="请填写Domain"
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
style={{ marginBottom: 30 }}
|
||||||
|
wrapperCol={{ offset: 3, span: 21 }}
|
||||||
|
>
|
||||||
|
<Button type="primary" htmlType="submit" loading={loading}>
|
||||||
|
保存
|
||||||
|
</Button>
|
||||||
|
</Form.Item>
|
||||||
|
</Form>
|
||||||
|
),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const onChange = (key: string) => {
|
const onChange = (key: string) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user