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
33063f28
Commit
33063f28
authored
Mar 24, 2021
by
chenshu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:优化样式
parent
15e9930c
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
29 additions
and
43 deletions
+29
-43
src/modules/course-manage/components/GraphicsEditor.jsx
+4
-2
src/modules/course-manage/components/GraphicsEditor.less
+3
-2
src/modules/course-manage/graphics-course/AddGraphicsCourse.jsx
+1
-1
src/modules/course-manage/graphics-course/components/AddGraphicsIntro.jsx
+4
-1
src/modules/course-manage/graphics-course/modal/WatchDataModal.jsx
+1
-1
src/modules/course-manage/modal/PreviewCourseModal.jsx
+7
-23
src/modules/course-manage/modal/PreviewCourseModal.less
+5
-10
src/modules/course-manage/video-course/AddVideoCourse.jsx
+4
-3
No files found.
src/modules/course-manage/components/GraphicsEditor.jsx
View file @
33063f28
...
@@ -153,7 +153,9 @@ class GraphicsEditor extends React.Component {
...
@@ -153,7 +153,9 @@ class GraphicsEditor extends React.Component {
return
str
return
str
}
}
this
.
editorInt
.
config
.
onchange
=
(
html
)
=>
{
this
.
editorInt
.
config
.
onchange
=
(
html
)
=>
{
const
textLength
=
this
.
editorInt
.
txt
.
text
().
replace
(
/
\&
nbsp
\;
/ig
,
' '
).
length
;
const
videoCount
=
((
html
||
''
).
match
(
/<iframe/g
)
||
[]).
length
;
const
imageCount
=
((
html
||
''
).
match
(
/<img/g
)
||
[]).
length
;
const
textLength
=
this
.
editorInt
.
txt
.
text
().
replace
(
/
\&
nbsp
\;
/ig
,
' '
).
length
+
videoCount
+
imageCount
;
this
.
setState
({
textLength
},
()
=>
{
this
.
setState
({
textLength
},
()
=>
{
onChange
(
html
,
this
.
state
.
textLength
);
onChange
(
html
,
this
.
state
.
textLength
);
})
})
...
@@ -167,7 +169,7 @@ class GraphicsEditor extends React.Component {
...
@@ -167,7 +169,7 @@ class GraphicsEditor extends React.Component {
const
{
limitLength
=
1000
,
isIntro
}
=
this
.
props
;
const
{
limitLength
=
1000
,
isIntro
}
=
this
.
props
;
return
<
div
className=
{
`graphics-editor-container${isIntro ? ' introduce' : ''}`
}
>
return
<
div
className=
{
`graphics-editor-container${isIntro ? ' introduce' : ''}`
}
>
<
div
className=
"editor-box"
id=
{
`editor${editorId}`
}
></
div
>
<
div
className=
"editor-box"
id=
{
`editor${editorId}`
}
></
div
>
{
textLength
>
limitLength
&&
<
div
className=
"editor-tips"
>
超了
{
textLength
-
limitLength
}
个字
</
div
>
}
<
div
className=
"editor-tips"
>
(
{
textLength
}
/100000)
</
div
>
</
div
>
</
div
>
}
}
}
}
...
...
src/modules/course-manage/components/GraphicsEditor.less
View file @
33063f28
...
@@ -33,9 +33,10 @@
...
@@ -33,9 +33,10 @@
.editor-tips {
.editor-tips {
position: absolute;
position: absolute;
top
: 5px;
bottom
: 5px;
right: 8px;
right: 8px;
color: #f5222d;
color: #666;
z-index: 1;
}
}
.w-e-full-screen-editor {
.w-e-full-screen-editor {
.w-e-text-container {
.w-e-text-container {
...
...
src/modules/course-manage/graphics-course/AddGraphicsCourse.jsx
View file @
33063f28
...
@@ -285,7 +285,6 @@ class AddGraphicsCourse extends React.Component {
...
@@ -285,7 +285,6 @@ class AddGraphicsCourse extends React.Component {
courseMedia
,
courseMedia
,
introduce
,
introduce
,
}
}
console
.
log
()
const
previewGraphicsModal
=
(
const
previewGraphicsModal
=
(
<
PreviewGraphicsModal
<
PreviewGraphicsModal
courseBasicInfo=
{
courseBasinInfo
}
courseBasicInfo=
{
courseBasinInfo
}
...
@@ -319,6 +318,7 @@ class AddGraphicsCourse extends React.Component {
...
@@ -319,6 +318,7 @@ class AddGraphicsCourse extends React.Component {
})
})
const
{
ossUrl
}
=
file
;
const
{
ossUrl
}
=
file
;
const
{
courseMedia
,
introduce
,
isContent
}
=
this
.
state
;
const
{
courseMedia
,
introduce
,
isContent
}
=
this
.
state
;
console
.
log
(
isContent
,
55555555
)
this
.
setState
({
this
.
setState
({
[
isContent
?
'courseMedia'
:
'introduce'
]:
`
${
isContent
?
courseMedia
:
introduce
}
<p><img style="max-width: 100%;" src="
${
ossUrl
}
" /><br/><p>`
[
isContent
?
'courseMedia'
:
'introduce'
]:
`
${
isContent
?
courseMedia
:
introduce
}
<p><img style="max-width: 100%;" src="
${
ossUrl
}
" /><br/><p>`
});
});
...
...
src/modules/course-manage/graphics-course/components/AddGraphicsIntro.jsx
View file @
33063f28
...
@@ -26,8 +26,9 @@ class AddGraphicsIntro extends React.Component {
...
@@ -26,8 +26,9 @@ class AddGraphicsIntro extends React.Component {
this
.
state
=
{
this
.
state
=
{
showSelectFileModal
:
false
,
showSelectFileModal
:
false
,
diskList
:
[],
diskList
:
[],
selectType
:
null
selectType
:
null
,
}
}
this
.
isContent
=
true
;
}
}
componentDidMount
()
{
componentDidMount
()
{
...
@@ -49,8 +50,10 @@ class AddGraphicsIntro extends React.Component {
...
@@ -49,8 +50,10 @@ class AddGraphicsIntro extends React.Component {
clickEditor
=
(
e
)
=>
{
clickEditor
=
(
e
)
=>
{
if
(
e
&&
e
.
target
.
closest
(
'.content-editor'
))
{
if
(
e
&&
e
.
target
.
closest
(
'.content-editor'
))
{
this
.
isContent
=
true
this
.
isContent
=
true
console
.
log
(
11111111
)
}
else
if
(
e
&&
e
.
target
.
closest
(
'.introduce-editor'
))
{
}
else
if
(
e
&&
e
.
target
.
closest
(
'.introduce-editor'
))
{
this
.
isContent
=
false
this
.
isContent
=
false
console
.
log
(
222222222
)
}
}
}
}
...
...
src/modules/course-manage/graphics-course/modal/WatchDataModal.jsx
View file @
33063f28
...
@@ -119,7 +119,7 @@ class WatchDataModal extends React.Component {
...
@@ -119,7 +119,7 @@ class WatchDataModal extends React.Component {
key
:
'progress'
,
key
:
'progress'
,
dataIndex
:
'progress'
,
dataIndex
:
'progress'
,
render
:
(
val
)
=>
{
render
:
(
val
)
=>
{
return
<
span
>
{
val
||
0
}
%
</
span
>
return
<
span
>
{
val
===
100
?
'已完成'
:
`${val || 0}%`
}
</
span
>
}
}
}
}
];
];
...
...
src/modules/course-manage/modal/PreviewCourseModal.jsx
View file @
33063f28
...
@@ -76,7 +76,7 @@ class PreviewCourseModal extends React.Component {
...
@@ -76,7 +76,7 @@ class PreviewCourseModal extends React.Component {
const
{
courseBasicInfo
,
courseClassInfo
=
{},
courseIntroInfo
,
type
,
courseState
,
origin
}
=
this
.
props
;
const
{
courseBasicInfo
,
courseClassInfo
=
{},
courseIntroInfo
,
type
,
courseState
,
origin
}
=
this
.
props
;
const
{
coverUrl
,
courseName
,
scheduleVideoUrl
,
videoDuration
}
=
courseBasicInfo
;
const
{
coverUrl
,
courseName
,
scheduleVideoUrl
,
videoDuration
}
=
courseBasicInfo
;
const
{
liveDate
,
calendarTime
,
startTime
,
endTime
,
timeHorizonStart
,
timeHorizonEnd
,
teacherName
}
=
courseClassInfo
;
const
{
liveDate
,
calendarTime
,
startTime
,
endTime
,
timeHorizonStart
,
timeHorizonEnd
,
teacherName
}
=
courseClassInfo
;
const
{
liveCourseMediaRequests
}
=
courseIntroInfo
;
const
{
introduce
}
=
courseIntroInfo
;
let
liveDateStr
,
startTimeStr
,
endTimeStr
;
let
liveDateStr
,
startTimeStr
,
endTimeStr
;
...
@@ -177,28 +177,12 @@ class PreviewCourseModal extends React.Component {
...
@@ -177,28 +177,12 @@ class PreviewCourseModal extends React.Component {
<
div
className=
"container__introduction__title"
>
直播课简介
</
div
>
<
div
className=
"container__introduction__title"
>
直播课简介
</
div
>
}
}
<
div
className=
"container__introduction__list editor-box"
>
<
div
className=
"container__introduction__list editor-box"
>
{
<
div
liveCourseMediaRequests
.
map
((
item
,
index
)
=>
{
className=
"intro-item text"
if
(
item
.
mediaType
===
'TEXT'
)
{
dangerouslySetInnerHTML=
{
{
return
(
__html
:
introduce
<
div
}
}
className=
"intro-item text"
/>
dangerouslySetInnerHTML=
{
{
__html
:
item
.
mediaContent
}
}
/>
)
}
if
(
item
.
mediaType
===
'PICTURE'
)
{
return
(
<
div
className=
"intro-item picture"
>
<
img
src=
{
item
.
mediaUrl
}
/>
</
div
>
)
}
})
}
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
src/modules/course-manage/modal/PreviewCourseModal.less
View file @
33063f28
...
@@ -122,19 +122,14 @@
...
@@ -122,19 +122,14 @@
margin-top: 13px;
margin-top: 13px;
}
}
.text {
color: #666;
color: #666;
line-height: 17px;
p {
p {
font-size: 12px;
font-size: 12px;
}
}
}
.picture {
img {
img {
width: 100%;
width: 100%;
}
}
}
}
}
}
}
...
...
src/modules/course-manage/video-course/AddVideoCourse.jsx
View file @
33063f28
...
@@ -293,8 +293,8 @@ class AddVideoCourse extends React.Component {
...
@@ -293,8 +293,8 @@ class AddVideoCourse extends React.Component {
scheduleVideoUrl
,
scheduleVideoUrl
,
courseName
,
courseName
,
scheduleMedia
,
scheduleMedia
,
videoDuration
videoDuration
,
introduce
,
}
=
this
.
state
;
}
=
this
.
state
;
const
courseBasinInfo
=
{
const
courseBasinInfo
=
{
...
@@ -304,7 +304,8 @@ class AddVideoCourse extends React.Component {
...
@@ -304,7 +304,8 @@ class AddVideoCourse extends React.Component {
videoDuration
videoDuration
}
}
const
courseIntroInfo
=
{
const
courseIntroInfo
=
{
liveCourseMediaRequests
:
scheduleMedia
liveCourseMediaRequests
:
scheduleMedia
,
introduce
,
}
}
const
previewCourseModal
=
(
const
previewCourseModal
=
(
...
...
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