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
c973ae60
Commit
c973ae60
authored
Nov 26, 2019
by
wangxuelai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
''
parent
3beb371b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
96 additions
and
3 deletions
+96
-3
coursegatherdetail.js
src/models/coursegatherdetail.js
+1
-0
CommentList.js
src/pages/coursegather/detail/CommentList.js
+32
-1
CommentList.less
src/pages/coursegather/detail/CommentList.less
+16
-0
CommentList.js
src/pages/onlineclasses/singleclass/CommentList.js
+30
-2
CommentList.less
src/pages/onlineclasses/singleclass/CommentList.less
+16
-0
index.js
src/utils/index.js
+1
-0
No files found.
src/models/coursegatherdetail.js
View file @
c973ae60
...
...
@@ -695,6 +695,7 @@ export default {
payload
:
{
commentList
:
data
.
data
&&
data
.
data
.
list
,
commentListTotal
:
data
.
data
&&
data
.
data
.
total
,
commentParams
:
newParams
,
},
});
}
else
{
...
...
src/pages/coursegather/detail/CommentList.js
View file @
c973ae60
...
...
@@ -55,6 +55,7 @@ class CommentListForm extends React.Component {
payload
:
{
params
:
{
source_id
:
staticChartId
,
page
:
1
,
},
},
});
...
...
@@ -72,6 +73,19 @@ class CommentListForm extends React.Component {
},
});
}
sizeChange
=
(
page
,
perPage
)
=>
{
const
{
dispatch
,
staticChartId
}
=
this
.
props
;
dispatch
({
type
:
'coursegatherdetail/searchCourseReply'
,
payload
:
{
params
:
{
page
:
1
,
perPage
,
source_id
:
staticChartId
,
},
},
});
}
handleClickDelete
=
(
record
)
=>
{
const
{
dispatch
}
=
this
.
props
;
Modal
.
confirm
({
...
...
@@ -155,6 +169,7 @@ class CommentListForm extends React.Component {
type
:
'coursegatherdetail/searchCourseReply'
,
payload
:
{
params
:
{
page
:
1
,
source_id
:
gatherDetail
.
id
,
},
},
...
...
@@ -177,6 +192,14 @@ class CommentListForm extends React.Component {
{
title
:
'序号'
,
dataIndex
:
'id'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
indexbox
}
>
{((
commentParams
.
page
-
1
)
*
commentParams
.
perPage
)
+
index
+
1
}
{
record
.
place_top_at
&&
<
div
className
=
{
pageStyle
.
placetop
}
>
置顶
<
/div>
}
<
/div
>
);
},
},
{
title
:
'用户'
,
...
...
@@ -202,6 +225,10 @@ class CommentListForm extends React.Component {
);
},
},
{
title
:
'评论时间'
,
dataIndex
:
'created_at'
,
},
{
title
:
'操作'
,
dataIndex
:
'a'
,
...
...
@@ -216,7 +243,7 @@ class CommentListForm extends React.Component {
<
/Tooltip
>
}
<
Divider
type
=
"vertical"
/>
<
span
className
=
{
pageStyle
.
hreflink
}
onClick
=
{()
=>
this
.
handleClickStick
(
record
)}
>
置顶
<
/span
>
<
span
className
=
{
pageStyle
.
hreflink
}
onClick
=
{()
=>
this
.
handleClickStick
(
record
)}
>
{
record
.
place_top_at
?
'取消置顶'
:
'置顶'
}
<
/span
>
<
Divider
type
=
"vertical"
/>
<
span
className
=
{
pageStyle
.
hreflink
}
onClick
=
{()
=>
this
.
handleClickDelete
(
record
)}
>
删除
<
/span
>
<
/div
>
...
...
@@ -256,8 +283,12 @@ class CommentListForm extends React.Component {
<
div
className
=
"tablefooterbox"
>
<
span
className
=
"tablefooterstatic"
>
共
{
commentListTotal
}
条数据
<
/span
>
<
Pagination
showSizeChanger
showQuickJumper
onShowSizeChange
=
{
this
.
sizeChange
}
pageSize
=
{
commentParams
.
perPage
}
total
=
{
Number
(
commentListTotal
)}
current
=
{
Number
(
commentParams
.
page
)}
onChange
=
{
this
.
changePage
}
/
>
<
/div
>
...
...
src/pages/coursegather/detail/CommentList.less
View file @
c973ae60
...
...
@@ -20,3 +20,19 @@
padding: 31px 21px;
min-height: calc(100vh - 280px);
}
.placetop {
width: 36px;
height: 22px;
line-height: 20px;
border-radius: 4px;
border: 1px solid rgba(2,181,255,1);
color: #02B5FF;
font-size: 12px;
background-color: #fff;
text-align: center;
margin-left: 16px;
}
.indexbox {
display: flex;
align-items: center;
}
src/pages/onlineclasses/singleclass/CommentList.js
View file @
c973ae60
...
...
@@ -44,7 +44,7 @@ class CommentListForm extends React.Component {
dispatch
({
type
:
'onlineclasses/commentStick'
,
payload
:
{
place_top
:
1
,
place_top
:
record
.
place_top_at
?
2
:
1
,
id
:
record
.
id
,
},
});
...
...
@@ -62,6 +62,19 @@ class CommentListForm extends React.Component {
},
});
}
sizeChange
=
(
page
,
perPage
)
=>
{
const
{
dispatch
,
addCourseObj
}
=
this
.
props
;
dispatch
({
type
:
'onlineclasses/selectComment'
,
payload
:
{
params
:
{
page
:
1
,
perPage
,
source_id
:
addCourseObj
.
id
,
},
},
});
}
handleClickDelete
=
(
record
)
=>
{
const
{
dispatch
}
=
this
.
props
;
Modal
.
confirm
({
...
...
@@ -137,6 +150,14 @@ class CommentListForm extends React.Component {
{
title
:
'序号'
,
dataIndex
:
'id'
,
render
:
(
text
,
record
,
index
)
=>
{
return
(
<
div
className
=
{
pageStyle
.
indexbox
}
>
{((
commentParams
.
page
-
1
)
*
commentParams
.
perPage
)
+
index
+
1
}
{
record
.
place_top_at
&&
<
div
className
=
{
pageStyle
.
placetop
}
>
置顶
<
/div>
}
<
/div
>
);
},
},
{
title
:
'用户'
,
...
...
@@ -162,6 +183,10 @@ class CommentListForm extends React.Component {
);
},
},
{
title
:
'评论时间'
,
dataIndex
:
'created_at'
,
},
{
title
:
'操作'
,
dataIndex
:
'a'
,
...
...
@@ -176,7 +201,7 @@ class CommentListForm extends React.Component {
<
/Tooltip
>
}
<
Divider
type
=
"vertical"
/>
<
span
className
=
{
pageStyle
.
hreflink
}
onClick
=
{()
=>
this
.
handleClickStick
(
record
)}
>
置顶
<
/span
>
<
span
className
=
{
pageStyle
.
hreflink
}
onClick
=
{()
=>
this
.
handleClickStick
(
record
)}
>
{
record
.
place_top_at
?
'取消置顶'
:
'置顶'
}
<
/span
>
<
Divider
type
=
"vertical"
/>
<
span
className
=
{
pageStyle
.
hreflink
}
onClick
=
{()
=>
this
.
handleClickDelete
(
record
)}
>
删除
<
/span
>
<
/div
>
...
...
@@ -196,6 +221,9 @@ class CommentListForm extends React.Component {
<
div
className
=
"tablefooterbox"
>
<
span
className
=
"tablefooterstatic"
>
共
{
commentListTotal
}
条数据
<
/span
>
<
Pagination
showSizeChanger
showQuickJumper
onShowSizeChange
=
{
this
.
sizeChange
}
pageSize
=
{
commentParams
.
perPage
}
total
=
{
Number
(
commentListTotal
)}
onChange
=
{
this
.
changePage
}
...
...
src/pages/onlineclasses/singleclass/CommentList.less
View file @
c973ae60
...
...
@@ -8,3 +8,19 @@
color:rgba(24,144,255,1);
cursor: pointer;
}
.placetop {
width: 36px;
height: 22px;
line-height: 20px;
border-radius: 4px;
border: 1px solid rgba(2,181,255,1);
color: #02B5FF;
font-size: 12px;
background-color: #fff;
text-align: center;
margin-left: 16px;
}
.indexbox {
display: flex;
align-items: center;
}
\ No newline at end of file
src/utils/index.js
View file @
c973ae60
...
...
@@ -821,6 +821,7 @@ function getFileType(type) {
};
}
function
getAudioDuration
(
file
)
{
console
.
log
(
file
,
'file'
);
return
new
Promise
((
resolve
,
reject
)
=>
{
const
url
=
URL
.
createObjectURL
(
file
);
const
audioElement
=
new
Audio
(
url
);
...
...
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