diff --git a/public/react/src/common/educoder.js b/public/react/src/common/educoder.js
index d8c1d5b1b..6f984a49e 100644
--- a/public/react/src/common/educoder.js
+++ b/public/react/src/common/educoder.js
@@ -65,3 +65,5 @@ export { default as ImageLayerHook } from './hooks/ImageLayerHook'
export { default as CBreadcrumb } from '../modules/courses/common/CBreadcrumb'
export { CNotificationHOC as CNotificationHOC } from '../modules/courses/common/CNotificationHOC'
export { default as ModalWrapper } from '../modules/courses/common/ModalWrapper'
+export { default as NoneData } from '../modules/courses/coursesPublic/NoneData'
+
diff --git a/public/react/src/modules/courses/coursesPublic/NoneData.js b/public/react/src/modules/courses/coursesPublic/NoneData.js
index 8c280b6c5..73406ab5c 100644
--- a/public/react/src/modules/courses/coursesPublic/NoneData.js
+++ b/public/react/src/modules/courses/coursesPublic/NoneData.js
@@ -6,8 +6,9 @@ class NoneData extends Component{
super(props)
}
render(){
+ const { style } = this.props;
return(
-
+
暂时还没有相关数据哦!
diff --git a/public/react/src/modules/user/usersInfo/InfosBanner.js b/public/react/src/modules/user/usersInfo/InfosBanner.js
index 91ae50cf1..ef13e5830 100644
--- a/public/react/src/modules/user/usersInfo/InfosBanner.js
+++ b/public/react/src/modules/user/usersInfo/InfosBanner.js
@@ -104,11 +104,11 @@ class InfosBanner extends Component{
onClick={() => this.setState({moduleName: 'package'})}
to={`/users/${username}/package`}>众包
-
+ {/*
this.setState({moduleName: 'videoes'})}
to={`/users/${username}/videoes`}>视频
-
+ */}
diff --git a/public/react/src/modules/user/usersInfo/video/InfosVideo.js b/public/react/src/modules/user/usersInfo/video/InfosVideo.js
index 9f2cdbf26..afe7ffe2d 100644
--- a/public/react/src/modules/user/usersInfo/video/InfosVideo.js
+++ b/public/react/src/modules/user/usersInfo/video/InfosVideo.js
@@ -1,7 +1,7 @@
import React, { useState, useEffect, useContext, useRef, memo } from 'react';
import {Link} from 'react-router-dom';
import { Pagination, Input, Button } from 'antd'
-import { getUrl2, isDev, ThemeContext, ActionBtn } from 'educoder'
+import { getUrl2, isDev, ThemeContext, ActionBtn, NoneData } from 'educoder'
import axios from 'axios'
import VideoInReviewItem from './VideoInReviewItem'
import EditVideoModal from './EditVideoModal'
@@ -50,9 +50,10 @@ const _items=[
{key: 'published_at-asc', name: '最早上传'},
]
function InfoVideo (props) {
- const [videoes, setVideoes] = useState([])
- const [reviewVideoes, setReviewVideoes] = useState([])
+ const [videoes, setVideoes] = useState(undefined)
+ const [reviewVideoes, setReviewVideoes] = useState(undefined)
const [count, setCount] = useState(0)
+ const [loading, setLoading] = useState(true)
const [sortKey, setSortKey] = useState(_items[0].key)
const editModalObj = useModal(false)
@@ -73,6 +74,7 @@ function InfoVideo (props) {
function fetchVideoes() {
const fetchUrl = `/users/${username}/videos.json`
const sorts = sortKey.split('-')
+ setLoading(true)
axios.get(fetchUrl, {
params: {
page: pageObj.current,
@@ -83,6 +85,7 @@ function InfoVideo (props) {
}
})
.then((response) => {
+ setLoading(false)
if (response.data.videos) {
setVideoes(response.data.videos)
setCount(response.data.count)
@@ -93,12 +96,14 @@ function InfoVideo (props) {
}
function fetchReviewVideoes() {
const fetchUrl = `/users/${username}/videos/review.json`
+ setLoading(true)
axios.get(fetchUrl, {
params: {
per_page: 200
}
})
.then((response) => {
+ setLoading(false)
if (response.data.videos) {
setReviewVideoes(response.data.videos)
setCount(response.data.count)
@@ -270,10 +275,14 @@ function InfoVideo (props) {
sortKey={sortKey }
>}
-
+
+
{categoryObj.category == 'all' ?
- {videoes.map((item, index) => {
+ {
+ videoes == undefined ? '' :
+ videoes.length ?
+ videoes.map((item, index) => {
return (
)
- })}
+ })
+ :
+ }
:
- {reviewVideoes.map((item, index) => {
+ {
+ videoes == undefined ? '' :
+ videoes.length ?
+ reviewVideoes.map((item, index) => {
return (
)
- })}
+ })
+ :
+ }
}