mirror of
https://github.com/PlayEdu/backend
synced 2025-07-20 10:19:32 +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(
|
||||
item.filename,
|
||||
item.uploadId,
|
||||
props.categoryIds.join(','),
|
||||
props.categoryIds.join(","),
|
||||
item.name,
|
||||
"mp4",
|
||||
item.size,
|
||||
@ -119,6 +119,12 @@ export const UploadVideoButton = (props: PropsInterface) => {
|
||||
},
|
||||
};
|
||||
|
||||
const closeWin = () => {
|
||||
setShowModal(false);
|
||||
setFileList([]);
|
||||
props.onUpdate();
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
@ -136,14 +142,12 @@ export const UploadVideoButton = (props: PropsInterface) => {
|
||||
title="上传视频"
|
||||
open={true}
|
||||
onCancel={() => {
|
||||
setShowModal(false);
|
||||
props.onUpdate();
|
||||
closeWin();
|
||||
}}
|
||||
maskClosable={false}
|
||||
closable={false}
|
||||
onOk={() => {
|
||||
setShowModal(false);
|
||||
props.onUpdate();
|
||||
closeWin();
|
||||
}}
|
||||
>
|
||||
<Row gutter={[0, 10]}>
|
||||
|
@ -65,6 +65,9 @@ if (getToken()) {
|
||||
});
|
||||
});
|
||||
} else {
|
||||
if (window.location.pathname !== "/login") {
|
||||
window.location.href = "/login";
|
||||
}
|
||||
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 { VideoParseInfo } from "../types";
|
||||
|
||||
export function getToken(): string {
|
||||
return window.localStorage.getItem("playedu-backend-token") || "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user