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
460a6a47
Commit
460a6a47
authored
Jun 25, 2021
by
maolipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:XMQXY-397
parent
04b06dfd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
13 deletions
+29
-13
src/modules/course-manage/LiveCoursePage.jsx
+8
-0
src/modules/course-manage/components/LiveCourseList.jsx
+10
-11
src/modules/course-manage/graphics-course/components/GraphicsCourseList.jsx
+3
-2
src/modules/course-manage/graphics-course/index.jsx
+8
-0
No files found.
src/modules/course-manage/LiveCoursePage.jsx
View file @
460a6a47
...
...
@@ -22,6 +22,13 @@ class LiveCoursePage extends React.Component {
componentWillMount
()
{
this
.
handleFetchLiveList
(
this
.
state
.
query
);
}
changeShelfState
=
(
index
,
shelfState
)
=>
{
const
{
courseList
}
=
this
.
state
;
courseList
[
index
].
shelfState
=
shelfState
;
this
.
setState
({
courseList
,
});
};
// 获取直播课列表
handleFetchLiveList
=
(
_query
)
=>
{
const
{
query
}
=
this
.
state
;
...
...
@@ -54,6 +61,7 @@ class LiveCoursePage extends React.Component {
total=
{
total
}
courseList=
{
courseList
}
onChange=
{
this
.
handleFetchLiveList
}
changeShelfState=
{
this
.
changeShelfState
}
/>
</
div
>
</
div
>
...
...
src/modules/course-manage/components/LiveCourseList.jsx
View file @
460a6a47
...
...
@@ -97,14 +97,14 @@ class LiveCourseList extends React.Component {
}
//改变上架状态
changeShelfState
=
(
i
tem
)
=>
{
let
_shelfState
=
item
.
shelfState
if
(
_shelfState
===
'NO'
)
{
_shelfState
=
"YES"
;
item
.
shelfState
=
"YES"
}
else
{
_shelfState
=
"NO"
item
.
shelfState
=
"NO"
changeShelfState
=
(
i
ndex
,
item
)
=>
{
let
_shelfState
=
item
.
shelfState
;
if
(
_shelfState
===
'NO'
)
{
_shelfState
=
'YES'
;
item
.
shelfState
=
'YES'
;
}
else
{
_shelfState
=
'NO'
;
item
.
shelfState
=
'NO'
;
}
const
params
=
{
"liveCourseId"
:
item
.
liveCourseId
,
...
...
@@ -117,6 +117,7 @@ class LiveCourseList extends React.Component {
}
else
{
message
.
success
(
"已取消展示"
);
}
this
.
props
.
changeShelfState
(
index
,
_shelfState
)
}
})
}
...
...
@@ -268,9 +269,7 @@ class LiveCourseList extends React.Component {
key
:
"shelfState"
,
dataIndex
:
"shelfState"
,
render
:
(
val
,
item
,
index
)
=>
{
return
(
<
Switch
defaultChecked=
{
item
.
shelfState
===
"YES"
?
true
:
false
}
onChange=
{
()
=>
this
.
changeShelfState
(
item
)
}
/>
)
return
<
Switch
defaultChecked=
{
item
.
shelfState
===
'YES'
?
true
:
false
}
onChange=
{
()
=>
this
.
changeShelfState
(
index
,
item
)
}
/>;
},
},
{
...
...
src/modules/course-manage/graphics-course/components/GraphicsCourseList.jsx
View file @
460a6a47
...
...
@@ -143,7 +143,7 @@ class GraphicsCourseList extends React.Component {
dataIndex
:
"courseware"
,
render
:
(
val
,
item
,
index
)
=>
{
return
(
<
Switch
defaultChecked=
{
item
.
shelfState
===
"YES"
?
true
:
false
}
onChange=
{
()
=>
this
.
changeShelfState
(
item
)
}
/>
<
Switch
defaultChecked=
{
item
.
shelfState
===
"YES"
?
true
:
false
}
onChange=
{
()
=>
this
.
changeShelfState
(
i
ndex
,
i
tem
)
}
/>
)
},
},
...
...
@@ -296,7 +296,7 @@ class GraphicsCourseList extends React.Component {
)
}
//改变上架状态
changeShelfState
=
(
item
)
=>
{
changeShelfState
=
(
i
ndex
,
i
tem
)
=>
{
let
_shelfState
=
item
.
shelfState
if
(
_shelfState
===
'NO'
){
_shelfState
=
"YES"
;
...
...
@@ -316,6 +316,7 @@ class GraphicsCourseList extends React.Component {
}
else
{
message
.
success
(
"已取消展示"
);
}
this
.
props
.
changeShelfState
(
index
,
_shelfState
)
}
})
}
...
...
src/modules/course-manage/graphics-course/index.jsx
View file @
460a6a47
...
...
@@ -27,6 +27,13 @@ class GraphicsCourse extends React.Component {
this
.
handleFetchScheduleList
();
}
changeShelfState
=
(
index
,
shelfState
)
=>
{
const
{
dataSource
}
=
this
.
state
;
dataSource
[
index
].
shelfState
=
shelfState
;
this
.
setState
({
dataSource
,
});
};
// 获取视频课列表
handleFetchScheduleList
=
(
_query
=
{})
=>
{
const
query
=
{
...
...
@@ -75,6 +82,7 @@ class GraphicsCourse extends React.Component {
dataSource=
{
dataSource
}
totalCount=
{
totalCount
}
onChange=
{
this
.
handleFetchScheduleList
}
changeShelfState=
{
this
.
changeShelfState
}
/>
</
div
>
</
div
>
...
...
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