Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
96a8244a
Commit
96a8244a
authored
Dec 23, 2020
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理没有数据时分页不用显示
parent
d2356439
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
37 deletions
+61
-37
src/modules/course-manage/DataList/CourseData.jsx
+19
-10
src/modules/course-manage/components/AddLiveClass.jsx
+4
-0
src/modules/course-manage/components/LiveCourseList.jsx
+33
-21
src/modules/course-manage/modal/PreviewCourseModal.jsx
+5
-5
src/modules/store-manage/CourseCatalogPage.tsx
+0
-1
No files found.
src/modules/course-manage/DataList/CourseData.jsx
View file @
96a8244a
...
...
@@ -226,6 +226,13 @@ class DataList extends React.Component {
/>
);
};
onShowSizeChange
=
(
current
,
size
)
=>
{
if
(
current
==
size
)
{
return
;
}
this
.
setState
({
size
},
this
.
fetchUserData
)
}
render
()
{
const
{
...
...
@@ -325,16 +332,18 @@ class DataList extends React.Component {
pagination=
{
false
}
style=
{
{
margin
:
"16px 0"
}
}
/>
<
PageControl
size=
"small"
current=
{
current
-
1
}
pageSize=
{
size
}
total=
{
total
}
toPage=
{
(
page
)
=>
{
this
.
fetchUserData
(
page
+
1
);
}
}
/>
{
total
>
0
&&
<
PageControl
size=
"small"
current=
{
current
-
1
}
pageSize=
{
size
}
total=
{
total
}
onShowSizeChange=
{
this
.
onShowSizeChange
}
toPage=
{
(
page
)
=>
{
this
.
fetchUserData
(
page
+
1
);
}
}
/>
}
</
div
>
</
Spin
>
);
...
...
src/modules/course-manage/components/AddLiveClass.jsx
View file @
96a8244a
...
...
@@ -231,6 +231,10 @@ class AddLiveClass extends React.Component {
onChange=
{
(
time
)
=>
{
this
.
props
.
onChange
(
'startTime'
,
time
);
}
}
renderExtraFooter=
{
()
=>
{
return
null
}
}
/>
~
<
TimePicker
format=
"HH:mm"
...
...
src/modules/course-manage/components/LiveCourseList.jsx
View file @
96a8244a
...
...
@@ -176,15 +176,18 @@ class LiveCourseList extends React.Component {
</
div
>
<
div
>
<
span
className=
"teacher"
>
讲师:
{
record
.
teacherName
}
</
span
>
<
span
className=
"split"
>
|
</
span
>
<
span
className=
"assistant"
>
助教:
{
record
.
admins
.
map
((
item
,
index
)
=>
{
return
<
span
>
{
item
.
adminName
}
{
(
index
<
record
.
admins
.
length
-
1
)
&&
(<
span
>
、
</
span
>)
}
</
span
>
})
{
record
.
admins
.
length
>
0
&&
<>
<
span
className=
"split"
>
|
</
span
>
<
span
className=
"assistant"
>
助教:
{
record
.
admins
.
map
((
item
,
index
)
=>
{
return
<
span
>
{
item
.
adminName
}
{
(
index
<
record
.
admins
.
length
-
1
)
&&
(<
span
>
、
</
span
>)
}
</
span
>
})
}
</
span
>
</>
}
</
span
>
</
div
>
</
div
>
</
div
>
...
...
@@ -365,7 +368,7 @@ class LiveCourseList extends React.Component {
this
.
props
.
onChange
(
this
.
props
.
query
);
}
//进入直播间
handleEnterLiveRoom
=
(
item
)
=>
{
handleEnterLiveRoom
=
(
item
)
=>
{
if
(
item
.
startTime
-
Date
.
now
()
>
1800000
)
{
Modal
.
warning
({
title
:
"你来得太早了"
,
...
...
@@ -402,7 +405,14 @@ class LiveCourseList extends React.Component {
// });
}
}
onShowSizeChange
=
(
current
,
size
)
=>
{
if
(
current
==
size
)
{
return
}
let
_query
=
this
.
props
.
query
_query
.
size
=
size
;
this
.
props
.
onChange
(
_query
)
}
render
()
{
const
{
total
,
query
,
courseList
,
loading
}
=
this
.
props
;
...
...
@@ -425,18 +435,20 @@ class LiveCourseList extends React.Component {
dataSource=
{
courseList
}
rowKey=
{
(
row
)
=>
row
.
liveCourseId
}
/>
<
div
className=
"box-footer"
>
<
PageControl
current=
{
current
-
1
}
pageSize=
{
size
}
total=
{
parseInt
(
total
)
}
toPage=
{
(
page
)
=>
{
const
_query
=
{...
query
,
current
:
page
+
1
};
this
.
props
.
onChange
(
_query
)
}
}
/>
</
div
>
{
total
>
0
&&
<
div
className=
"box-footer"
>
<
PageControl
current=
{
current
-
1
}
pageSize=
{
size
}
total=
{
parseInt
(
total
)
}
toPage=
{
(
page
)
=>
{
const
_query
=
{...
query
,
current
:
page
+
1
};
this
.
props
.
onChange
(
_query
)
}
}
onShowSizeChange=
{
this
.
onShowSizeChange
}
/>
</
div
>
}
{
this
.
state
.
shareLiveModal
}
{
openCoursewareModal
&&
(
<
ManageCoursewareModal
...
...
src/modules/course-manage/modal/PreviewCourseModal.jsx
View file @
96a8244a
/*
* @Author: 吴文洁
* @Date: 2020-07-23 14:54:16
* @LastEditors:
wuf
an
* @LastEditTime: 2020-12-2
2 20:31:31
* @LastEditors:
zhangleyu
an
* @LastEditTime: 2020-12-2
3 09:57:25
* @Description: 大班直播课预览弹窗
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
import
React
from
'react'
;
import
{
Modal
}
from
'antd'
;
import
moment
from
'moment'
;
import
'./PreviewCourseModal.less'
;
class
PreviewCourseModal
extends
React
.
Component
{
...
...
@@ -50,7 +50,7 @@ class PreviewCourseModal extends React.Component {
render
()
{
const
{
courseBasinInfo
,
courseClassInfo
=
{},
courseIntroInfo
,
type
}
=
this
.
props
;
const
{
coverUrl
,
courseName
,
scheduleVideoUrl
}
=
courseBasinInfo
;
const
{
liveDate
,
timeHorizonStart
,
timeHorizonEnd
,
nickn
ame
}
=
courseClassInfo
;
const
{
liveDate
,
timeHorizonStart
,
timeHorizonEnd
,
teacherN
ame
}
=
courseClassInfo
;
const
{
liveCourseMediaRequests
}
=
courseIntroInfo
;
let
liveDateStr
,
startTimeStr
,
endTimeStr
;
...
...
@@ -123,7 +123,7 @@ class PreviewCourseModal extends React.Component {
</
div
>
<
div
className=
"container__body__teacher"
>
<
span
className=
"teacher__label"
>
上课老师:
</
span
>
<
span
className=
"teacher__value"
>
{
nickn
ame
}
</
span
>
<
span
className=
"teacher__value"
>
{
teacherN
ame
}
</
span
>
</
div
>
</
div
>
}
...
...
src/modules/store-manage/CourseCatalogPage.tsx
View file @
96a8244a
...
...
@@ -203,7 +203,6 @@ function CourseCatalogPage() {
toPage=
{
(
page
:
any
)
=>
{
const
queryStates
=
_
.
clone
(
query
);
queryStates
.
current
=
page
;
console
.
log
(
"queryStates"
,
queryStates
);
setQuery
(
queryStates
);
}
}
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment