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
5efedba0
Commit
5efedba0
authored
Nov 28, 2019
by
baixian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
5c9cbe98
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
8 deletions
+95
-8
coursegatherindex.js
src/models/coursegatherindex.js
+22
-0
Card.js
src/pages/coursegather/index/Card.js
+5
-3
Card.less
src/pages/coursegather/index/Card.less
+24
-5
index.js
src/pages/coursegather/index/index.js
+32
-0
index.less
src/pages/coursegather/index/index.less
+12
-0
No files found.
src/models/coursegatherindex.js
View file @
5efedba0
...
...
@@ -114,6 +114,28 @@ export default {
}
// yield put
},
*
deleteCourse
({
payload
},
{
call
,
put
,
select
})
{
const
{
id
}
=
payload
;
const
data
=
yield
call
(
onlineAjax
.
deleteCourse
,
{
id
,
});
if
(
data
.
code
==
200
)
{
message
.
success
(
'删除成功'
,
0.5
);
yield
put
({
type
:
'getGatherList'
,
payload
:
{
params
:
{},
},
});
}
else
{
yield
put
({
type
:
'webapp/errorrequestresolve'
,
payload
:
{
data
,
},
});
}
},
*
selectCourseList
({
payload
},
{
call
,
put
,
select
})
{
const
{
sid
}
=
yield
select
(
state
=>
state
.
webapp
);
const
data
=
yield
call
(
onlineAjax
.
courseList
,
{
...
...
src/pages/coursegather/index/Card.js
View file @
5efedba0
...
...
@@ -6,15 +6,17 @@ const MediaCard = (props) => {
const
{
info
,
method
,
course
,
}
=
props
;
return
(
<
Col
xs
=
{
24
}
sm
=
{
24
}
md
=
{
12
}
lg
=
{
12
}
xl
=
{
6
}
>
<
div
className
=
{
pageStyle
.
box
}
{...
props
}
onClick
=
{()
=>
method
.
gogatherdetail
(
info
.
id
)}
title
=
{
info
.
title
}
>
<
div
className
=
{
pageStyle
.
box
}
{...
props
}
title
=
{
info
.
title
}
>
{
info
.
cover
?
<
img
className
=
{
pageStyle
.
image
}
src
=
{
imagify
(
info
.
cover
)}
alt
=
""
/>
:
<
img
className
=
{
pageStyle
.
image
}
src
=
{
`
${
__IMGCDN__
}
course/courseDefaultImg.png`
}
alt
=
""
/>
info
.
cover
?
<
img
onClick
=
{()
=>
method
.
gogatherdetail
(
info
.
id
)}
className
=
{
pageStyle
.
image
}
src
=
{
imagify
(
info
.
cover
)}
alt
=
""
/>
:
<
img
onClick
=
{()
=>
method
.
gogatherdetail
(
info
.
id
)}
className
=
{
pageStyle
.
image
}
src
=
{
`
${
__IMGCDN__
}
course/courseDefaultImg.png`
}
alt
=
""
/>
}
<
div
className
=
{
pageStyle
.
infobox
}
>
<
div
className
=
{
pageStyle
.
deleteIcon
}
onClick
=
{()
=>
course
.
deleteCourse
(
info
)}
><
Icon
type
=
"delete"
/><
/div
>
<
div
className
=
{
pageStyle
.
topbox
}
>
<
div
className
=
{
pageStyle
.
title
}
>
{
info
.
title
}
<
/div
>
<
div
className
=
{
pageStyle
.
time
}
>
{
info
.
created_at
}
<
/div
>
...
...
src/pages/coursegather/index/Card.less
View file @
5efedba0
...
...
@@ -34,18 +34,26 @@
justify-content: space-between;
.topbox {
.title {
color: #575757
;
font-size: 16
px;
overflow: hidden
;
line-height: 1.2
;
max-height: 33
px;
min-height: 33px
;
text-overflow: ellipsis;
word-break: break-all;
white-space: normal;
word-wrap: break-word;
width: 90%;
font-size: 14px;
overflow: hidden;
display: -webkit-box;
align-items: center;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
color: #575757;
}
.time {
color: #7C7C7C;
font-size: 14px;
font-size: 12px;
font-weight:400;
}
}
.bottombox {
...
...
@@ -65,4 +73,15 @@
}
}
}
.deleteIcon {
position: absolute;
right: 12px;
color: #c2c2c2;
top: 13px;
cursor: pointer;
font-size: 16px;
}
.deleteIcon:hover {
color: #fa4f53;
}
}
src/pages/coursegather/index/index.js
View file @
5efedba0
...
...
@@ -92,6 +92,32 @@ class StaticCenter extends React.Component {
},
});
}
deleteCourse
=
(
info
)
=>
{
const
{
dispatch
}
=
this
.
props
;
Modal
.
confirm
({
title
:
`确定删除“
${
info
.
title
}
”?`
,
content
:
'删除后不可恢复,请谨慎操作!'
,
okText
:
'确定'
,
cancelText
:
'取消'
,
icon
:
<
Icon
type
=
"close-circle"
style
=
{{
color
:
'red'
}}
/>
,
onOk
()
{
dispatch
({
type
:
'coursegatherindex/deleteCourse'
,
payload
:
{
id
:
info
.
id
,
},
});
},
okButtonProps
:
{
type
:
'danger'
,
style
:
{
color
:
'#fff'
,
backgroundColor
:
'#ff4d4f'
,
borderColor
:
'#ff4d4f'
,
},
},
});
}
render
()
{
const
{
courseVisible
,
...
...
@@ -114,6 +140,7 @@ class StaticCenter extends React.Component {
{
gatherListTotal
>
0
&&
<
div
>
<
div
className
=
{
pageStyle
.
mediaCardBox
}
>
<
div
className
=
{
pageStyle
.
courseTip
}
><
span
>
专栏列表
<
/span>
(
共{gatherListTotal}个
)
</
div
>
<
Row
gutter
=
{
16
}
>
{
gatherList
.
map
(
ele
=>
(
<
Card
...
...
@@ -122,6 +149,11 @@ class StaticCenter extends React.Component {
this
.
gogatherdetail
(
id
);
},
}}
course
=
{{
deleteCourse
:
(
info
)
=>
{
this
.
deleteCourse
(
info
);
},
}}
type
=
{
1
}
key
=
{
ele
.
id
}
info
=
{
ele
}
...
...
src/pages/coursegather/index/index.less
View file @
5efedba0
...
...
@@ -34,3 +34,15 @@
justify-content: center;
align-items: center;
}
.courseTip {
font-size:14px;
font-family:PingFang SC;
font-weight:400;
color:rgba(25,25,25,1);
margin-bottom: 20px;
span {
font-size:16px;
display: inline-block;
margin-right: 11px;
}
}
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