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
1ad7cd0b
Commit
1ad7cd0b
authored
May 20, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into feature/zhangleyuan/20210511/more-college-optimize
parents
0f9cc576
18857ffc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
34 deletions
+20
-34
src/index.html
+4
-6
src/modules/course-manage/components/GraphicsEditor.jsx
+16
-25
src/modules/course-manage/graphics-course/AddGraphicsCourse.jsx
+0
-3
No files found.
src/index.html
View file @
1ad7cd0b
<!--
<!--
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2020-08-24 12:20:57
* @Date: 2020-08-24 12:20:57
* @LastEditors:
zhangleyu
an
* @LastEditors:
wuf
an
* @LastEditTime: 2021-05-1
0 13:41:52
* @LastEditTime: 2021-05-1
7 19:53:24
* @Description:
* @Description:
* @Copyright: 杭州杰竞科技有限公司 版权所有
* @Copyright: 杭州杰竞科技有限公司 版权所有
-->
-->
...
@@ -13,10 +13,8 @@
...
@@ -13,10 +13,8 @@
<link
rel=
"icon"
href=
""
/>
<link
rel=
"icon"
href=
""
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<meta
name=
"theme-color"
content=
"#000000"
/>
<meta
name=
"theme-color"
content=
"#000000"
/>
<meta
<meta
name=
"description"
content=
"小麦企学院,一站式企业培训数字化服务商,通过“工具+内容”,帮助企业快速从0到1搭建数字化培训体系,并让整个培训过程可视化,降低培训成本,提升培训效率。"
>
name=
"description"
<meta
name=
"keywords"
content=
"小麦企学院,企业培训,员工培训,企业大学,企业内训,企业外训,培训计划,培训素材,企培,企训,资料云盘,培训课程,培训任务,直播课,视频课,图文课,线下课,知识库,作业,考试,排行榜,培训类别管理,定制培训计划,管理数据,学习数据,企学院,资料共享,培训数字化,数字化培训,培训工具,在线培训,线上培训,培训saas,培训管理,企业微信培训,对客培训,客户培训,直播培训,互联网培训,新员工培训,管理培训,管理者培训,工人培训,制造业培训,餐饮培训,服务业培训,零售培训,门店培训,工厂培训,车间培训,培训补贴,人事培训,财务培训,职场培训,企业学院平台,教育企业学院,教育企业平台,教育平台学院,企业学习,酷学院,小鹅通,企业学院,云学堂,时代光华,云课堂,魔学院,云大学,米知云,授课学堂"
>
content=
"Web site created using create-react-app"
/>
<!-- <link rel="apple-touch-icon" href="../src/common/images/logo.png" /> -->
<!-- <link rel="apple-touch-icon" href="../src/common/images/logo.png" /> -->
<link
rel=
"shortcut icon"
href=
"https://image.xiaomaiketang.com/xm/c4KiP2epBP.png"
>
<link
rel=
"shortcut icon"
href=
"https://image.xiaomaiketang.com/xm/c4KiP2epBP.png"
>
...
...
src/modules/course-manage/components/GraphicsEditor.jsx
View file @
1ad7cd0b
...
@@ -15,16 +15,15 @@ class GraphicsEditor extends React.Component {
...
@@ -15,16 +15,15 @@ class GraphicsEditor extends React.Component {
textLength
:
0
,
textLength
:
0
,
showSelectImageModal
:
false
,
showSelectImageModal
:
false
,
showSelectVideoModal
:
false
,
showSelectVideoModal
:
false
,
diskList
:
[],
}
}
this
.
editorInt
=
null
;
this
.
editorInt
=
null
;
this
.
isContent
=
true
;
}
}
componentDidMount
()
{
componentDidMount
()
{
this
.
renderEditor
()
this
.
renderEditor
()
this
.
resetIndex
(
true
);
this
.
resetIndex
(
true
);
this
.
initBus
();
this
.
initBus
();
this
.
bindClick
();
}
}
...
@@ -32,23 +31,6 @@ class GraphicsEditor extends React.Component {
...
@@ -32,23 +31,6 @@ class GraphicsEditor extends React.Component {
componentWillUnmount
()
{
componentWillUnmount
()
{
this
.
resetIndex
();
this
.
resetIndex
();
this
.
removeBus
();
this
.
removeBus
();
this
.
removeClick
();
}
bindClick
=
()
=>
{
window
.
addEventListener
(
'click'
,
this
.
clickEditor
)
}
removeClick
=
()
=>
{
window
.
removeEventListener
(
'click'
,
this
.
clickEditor
)
}
clickEditor
=
(
e
)
=>
{
if
(
e
&&
e
.
target
.
closest
(
'.content-editor'
))
{
this
.
isContent
=
true
}
else
if
(
e
&&
e
.
target
.
closest
(
'.introduce-editor'
))
{
this
.
isContent
=
false
}
}
}
resetIndex
=
(
bool
)
=>
{
resetIndex
=
(
bool
)
=>
{
...
@@ -102,9 +84,10 @@ class GraphicsEditor extends React.Component {
...
@@ -102,9 +84,10 @@ class GraphicsEditor extends React.Component {
}
}
this
.
editorInt
=
new
E
(
`#editor
${
editorId
}
`
);
this
.
editorInt
=
new
E
(
`#editor
${
editorId
}
`
);
this
.
editorInt
.
config
.
focus
=
false
;
this
.
editorInt
.
config
.
showFullScreen
=
!
isIntro
this
.
editorInt
.
config
.
showFullScreen
=
!
isIntro
this
.
editorInt
.
menus
.
extend
(
'xmimage'
,
ImageMenu
);
this
.
editorInt
.
menus
.
extend
(
'xmimage'
,
ImageMenu
);
this
.
editorInt
.
menus
.
extend
(
'xmvideo'
,
VideoMenu
);
!
isIntro
&&
this
.
editorInt
.
menus
.
extend
(
'xmvideo'
,
VideoMenu
);
this
.
editorInt
.
config
.
menus
=
isIntro
?
this
.
editorInt
.
config
.
menus
=
isIntro
?
[
[
'head'
,
'head'
,
...
@@ -184,19 +167,21 @@ class GraphicsEditor extends React.Component {
...
@@ -184,19 +167,21 @@ class GraphicsEditor extends React.Component {
// 选择图文
// 选择图文
handleSelectVideo
=
(
file
)
=>
{
handleSelectVideo
=
(
file
)
=>
{
const
{
ossUrl
}
=
file
||
{};
if
(
!
ossUrl
)
return
null
;
this
.
setState
({
this
.
setState
({
showSelectVideoModal
:
false
showSelectVideoModal
:
false
})
})
const
{
ossUrl
}
=
file
;
const
{
detail
}
=
this
.
props
;
const
{
detail
}
=
this
.
props
;
this
.
editorInt
&&
this
.
editorInt
.
txt
.
html
(
`
${
detail
.
content
}
<p style="width: 100%;padding-top: 56.25%;position: relative;"><iframe style="position: absolute;width: 100%;height: 100%;top: 0;left: 0;" src="
${
ossUrl
}
"></iframe><br/></p><p><br/></p>`
)
this
.
editorInt
&&
this
.
editorInt
.
txt
.
html
(
`
${
detail
.
content
}
<p style="width: 100%;padding-top: 56.25%;position: relative;"><iframe style="position: absolute;width: 100%;height: 100%;top: 0;left: 0;" src="
${
ossUrl
}
"></iframe><br/></p><p><br/></p>`
)
}
}
handleSelectImage
=
(
file
)
=>
{
handleSelectImage
=
(
file
)
=>
{
const
{
ossUrl
}
=
file
||
{};
if
(
!
ossUrl
)
return
null
;
this
.
setState
({
this
.
setState
({
showSelectImageModal
:
false
showSelectImageModal
:
false
})
})
const
{
ossUrl
}
=
file
;
const
{
detail
}
=
this
.
props
;
const
{
detail
}
=
this
.
props
;
this
.
editorInt
&&
this
.
editorInt
.
txt
.
html
(
`
${
detail
.
content
}
<p><img style="max-width: 100%;" src="
${
ossUrl
}
" /><br/><p>`
)
this
.
editorInt
&&
this
.
editorInt
.
txt
.
html
(
`
${
detail
.
content
}
<p><img style="max-width: 100%;" src="
${
ossUrl
}
" /><br/><p>`
)
}
}
...
@@ -204,13 +189,13 @@ class GraphicsEditor extends React.Component {
...
@@ -204,13 +189,13 @@ class GraphicsEditor extends React.Component {
initBus
=
()
=>
{
initBus
=
()
=>
{
const
{
isIntro
}
=
this
.
props
;
const
{
isIntro
}
=
this
.
props
;
Bus
.
bind
(
`graphicsEditorImage
${
isIntro
?
''
:
'Content'
}
`
,
this
.
uploadImage
)
Bus
.
bind
(
`graphicsEditorImage
${
isIntro
?
''
:
'Content'
}
`
,
this
.
uploadImage
)
Bus
.
bind
(
'graphicsEditorVideo'
,
this
.
uploadVideo
)
!
isIntro
&&
Bus
.
bind
(
'graphicsEditorVideo'
,
this
.
uploadVideo
)
}
}
removeBus
=
()
=>
{
removeBus
=
()
=>
{
const
{
isIntro
}
=
this
.
props
;
const
{
isIntro
}
=
this
.
props
;
Bus
.
unbind
(
`graphicsEditorImage
${
isIntro
?
''
:
'Content'
}
`
,
this
.
uploadImage
)
Bus
.
unbind
(
`graphicsEditorImage
${
isIntro
?
''
:
'Content'
}
`
,
this
.
uploadImage
)
Bus
.
unbind
(
'graphicsEditorVideo'
,
this
.
uploadVideo
)
!
isIntro
&&
Bus
.
unbind
(
'graphicsEditorVideo'
,
this
.
uploadVideo
)
}
}
uploadImage
=
()
=>
{
uploadImage
=
()
=>
{
...
@@ -222,7 +207,13 @@ class GraphicsEditor extends React.Component {
...
@@ -222,7 +207,13 @@ class GraphicsEditor extends React.Component {
}
}
render
()
{
render
()
{
const
{
editorId
,
textLength
,
showSelectImageModal
,
showSelectVideoModal
}
=
this
.
state
;
const
{
editorId
,
textLength
,
showSelectImageModal
,
showSelectVideoModal
,
diskList
,
}
=
this
.
state
;
const
{
limitLength
=
1000
,
isIntro
,
maxLimit
}
=
this
.
props
;
const
{
limitLength
=
1000
,
isIntro
,
maxLimit
}
=
this
.
props
;
return
<
div
className=
{
`graphics-editor-container${isIntro ? ' introduce' : ''} ${(textLength > maxLimit)&& 'warning'}`
}
>
return
<
div
className=
{
`graphics-editor-container${isIntro ? ' introduce' : ''} ${(textLength > maxLimit)&& 'warning'}`
}
>
<
div
className=
"editor-box"
id=
{
`editor${editorId}`
}
></
div
>
<
div
className=
"editor-box"
id=
{
`editor${editorId}`
}
></
div
>
...
...
src/modules/course-manage/graphics-course/AddGraphicsCourse.jsx
View file @
1ad7cd0b
...
@@ -56,7 +56,6 @@ class AddGraphicsCourse extends React.Component {
...
@@ -56,7 +56,6 @@ class AddGraphicsCourse extends React.Component {
coverUrl
:
defaultCoverUrl
,
// 图文课封面
coverUrl
:
defaultCoverUrl
,
// 图文课封面
studentList
:
[],
// 上课学员列表
studentList
:
[],
// 上课学员列表
shelfState
:
'YES'
,
//是否开启学院展示
shelfState
:
'YES'
,
//是否开启学院展示
diskList
:
[],
// 机构可见磁盘目录
selectedFileList
:
[],
// 已经从资料云盘中勾选的文件
selectedFileList
:
[],
// 已经从资料云盘中勾选的文件
showCutModal
:
false
,
// 是否显示截图弹窗
showCutModal
:
false
,
// 是否显示截图弹窗
showSelectVideoModal
:
false
,
showSelectVideoModal
:
false
,
...
@@ -65,7 +64,6 @@ class AddGraphicsCourse extends React.Component {
...
@@ -65,7 +64,6 @@ class AddGraphicsCourse extends React.Component {
courseCatalogList
:[],
//分类列表
courseCatalogList
:[],
//分类列表
categoryId
:
null
,
//分类的Id值
categoryId
:
null
,
//分类的Id值
whetherVisitorsJoin
:
'NO'
,
// 是否允许游客加入
whetherVisitorsJoin
:
'NO'
,
// 是否允许游客加入
isContent
:
true
,
}
}
}
}
...
@@ -513,7 +511,6 @@ class AddGraphicsCourse extends React.Component {
...
@@ -513,7 +511,6 @@ class AddGraphicsCourse extends React.Component {
courseMedia
,
courseMedia
,
introduce
,
introduce
,
showCutModal
,
showCutModal
,
diskList
,
imageFile
,
imageFile
,
videoType
,
videoType
,
shelfState
,
shelfState
,
...
...
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