From 1b5c1e5cf59d6677096acbb317c422a5b47095f4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Mon, 19 Aug 2019 17:10:43 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../react/src/modules/courses/coursesDetail/CoursesBanner.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
index a6acc2081..6d67575ff 100644
--- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
+++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
@@ -445,7 +445,7 @@ class CoursesBanner extends Component {
{excellent===true?
- 国家精品
+ 国家精品
:""}
Date: Mon, 19 Aug 2019 17:22:00 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E5=88=86=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../react/src/modules/message/js/MessagSub.js | 2 +-
.../user/usersInfo/video/InfosVideo.js | 26 ++++++++++++++-----
.../user/usersInfo/video/VideoUploadList.js | 2 +-
3 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/public/react/src/modules/message/js/MessagSub.js b/public/react/src/modules/message/js/MessagSub.js
index 196c460a5..fa57036e3 100644
--- a/public/react/src/modules/message/js/MessagSub.js
+++ b/public/react/src/modules/message/js/MessagSub.js
@@ -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 :
diff --git a/public/react/src/modules/user/usersInfo/video/InfosVideo.js b/public/react/src/modules/user/usersInfo/video/InfosVideo.js
index 2f251b583..ca2c11740 100644
--- a/public/react/src/modules/user/usersInfo/video/InfosVideo.js
+++ b/public/react/src/modules/user/usersInfo/video/InfosVideo.js
@@ -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 &&
)
From b20c9aa147f94cd2445eaec68fb35d09c234bad5 Mon Sep 17 00:00:00 2001
From: hjm <63528605@qq.com>
Date: Mon, 19 Aug 2019 17:24:47 +0800
Subject: [PATCH 3/4] tab
---
public/react/src/modules/user/usersInfo/InfosBanner.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/user/usersInfo/InfosBanner.js b/public/react/src/modules/user/usersInfo/InfosBanner.js
index 5a0c41c96..fdc361dc6 100644
--- a/public/react/src/modules/user/usersInfo/InfosBanner.js
+++ b/public/react/src/modules/user/usersInfo/InfosBanner.js
@@ -100,12 +100,12 @@ class InfosBanner extends Component{
onClick={() => this.setState({moduleName: 'package'})}
to={`/users/${username}/package`}>众包
- {/* {((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)
&&
this.setState({moduleName: 'videos'})}
to={`/users/${username}/videos`}>视频
- } */}
+ }
From 1f72e7966ab4fabde266bd067f9b7091ad3e6e62 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Mon, 19 Aug 2019 17:45:10 +0800
Subject: [PATCH 4/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/modules/courses/coursesDetail/CoursesBanner.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
index 6d67575ff..356cd84cf 100644
--- a/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
+++ b/public/react/src/modules/courses/coursesDetail/CoursesBanner.js
@@ -462,7 +462,7 @@ class CoursesBanner extends Component {
}
{excellent===true?
- 国家精品
+ 开发课程
:""}