mirror of
https://github.com/PlayEdu/backend
synced 2025-07-20 20:39:42 +08:00
Merge branch 'dev' of https://gitee.com/playeduxyz/backend into dev
This commit is contained in:
commit
745004e2ca
@ -81,7 +81,7 @@ export const UploadVideoButton = (props: PropsInterface) => {
|
|||||||
minioMergeVideo(
|
minioMergeVideo(
|
||||||
item.filename,
|
item.filename,
|
||||||
item.uploadId,
|
item.uploadId,
|
||||||
props.categoryIds.join(','),
|
props.categoryIds.join(","),
|
||||||
item.name,
|
item.name,
|
||||||
"mp4",
|
"mp4",
|
||||||
item.size,
|
item.size,
|
||||||
@ -119,6 +119,12 @@ export const UploadVideoButton = (props: PropsInterface) => {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const closeWin = () => {
|
||||||
|
setShowModal(false);
|
||||||
|
setFileList([]);
|
||||||
|
props.onUpdate();
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Button
|
<Button
|
||||||
@ -136,14 +142,12 @@ export const UploadVideoButton = (props: PropsInterface) => {
|
|||||||
title="上传视频"
|
title="上传视频"
|
||||||
open={true}
|
open={true}
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
setShowModal(false);
|
closeWin();
|
||||||
props.onUpdate();
|
|
||||||
}}
|
}}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
closable={false}
|
closable={false}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
setShowModal(false);
|
closeWin();
|
||||||
props.onUpdate();
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Row gutter={[0, 10]}>
|
<Row gutter={[0, 10]}>
|
||||||
|
@ -65,6 +65,9 @@ if (getToken()) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
if (window.location.pathname !== "/login") {
|
||||||
|
window.location.href = "/login";
|
||||||
|
}
|
||||||
RootPage = <InitPage loginData={null} />;
|
RootPage = <InitPage loginData={null} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
8
src/types/index.d.ts
vendored
Normal file
8
src/types/index.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
declare global {
|
||||||
|
interface VideoParseInfo {
|
||||||
|
poster: string;
|
||||||
|
duration: number;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export {}
|
@ -1,4 +0,0 @@
|
|||||||
export interface VideoParseInfo {
|
|
||||||
poster:string;
|
|
||||||
duration:number;
|
|
||||||
}
|
|
@ -1,5 +1,4 @@
|
|||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { VideoParseInfo } from "../types";
|
|
||||||
|
|
||||||
export function getToken(): string {
|
export function getToken(): string {
|
||||||
return window.localStorage.getItem("playedu-backend-token") || "";
|
return window.localStorage.getItem("playedu-backend-token") || "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user