Merge branches 'dev_Ysl', 'dev_Ysm' and 'dev_hjm_a' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_Ysm

dev_oauth
杨树明 6 years ago
commit 9e01ccc7ee

@ -445,7 +445,7 @@ class CoursesBanner extends Component {
<style>
{
`
.tag-orangces .tag-name{
.tag-orangces .tag-names{
display: block;
width: auto;
background-color: #FF6800;
@ -462,7 +462,7 @@ class CoursesBanner extends Component {
}
</style>
{excellent===true?
<span className="tag-orangces fl"><span className="tag-name mt10 ml10">国家精品</span></span>
<span className="tag-orangces fl"><span className="tag-names mt10 ml15">开发课程</span></span>
:""}
<span className={"TabsWarp"}>
<CoursesListType

@ -474,7 +474,7 @@ class MessagSub extends Component{
if(item.tiding_type==="Apply"){
return window.open(`/managements/video_applies`);
}else if(item.tiding_type==="System"){
return window.open(`/users/${item.trigger_user.login}/videos`);
return window.open(`/users/${this.props.current_user.login}/videos`);
}
return '';
default :

@ -100,12 +100,12 @@ class InfosBanner extends Component{
onClick={() => this.setState({moduleName: 'package'})}
to={`/users/${username}/package`}>众包</Link>
</li>
{/* {((is_current && current_user && current_user.is_teacher ) || current_user && current_user.admin)
{((is_current && current_user && current_user.is_teacher ) || current_user && current_user.admin)
&& <li className={`${moduleName == 'videos' ? 'active' : '' }`}>
<Link
onClick={() => this.setState({moduleName: 'videos'})}
to={`/users/${username}/videos`}>视频</Link>
</li>} */}
</li>}
</div>
</div>
</div>

@ -40,7 +40,7 @@ function usePagination() {
onChange: onPageChange
}
}
const PAGE_SIZE = 16
const PAGE_SIZE = 3
const DEFAULT_VIDEO_WIDTH_IN_MD = "90%" // 400
const DEFAULT_VIDEO_HEIGHT_IN_MD = "55%" // 400
let videoId = {};
@ -101,10 +101,14 @@ function InfoVideo (props) {
}
function fetchReviewvideos() {
const fetchUrl = `/users/${username}/videos/review.json`
const sorts = sortKey.split('-')
setLoading(true)
axios.get(fetchUrl, {
params: {
per_page: 100
page: pageObj.current,
per_page: PAGE_SIZE,
sort_by: sorts[0],
sort_direction: sorts[1],
}
})
.then((response) => {
@ -119,8 +123,16 @@ function InfoVideo (props) {
}
useEffect(() => {
fetchvideos()
}, [pageObj.current, sortKey])
if (pageObj.current == 1) {
if (categoryObj.category == 'all') {
fetchvideos()
} else {
fetchReviewvideos()
}
} else {
pageObj.onChange(1)
}
}, [categoryObj.category])
useEffect(() => {
if (categoryObj.category == 'all') {
@ -128,7 +140,7 @@ function InfoVideo (props) {
} else {
fetchReviewvideos()
}
}, [categoryObj.category])
}, [ pageObj.current, sortKey ])
useEffect(() => {
if (videoModalObj.visible == false) {
@ -327,9 +339,9 @@ function InfoVideo (props) {
}
{/* categoryObj.category == 'all' && */}
{
categoryObj.category == 'all' && count > PAGE_SIZE &&
count > PAGE_SIZE &&
<div className="mt30 mb50 edu-txt-center">
<Pagination showQuickJumper total={count} pageSize={PAGE_SIZE}
{...pageObj}

@ -422,7 +422,7 @@ function VideoUploadList (props) {
</div>
{/* windows video/* 不管用 TODO */}
<input type="file" id="fileUpload" style={{display: 'none'}} onChange={onUploadChange}
accept="video/*"
accept=".flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"
></input>
</div>
)

Loading…
Cancel
Save