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
cff4cd0f
Commit
cff4cd0f
authored
May 13, 2021
by
chenshu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:初始化
parent
553cbc40
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
187 additions
and
48 deletions
+187
-48
src/modules/course-manage/offline-course/AddOfflineCourse.jsx
+32
-12
src/modules/course-manage/offline-course/OfflineCourseData.jsx
+0
-0
src/modules/course-manage/offline-course/OfflineCourseData.less
+3
-0
src/modules/course-manage/offline-course/modal/PreviewModal.jsx
+0
-32
src/modules/course-manage/offline-course/modal/PreviewModal.less
+0
-4
src/modules/course-manage/offline-course/modal/PreviewOfflineModal.jsx
+57
-0
src/modules/course-manage/offline-course/modal/PreviewOfflineModal.less
+95
-0
No files found.
src/modules/course-manage/offline-course/AddOfflineCourse.jsx
View file @
cff4cd0f
...
...
@@ -27,7 +27,7 @@ import ShowTips from "@/components/ShowTips";
import
Breadcrumbs
from
"@/components/Breadcrumbs"
;
import
SelectStudent
from
'../modal/select-student'
;
import
SelectPrepareFileModal
from
'../../prepare-lesson/modal/SelectPrepareFileModal'
;
import
Preview
GraphicsModal
from
'../modal/PreviewGraphics
Modal'
;
import
Preview
OfflineModal
from
'./modal/PreviewOffline
Modal'
;
import
StoreService
from
"@/domains/store-domain/storeService"
;
import
Service
from
'@/common/js/service'
;
import
{
randomString
}
from
'@/domains/basic-domain/utils'
;
...
...
@@ -304,24 +304,25 @@ class AddOfflineCourse extends React.Component {
const
{
coverUrl
,
courseName
,
courseMedia
,
startTime
,
endTime
,
introduce
,
categoryName
,
offlinePlace
,
}
=
this
.
state
;
const
courseBasinInfo
=
{
const
data
=
{
coverUrl
,
courseName
,
categoryName
}
const
courseIntroInfo
=
{
courseMedia
,
startTime
,
endTime
,
categoryName
,
introduce
,
offlinePlace
,
}
const
previewGraphicsModal
=
(
<
PreviewGraphicsModal
courseBasicInfo=
{
courseBasinInfo
}
courseIntroInfo=
{
courseIntroInfo
}
<
PreviewOfflineModal
data=
{
data
}
close=
{
()
=>
{
this
.
setState
({
previewGraphicsModal
:
null
...
...
@@ -749,10 +750,29 @@ class AddOfflineCourse extends React.Component {
<
div
className=
"course-catalog"
>
<
span
className=
"label"
><
span
className=
"require"
>
*
</
span
>
课程分类:
</
span
>
{
(
pageType
===
'add'
)
&&
<
Cascader
defaultValue=
{
categoryName
?
[
categoryName
]
:
undefined
}
options=
{
courseCatalogList
}
displayRender=
{
label
=>
label
.
join
(
'-'
)
}
fieldNames=
{
fieldNames
}
onChange=
{
this
.
catalogChange
}
style=
{
{
width
:
240
}
}
placeholder=
"请选择课程分类"
suffixIcon=
{
<
span
className=
"icon iconfont"
style=
{
{
fontSize
:
'12px'
,
color
:
'#BFBFBF'
}
}
>

</
span
>
}
/>
<
Cascader
showSearch
defaultValue=
{
categoryName
?
[
categoryName
]
:
undefined
}
options=
{
courseCatalogList
}
displayRender=
{
label
=>
label
.
join
(
'-'
)
}
fieldNames=
{
fieldNames
}
onChange=
{
this
.
catalogChange
}
style=
{
{
width
:
240
}
}
placeholder=
"请选择课程分类"
suffixIcon=
{
<
span
className=
"icon iconfont"
style=
{
{
fontSize
:
'12px'
,
color
:
'#BFBFBF'
}
}
>

</
span
>
}
/>
}
{
(
pageType
===
'edit'
&&
categoryName
)
&&
<
Cascader
defaultValue=
{
[
categoryName
]
}
options=
{
courseCatalogList
}
displayRender=
{
label
=>
label
.
join
(
'-'
)
}
fieldNames=
{
fieldNames
}
onChange=
{
this
.
catalogChange
}
style=
{
{
width
:
240
}
}
placeholder=
"请选择课程分类"
suffixIcon=
{
<
span
className=
"icon iconfont"
style=
{
{
fontSize
:
'12px'
,
color
:
'#BFBFBF'
}
}
>

</
span
>
}
/>
<
Cascader
showSearch
defaultValue=
{
[
categoryName
]
}
options=
{
courseCatalogList
}
displayRender=
{
label
=>
label
.
join
(
'-'
)
}
fieldNames=
{
fieldNames
}
onChange=
{
this
.
catalogChange
}
style=
{
{
width
:
240
}
}
placeholder=
"请选择课程分类"
suffixIcon=
{
<
span
className=
"icon iconfont"
style=
{
{
fontSize
:
'12px'
,
color
:
'#BFBFBF'
}
}
>

</
span
>
}
/>
}
</
div
>
<
div
className=
"course-catalog"
>
...
...
src/modules/course-manage/offline-course/OfflineCourseData.jsx
View file @
cff4cd0f
This diff is collapsed.
Click to expand it.
src/modules/course-manage/offline-course/OfflineCourseData.less
View file @
cff4cd0f
...
...
@@ -84,6 +84,9 @@
background: #F3F6FA;
cursor: pointer;
}
&.selected {
background: rgba(255, 183, 20, 0.06);
}
}
}
}
...
...
src/modules/course-manage/offline-course/modal/PreviewModal.jsx
deleted
100644 → 0
View file @
553cbc40
import
React
from
'react'
;
import
{
Button
,
Modal
,
Select
}
from
'antd'
;
import
'./PreviewModal.less'
;
const
{
Option
}
=
Select
;
export
default
class
PreviewModal
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
}
render
()
{
const
{
visible
,
onCancel
}
=
this
.
props
;
return
(
<
Modal
title=
"预览"
width=
{
680
}
visible=
{
visible
}
footer=
{
null
}
onCancel=
{
()
=>
onCancel
()
}
className=
"offline-preview-modal"
>
<
div
className=
"image-box"
>
<
img
src=
"https://image.xiaomaiketang.com/xm/xYSpX2y6ri.png"
className=
"image"
/>
</
div
>
</
Modal
>
)
}
}
\ No newline at end of file
src/modules/course-manage/offline-course/modal/PreviewModal.less
deleted
100644 → 0
View file @
553cbc40
.offline-preview-modal {
}
\ No newline at end of file
src/modules/course-manage/offline-course/modal/PreviewOfflineModal.jsx
0 → 100644
View file @
cff4cd0f
import
React
from
'react'
;
import
{
Modal
}
from
'antd'
;
import
'./PreviewOfflineModal.less'
;
const
defaultCoverUrl
=
'https://image.xiaomaiketang.com/xm/YNfi45JwFA.png'
;
class
PreviewOfflineModal
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
}
render
()
{
const
{
data
}
=
this
.
props
;
const
{
coverUrl
,
courseName
,
categoryName
,
introduce
}
=
data
;
return
(
<
Modal
title=
"预览"
visible=
{
true
}
width=
{
680
}
onCancel=
{
this
.
props
.
close
}
footer=
{
null
}
maskClosable=
{
false
}
closeIcon=
{
<
span
className=
"icon iconfont modal-close-icon"
>

</
span
>
}
className=
"preview-live-graphics-modal"
>
<
div
className=
"container__wrap"
>
<
div
className=
"container"
>
<
div
className=
"container__header"
>
<
img
src=
{
coverUrl
||
defaultCoverUrl
}
className=
"course-cover"
/>
</
div
>
<
div
className=
"container__body"
>
<
div
className=
"title__name"
>
{
courseName
}
</
div
>
<
div
className=
"title__categery"
>
课程分类:
{
categoryName
}
</
div
>
<
div
className=
"title__categery"
>
上课时间:
{
categoryName
}
</
div
>
<
div
className=
"title__categery"
>
上课地点
{
categoryName
}
</
div
>
</
div
>
<
div
className=
"container__introduction"
>
<
div
className=
"title"
>
线下课简介
</
div
>
<
div
className=
"container__introduction__list editor-box"
>
<
div
className=
"intro-item text"
dangerouslySetInnerHTML=
{
{
__html
:
introduce
}
}
/>
</
div
>
</
div
>
</
div
>
</
div
>
</
Modal
>
)
}
}
export
default
PreviewOfflineModal
;
src/modules/course-manage/offline-course/modal/PreviewOfflineModal.less
0 → 100644
View file @
cff4cd0f
.preview-live-graphics-modal {
.ant-modal-body {
background-image: url('https://image.xiaomaiketang.com/xm/xZWdziTCAf.png');
background-size: 100% 100%;
}
.container__wrap {
width: 340px;
height: 618px;
padding: 67px 46px 48px 47px;
margin: auto;
background-image: url('https://image.xiaomaiketang.com/xm/DHMzHiGc2E.png');
background-size: 100% 100%;
}
.container {
overflow: scroll;
height: 100%;;
.course-cover, .course-url {
width: 100%;
height: 141px;
background: #000;
}
&__body {
background-color: #FFF;
padding: 7px 0 11px 0;;
.title__name {
color: #333333;
font-weight: 500;
}
.title__categery {
font-size: 12px;
color: #999999;
}
}
&__introduction {
margin-top: 10px;
padding: 12px 0;
position: relative;
&::after {
content: '';
position: absolute;
width: 241px;
top: -10px;
height: 10px;
background: #F4F6FA;
}
.title {
height: 24px;
display: flex;
align-items: center;
font-size: 12px;
color: #333333;
padding: 0 10px;
border-bottom: 1px solid #E8E8E8;
.title-word {
position: relative;
margin-right: 15px;
cursor: pointer;
}
.selected {
color: #FFB714;
&::after {
content: '';
position: absolute;
bottom: -4px;
width: 20px;
height: 1px;
background: #FFB714;
left: 50%;
transform: translateX(-50%);
}
}
}
&__list {
margin-top: 12px;
.intro-item:not(:first-child) {
margin-top: 13px;
}
color: #666;
p {
font-size: 12px;
}
img {
max-width: 100%;
}
}
}
}
}
\ No newline at end of file
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