123
+
+
+
+
+
+
+ {reviewVideoes.map((item, index) => {
+ return (
+ )
+ })}
+
+
+ gogogo
+
+ {videoes.map((item, index) => {
+ return (
+ )
+ })}
+
to upload
)
diff --git a/public/react/src/modules/user/usersInfo/video/VideoInReviewItem.js b/public/react/src/modules/user/usersInfo/video/VideoInReviewItem.js
new file mode 100644
index 000000000..7c2af5070
--- /dev/null
+++ b/public/react/src/modules/user/usersInfo/video/VideoInReviewItem.js
@@ -0,0 +1,57 @@
+import React, { useState, useEffect, useContext, memo } from 'react';
+import { Progress, Input, Tooltip } from 'antd'
+import { getUrl2, isDev, CBreadcrumb, ActionBtn, ThemeContext } from 'educoder'
+import axios from 'axios'
+import moment from 'moment'
+import playIcon from './images/play.png'
+
+/**
+cover_url: "http://video.educoder.net/f6ba49c3944b43ee98736898e31b7d88/snapshots/12da3f7df07c499b8f0fc6dc410094e9-00005.jpg"
+created_at: "2019-08-12 13:48:26"
+file_url: "http://video.educoder.net/sv/4c7eb4-16c845ee09c/4c7eb4-16c845ee09c.mp4"
+id: 1
+published_at: "2019-08-12 15:38:00"
+title: "测试标题"
+updated_at: "2019-08-12 17:17:09"
+ */
+function VideoInReviewItem (props) {
+ const theme = useContext(ThemeContext);
+ const { history, cover_url, title, created_at, isReview, onEditVideo } = props;
+
+ const username = props.match.params.username
+ function toList() {
+ history.push(`/users/${username}/videoes`)
+ }
+ function toUpload() {
+ history.push(`/users/${username}/videoes/upload`)
+ }
+ return (
+
+
+

+ {!isReview &&
+

+
}
+
+
20 ? title : ''}
+ >{title}
+
+ {/* 2019-09-01 10:00:22 */}
+
{moment(created_at).format('YYYY-MM-DD HH:mm:ss')}
+ { isReview != true &&
+
+ onEditVideo(props)}>
+
+
+
+
+
}
+
+
+
+ )
+}
+
+export default VideoInReviewItem
diff --git a/public/react/src/modules/user/usersInfo/video/VideoItem.js b/public/react/src/modules/user/usersInfo/video/VideoItem.js
new file mode 100644
index 000000000..e69de29bb
diff --git a/public/react/src/modules/user/usersInfo/video/VideoPublishSuccess.js b/public/react/src/modules/user/usersInfo/video/VideoPublishSuccess.js
new file mode 100644
index 000000000..d0cd04b06
--- /dev/null
+++ b/public/react/src/modules/user/usersInfo/video/VideoPublishSuccess.js
@@ -0,0 +1,67 @@
+import React, { useState, useEffect, useContext, memo } from 'react';
+import { Progress, Input } from 'antd'
+import { getUrl2, isDev, CBreadcrumb, ActionBtn, ThemeContext } from 'educoder'
+import axios from 'axios'
+
+function VideoUpload (props) {
+ const theme = useContext(ThemeContext);
+ const { history } = props;
+
+ const username = props.match.params.username
+ function toList() {
+ history.push(`/users/${username}/videoes`)
+ }
+ function toUpload() {
+ history.push(`/users/${username}/videoes/upload`)
+
+ }
+ return (
+
+
+
+
+
+
+
+
+
+
恭喜!
+
提交成功
+
平台正在审核您的申请,审核结果将以平台消息的形式通知您
+
+
+
+ )
+}
+
+export default VideoUpload
diff --git a/public/react/src/modules/user/usersInfo/video/VideoUploadList.js b/public/react/src/modules/user/usersInfo/video/VideoUploadList.js
index c97c72c15..4d626b88f 100644
--- a/public/react/src/modules/user/usersInfo/video/VideoUploadList.js
+++ b/public/react/src/modules/user/usersInfo/video/VideoUploadList.js
@@ -1,6 +1,6 @@
-import React, { useState, useEffect, useReducer, memo } from 'react';
+import React, { useState, useEffect, useReducer, useContext, memo } from 'react';
-import { getUrl2, isDev, CBreadcrumb, ActionBtn } from 'educoder'
+import { getUrl2, isDev, CBreadcrumb, ActionBtn, ThemeContext } from 'educoder'
import axios from 'axios'
import VideoUpload from './VideoUpload'
@@ -17,8 +17,10 @@ function VideoUploadList (props) {
const [videoes, setVideoes] = useState([]);
const [state, dispatch] = useReducer(reducer, initialState);
+ const theme = useContext(ThemeContext)
+
const username = props.match.params.username
- const { showNotification } = props;
+ const { showNotification, history } = props;
const uploaderOptions = {
}
@@ -163,13 +165,13 @@ function VideoUploadList (props) {
return {
video_id: item.videoId,
// todo
- title: item.name
+ title: item.title
}
})
}).then((response) => {
// to success page
if (response.data.status == 0) {
-
+ history.push(`/users/${username}/videoes/success`)
}
}).catch((error) => {
console.log(error)
@@ -180,12 +182,13 @@ function VideoUploadList (props) {
}
// login
return (
-
+
上传视频
- 单次最多支持{MAX_FILE_COUNT}个视频文件上传,不支持断点续传,单个视频文件最大{MAX_FILE_SIZE}M
+ {/* 单次最多支持{MAX_FILE_COUNT}个视频文件上传,不支持断点续传,单个视频文件最大{MAX_FILE_SIZE}M */}
@@ -248,21 +266,32 @@ function VideoUploadList (props) {
)
})}
-
+ {state.videoes && state.videoes.length === MAX_FILE_COUNT &&
+
+
+ 单次最多支持3个视频文件上传
+
}
视频大小:不支持断点续传,单个视频文件最大200M;单次最多支持3个视频文件上传
视频规格:avi、flv、f4v、m4v、mov、mp4、rmvb、swf、webm
温馨提示:请勿上传违法视频。平台将为每一个视频分配一个地址,您可以通过引用改地址将视频使用在开发社区等模块
-
}
+
+
onPublish()}
+ >立即发布
-
onPublish()}>立即发布
+
上传视频,即表示您已同意上传内容协议,不得上传未经他人授权的作品
+
)
diff --git a/public/react/src/modules/user/usersInfo/video/images/play.png b/public/react/src/modules/user/usersInfo/video/images/play.png
new file mode 100644
index 0000000000000000000000000000000000000000..e2787ea9de62275ef3bc516ae55fdc0ac9177379
GIT binary patch
literal 413
zcmV;O0b>4%P)