Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
biz.qingxiao.com
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxuelai
biz.qingxiao.com
Commits
fec8f03e
Commit
fec8f03e
authored
Nov 25, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
db7003d8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
79 additions
and
15 deletions
+79
-15
AddCourseModal.js
src/pages/coursegather/detail/AddCourseModal.js
+7
-4
AddCourseModal.less
src/pages/coursegather/detail/AddCourseModal.less
+23
-3
CourseBox.js
src/pages/coursegather/detail/CourseBox.js
+27
-4
index.js
src/pages/coursegather/detail/index.js
+18
-0
AddCourseModal.less
src/pages/coursegather/index/AddCourseModal.less
+4
-4
No files found.
src/pages/coursegather/detail/AddCourseModal.js
View file @
fec8f03e
...
...
@@ -99,11 +99,14 @@ class AddCourseModal extends React.Component {
>
{
courseListTotal
==
0
&&
<
Empty
description
=
{
<
span
className
=
{
pageStyle
.
emptytext
}
>
您还没有创建单课
<
br
/>
请直接点击“创建专栏”完成创建
<
/span>} /
>
}
{
courseListTotal
>
0
&&
<
Row
className
=
{
pageStyle
.
courseListBox
}
>
<
Row
className
=
{
pageStyle
.
courseListBox
}
gutter
=
{
32
}
>
{
courseList
.
map
(
ele
=>
(
<
Col
span
=
{
6
}
style
=
{{
marginBottom
:
'10px'
}}
key
=
{
ele
.
id
}
>
<
Checkbox
style
=
{{
display
:
'flex'
,
alignItems
:
'flex-start'
}}
onChange
=
{()
=>
this
.
checkedChange
(
ele
.
id
)}
checked
=
{
course_ids
.
indexOf
(
ele
.
id
)
!=
-
1
}
>
<
img
className
=
{
pageStyle
.
courseCover
}
src
=
{
imagify
(
ele
.
cover
)}
alt
=
""
/>
<
Col
span
=
{
12
}
style
=
{{
marginBottom
:
'10px'
}}
key
=
{
ele
.
id
}
>
<
Checkbox
id
=
"1"
style
=
{{
display
:
'flex'
,
alignItems
:
'flex-start'
}}
onChange
=
{()
=>
this
.
checkedChange
(
ele
.
id
)}
checked
=
{
course_ids
.
indexOf
(
ele
.
id
)
!=
-
1
}
>
<
div
className
=
{
pageStyle
.
colItem
}
>
<
img
className
=
{
pageStyle
.
courseCover
}
src
=
{
ele
.
cover
?
imagify
(
ele
.
cover
||
''
)
:
`
${
__IMGCDN__
}
/course/courseDefaultImg.png`
}
alt
=
""
/>
<
div
className
=
{
pageStyle
.
courseTitle
}
>
{
ele
.
title
}
<
/div
>
<
/div
>
<
/Checkbox
>
<
/Col
>
))}
...
...
src/pages/coursegather/detail/AddCourseModal.less
View file @
fec8f03e
...
...
@@ -59,10 +59,22 @@
text-align: right;
}
.courseCover {
width:
9
0px;
height:
9
0px;
width:
6
0px;
height:
6
0px;
border-radius: 6px;
}
.courseTitle {
font-size: 16px;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 5;
line-clamp: 5;
-webkit-box-orient: vertical;
font-size: 14px;
line-height: 1.3;
}
.active2title {
font-size: 14px;
color: #131313;
...
...
@@ -72,7 +84,15 @@
text-align: center;
}
.courseListBox {
max-height: 3
0
0px;
max-height: 3
5
0px;
overflow-y: auto;
padding: 10px 0;
.colItem {
display: flex;
align-items: flex-start;
.courseCover {
margin-left: 8px;
margin-right: 18px;
}
}
}
\ No newline at end of file
src/pages/coursegather/detail/CourseBox.js
View file @
fec8f03e
...
...
@@ -84,6 +84,7 @@ class CourseBoxForm extends React.Component {
singleCourseSubmitting
,
toCreateSingleCourse
,
toEditSingleCourse
,
cancelEditSingleCourse
,
}
=
this
.
props
;
const
{
getFieldDecorator
}
=
this
.
props
.
form
;
const
formItemModalLineLayout
=
{
...
...
@@ -142,8 +143,23 @@ class CourseBoxForm extends React.Component {
<
div
>
<
span
className
=
{
pageStyle
.
itemTime
}
>
{
item
.
created_at
}
<
/span
>
<
div
>
<
span
className
=
"hreflink"
style
=
{{
marginRight
:
'20px'
,
color
:
'#2194FF'
,
lineHeight
:
1
}}
>
编辑课件
<
/span
>
<
span
className
=
"hreflink"
onClick
=
{()
=>
toEditSingleCourse
(
item
)}
style
=
{{
marginRight
:
'20px'
,
color
:
'#2194FF'
,
lineHeight
:
1
}}
>
管理课程
<
/span
>
<
span
className
=
"hreflink"
style
=
{{
marginRight
:
'16px'
,
color
:
'#2194FF'
,
lineHeight
:
1
,
whiteSpace
:
'nowrap'
,
}}
>
编辑课件
<
/span
>
<
span
className
=
"hreflink"
onClick
=
{()
=>
toEditSingleCourse
(
item
)}
style
=
{{
marginRight
:
'16px'
,
color
:
'#2194FF'
,
lineHeight
:
1
,
whiteSpace
:
'nowrap'
,
}}
>
管理课程
<
/span
>
<
Dropdown
className
=
{
pageStyle
.
editStatus
}
overlay
=
{
...
...
@@ -158,7 +174,14 @@ class CourseBoxForm extends React.Component {
}
trigger
=
{[
'click'
]}
>
<
span
className
=
"hreflink"
style
=
{{
marginRight
:
'20px'
,
color
:
'#2194FF'
,
lineHeight
:
1
}}
>
更多
<
/span
>
<
span
className
=
"hreflink"
style
=
{{
marginRight
:
'16px'
,
color
:
'#2194FF'
,
lineHeight
:
1
,
whiteSpace
:
'nowrap'
,
}}
>
更多
<
/span
>
<
/Dropdown
>
<
/div
>
<
/div
>
...
...
@@ -240,7 +263,7 @@ class CourseBoxForm extends React.Component {
<
FormItem
{...
formItemModalLineLayout
}
>
<
Button
type
=
"primary"
htmlType
=
"submit"
style
=
{{
marginRight
:
20
}}
loading
=
{
singleCourseSubmitting
}
>
{
singleCourseSubmitting
?
'保存中...'
:
'保存'
}
<
/Button
>
<
Button
type
=
"primary"
onClick
=
{
toAddCourseWare
}
style
=
{{
marginRight
:
20
}}
>
上传课件
<
/Button
>
<
Button
style
=
{{
marginRight
:
20
}}
>
取消
<
/Button
>
<
Button
style
=
{{
marginRight
:
20
}}
onClick
=
{
cancelEditSingleCourse
}
>
取消
<
/Button
>
<
/FormItem
>
<
/Form
>
}
...
...
src/pages/coursegather/detail/index.js
View file @
fec8f03e
...
...
@@ -633,6 +633,23 @@ class StaticCenter extends React.Component {
},
});
}
cancelEditSingleCourse
=
()
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
type
:
'coursegatherdetail/updateState'
,
payload
:
{
isEditSingleCourse
:
false
,
editSingleCourseId
:
0
,
editSingleCourseInfo
:
{
id
:
0
,
title
:
''
,
start_time
:
null
,
cover
:
''
,
content
:
''
,
},
},
});
}
toEditSingleCourse
=
(
item
)
=>
{
const
{
dispatch
}
=
this
.
props
;
dispatch
({
...
...
@@ -738,6 +755,7 @@ class StaticCenter extends React.Component {
singleCourseSubmitting
=
{
saveSingleCourseSubmitting
}
toCreateSingleCourse
=
{
this
.
toCreateSingleCourse
}
toEditSingleCourse
=
{
this
.
toEditSingleCourse
}
cancelEditSingleCourse
=
{
this
.
cancelEditSingleCourse
}
/>
}
{
tabIndex
==
2
&&
<
StaticBox
staticTotalInfo
=
{
staticTotalInfo
}
...
...
src/pages/coursegather/index/AddCourseModal.less
View file @
fec8f03e
...
...
@@ -59,8 +59,8 @@
text-align: right;
}
.courseCover {
width:
9
0px;
height:
9
0px;
width:
6
0px;
height:
6
0px;
border-radius: 6px;
}
.courseTitle {
...
...
@@ -72,7 +72,7 @@
-webkit-line-clamp: 5;
line-clamp: 5;
-webkit-box-orient: vertical;
font-size: 1
6
px;
font-size: 1
4
px;
line-height: 1.3;
}
.active2title {
...
...
@@ -84,7 +84,7 @@
text-align: center;
}
.courseListBox {
max-height: 3
0
0px;
max-height: 3
5
0px;
overflow-y: auto;
padding: 10px 0;
.colItem {
...
...
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