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
3695560d
Commit
3695560d
authored
Dec 28, 2020
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:调整视频课相关
parent
463df389
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
619 additions
and
110 deletions
+619
-110
src/domains/basic-domain/constants.ts
+2
-2
src/domains/course-domain/constants.ts
+1
-1
src/modules/course-manage/components/AddLiveBasic.jsx
+0
-1
src/modules/course-manage/components/LiveCourseList.jsx
+0
-1
src/modules/course-manage/video-course/AddVideoCourse.jsx
+74
-92
src/modules/course-manage/video-course/components/AddVideoIntro.jsx
+282
-0
src/modules/course-manage/video-course/components/AddVideoIntro.less
+254
-0
src/modules/course-manage/video-course/components/VideoCourseList.jsx
+2
-2
src/modules/course-manage/video-course/components/VieoCourseOpt.jsx
+1
-7
src/modules/course-manage/video-course/index.jsx
+3
-4
No files found.
src/domains/basic-domain/constants.ts
View file @
3695560d
/*
* @Author: 陈剑宇
* @Date: 2020-05-07 14:43:01
* @LastEditTime: 2020-12-2
5 18:27:55
* @LastEditTime: 2020-12-2
6 14:10:34
* @LastEditors: zhangleyuan
* @Description:
* @FilePath: /wheat-web-demo/src/domains/basic-domain/constants.ts
...
...
@@ -9,7 +9,7 @@
import
{
MapInterface
}
from
'@/domains/basic-domain/interface'
// 默认是 dev 环境
const
ENV
:
string
=
process
.
env
.
DEPLOY_ENV
||
'dev
1
'
;
const
ENV
:
string
=
process
.
env
.
DEPLOY_ENV
||
'dev'
;
console
.
log
(
"process.env.DEPLOY_ENV"
,
process
)
const
BASIC_HOST_MAP
:
MapInterface
=
{
dev
:
'https://dev-heimdall.xiaomai5.com/'
,
...
...
src/domains/course-domain/constants.ts
View file @
3695560d
...
...
@@ -7,7 +7,7 @@
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
import
{
MapInterface
}
from
'@/domains/basic-domain/interface'
const
ENV
:
string
=
process
.
env
.
DEPLOY_ENV
||
'dev
1
'
;
const
ENV
:
string
=
process
.
env
.
DEPLOY_ENV
||
'dev'
;
const
appIdMap
:
MapInterface
=
{
dev
:
'wx3ea60e78ddfa277e'
,
...
...
src/modules/course-manage/components/AddLiveBasic.jsx
View file @
3695560d
...
...
@@ -67,7 +67,6 @@ class AddLiveBasic extends React.Component {
}
catalogChange
=
(
value
)
=>
{
console
.
log
(
'111'
);
const
changeValueLength
=
value
.
length
;
switch
(
changeValueLength
){
case
1
:
...
...
src/modules/course-manage/components/LiveCourseList.jsx
View file @
3695560d
...
...
@@ -318,7 +318,6 @@ class LiveCourseList extends React.Component {
];
this
.
setState
({
columns
})
}
renderMoreOperate
=
(
item
)
=>
{
return
(
<
div
className=
"live-course-more-menu"
>
...
...
src/modules/course-manage/video-course/AddVideoCourse.jsx
View file @
3695560d
...
...
@@ -2,27 +2,30 @@
* @Author: 吴文洁
* @Date: 2020-08-05 10:07:47
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-2
5 15:26:06
* @LastEditTime: 2020-12-2
8 10:12:44
* @Description: 视频课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
import
React
from
'react'
;
import
{
Button
,
Input
,
Radio
,
message
,
Modal
}
from
'antd'
;
import
{
Button
,
Input
,
Radio
,
message
,
Modal
,
Cascader
}
from
'antd'
;
import
{
DISK_MAP
,
FileTypeIcon
,
FileVerifyMap
}
from
'@/common/constants/academic/lessonEnum'
;
import
{
ImgCutModalNew
}
from
'@/components'
;
import
ShowTips
from
"@/components/ShowTips"
;
import
Breadcrumbs
from
"@/components/Breadcrumbs"
;
import
Add
LiveIntro
from
'../components/AddLive
Intro'
;
import
Add
VideoIntro
from
'./components/AddVideo
Intro'
;
import
SelectStudent
from
'../modal/select-student'
;
import
SelectPrepareFileModal
from
'../../prepare-lesson/modal/SelectPrepareFileModal'
;
import
PreviewCourseModal
from
'../modal/PreviewCourseModal'
;
import
StoreService
from
"@/domains/store-domain/storeService"
;
import
User
from
'@/common/js/user'
;
import
'./AddVideoCourse.less'
;
const
EDIT_BOX_KEY
=
Math
.
random
(
16
);
const
fieldNames
=
{
label
:
'categoryName'
,
value
:
'id'
,
children
:
'sonCategoryList'
};
class
AddVideoCourse
extends
React
.
Component
{
constructor
(
props
)
{
...
...
@@ -35,37 +38,63 @@ class AddVideoCourse extends React.Component {
id
,
// 视频课ID,编辑的时候从URL上带过来
pageType
,
// 页面类型: add->新建 edit->编辑
imageFile
:
null
,
// 需要被截取的图片
schedul
eName
:
null
,
// 视频课名称
cours
eName
:
null
,
// 视频课名称
scheduleVideoId
:
null
,
// 视频课链接
coverId
:
null
,
// 视频封面的recourceId
coverUrl
:
null
,
// 视频课封面
joinType
:
null
,
// 观看模式, 默认为指定某些学员可以观看
studentList
:
[],
// 上课学员列表
shelfState
:
'YES'
,
//是否开启店铺展示
scheduleMedia
:
[{
// 视频课媒体资源
mediaType
:
'TEXT'
,
mediaContent
:
''
,
key
:
EDIT_BOX_KEY
}],
diskList
:
[],
// 机构可见磁盘目录
selectedFileList
:
[],
// 已经从资料云盘中勾选的文件
showCutModal
:
false
,
// 是否显示截图弹窗
showSelectFileModal
:
false
,
studentModal
:
false
,
categoryName
:
null
,
//分类名称
courseCatalogList
:[],
//分类列表
categoryId
:
null
,
//分类的Id值
whetherVisitorsJoin
:
'NO'
// 是否允许游客加入
}
}
componentWillMount
()
{
// this.handleFetchDiskList();
const
{
id
,
pageType
}
=
this
.
state
;
this
.
getCourseCatalogList
();
if
(
pageType
===
'edit'
)
{
this
.
handleFetchScheudleDetail
(
id
);
this
.
handleFetchStudentList
(
id
);
}
}
//获取分类列表
getCourseCatalogList
=
()
=>
{
StoreService
.
getCourseCatalogList
({
current
:
1
,
size
:
10
}).
then
((
res
)
=>
{
this
.
setState
({
courseCatalogList
:
res
.
result
.
records
})
});
}
catalogChange
=
(
value
)
=>
{
const
changeValueLength
=
value
.
length
;
switch
(
changeValueLength
){
case
1
:
this
.
setState
({
categoryId
:
value
[
0
]});
break
;
case
2
:
this
.
setState
({
categoryId
:
value
[
1
]});
break
;
default
:
this
.
setState
({
categoryId
:
null
});
break
;
}
}
// 获取视频课详情
handleFetchScheudleDetail
=
(
scheduleId
)
=>
{
window
.
axios
.
Apollo
(
'public/apollo/getLessonScheduleDetail'
,
{
...
...
@@ -80,13 +109,11 @@ class AddVideoCourse extends React.Component {
videoName
,
studentIds
,
scheduleMedia
,
schedul
eName
,
cours
eName
,
scheduleVideoId
,
joinType
,
scheduleVideoUrl
,
}
=
result
;
this
.
setState
({
coverId
,
coverUrl
,
...
...
@@ -95,7 +122,7 @@ class AddVideoCourse extends React.Component {
videoDuration
,
studentIds
,
scheduleMedia
,
schedul
eName
,
cours
eName
,
scheduleVideoId
,
joinType
,
scheduleVideoUrl
,
...
...
@@ -148,6 +175,7 @@ class AddVideoCourse extends React.Component {
// 修改表单
handleChangeForm
=
(
field
,
value
,
coverUrl
)
=>
{
console
.
log
(
'field'
,
value
);
this
.
setState
({
[
field
]:
value
,
coverUrl
:
coverUrl
?
coverUrl
:
this
.
state
.
coverUrl
...
...
@@ -184,7 +212,6 @@ class AddVideoCourse extends React.Component {
_
.
each
(
studentIds
,
(
item
)
=>
{
studentList
.
push
({
studentId
:
item
});
});
// this.setState({ studentModal: null });
this
.
setState
({
studentList
});
this
.
setState
({
studentModal
:
false
});
...
...
@@ -195,14 +222,14 @@ class AddVideoCourse extends React.Component {
const
{
coverUrl
,
scheduleVideoUrl
,
schedul
eName
,
cours
eName
,
scheduleMedia
}
=
this
.
state
;
const
courseBasinInfo
=
{
coverUrl
,
scheduleVideoUrl
,
courseName
:
scheduleName
,
courseName
,
}
const
courseIntroInfo
=
{
...
...
@@ -269,27 +296,31 @@ class AddVideoCourse extends React.Component {
videoName
,
videoDuration
,
studentList
,
schedul
eName
,
cours
eName
,
scheduleMedia
,
scheduleVideoId
,
scheduleVideoUrl
,
categoryId
,
shelfState
,
whetherVisitorsJoin
}
=
this
.
state
;
const
commonParams
=
{
size
,
instId
,
coverId
,
videoName
,
videoDuration
,
scheduleName
,
videoDuration
,
scheduleVideoId
,
joinType
,
teacherId
:
adminId
,
studentIds
:
_
.
pluck
(
studentList
,
"studentId"
),
scheduleMedia
:
scheduleMedia
.
filter
(
item
=>
!!
item
.
mediaContent
),
categoryId
,
courseName
,
coverId
,
operatorId
:
User
.
getStoreUserId
(),
storeId
:
User
.
getStoreId
(),
shelfState
,
whetherVisitorsJoin
};
// 校验必填字段:课程名称, 课程视频
this
.
handleValidate
(
schedul
eName
,
scheduleVideoId
,
joinType
,
scheduleMedia
).
then
((
res
)
=>
{
this
.
handleValidate
(
cours
eName
,
scheduleVideoId
,
joinType
,
scheduleMedia
).
then
((
res
)
=>
{
if
(
!
res
)
return
;
if
(
pageType
===
'add'
)
{
window
.
axios
.
Apollo
(
'public/apollo/createLessonSchedule'
,
commonParams
).
then
((
res
)
=>
{
...
...
@@ -301,7 +332,6 @@ class AddVideoCourse extends React.Component {
// scheduleVideoUrl,
// id: res.result
// }));
window
.
RCHistory
.
goBack
();
})
}
else
{
...
...
@@ -318,9 +348,9 @@ class AddVideoCourse extends React.Component {
});
}
handleValidate
=
(
schedul
eName
,
scheduleVideoId
,
joinType
,
scheduleMedia
)
=>
{
handleValidate
=
(
cours
eName
,
scheduleVideoId
,
joinType
,
scheduleMedia
)
=>
{
return
new
Promise
((
resolve
)
=>
{
if
(
!
schedul
eName
)
{
if
(
!
cours
eName
)
{
message
.
warning
(
'请输入课程名称'
);
resolve
(
false
);
}
else
if
(
!
scheduleVideoId
)
{
...
...
@@ -344,10 +374,11 @@ class AddVideoCourse extends React.Component {
render
()
{
const
{
pageType
,
schedul
eName
,
scheduleVideoId
,
coverId
,
pageType
,
cours
eName
,
scheduleVideoId
,
coverId
,
coverUrl
,
scheduleVideoUrl
,
studentList
,
scheduleMedia
,
showCutModal
,
showSelectFileModal
,
diskList
,
imageFile
,
joinType
,
videoName
,
videoType
,
studentModal
imageFile
,
joinType
,
videoName
,
videoType
,
shelfState
,
categoryName
,
courseCatalogList
,
whetherVisitorsJoin
}
=
this
.
state
;
// 已选择的上课学员数量
...
...
@@ -371,11 +402,11 @@ class AddVideoCourse extends React.Component {
<
div
className=
"course-name required"
>
<
span
className=
"label"
>
课程名称:
</
span
>
<
Input
value=
{
schedul
eName
}
value=
{
cours
eName
}
placeholder=
"请输入视频课的名称(40字以内)"
maxLength=
{
40
}
style=
{
{
width
:
240
}
}
onChange=
{
(
e
)
=>
{
this
.
handleChangeForm
(
'
schedul
eName'
,
e
.
target
.
value
)}
}
onChange=
{
(
e
)
=>
{
this
.
handleChangeForm
(
'
cours
eName'
,
e
.
target
.
value
)}
}
/>
</
div
>
...
...
@@ -438,52 +469,21 @@ class AddVideoCourse extends React.Component {
</
div
>
</
div
>
</
div
>
<
div
className=
"watch-setting flex mt16"
>
<
div
className=
"label required"
>
分享设置:
</
div
>
<
div
className=
"content"
>
<
Radio
.
Group
onChange=
{
(
e
)
=>
this
.
handleChangeForm
(
'joinType'
,
e
.
target
.
value
)
}
value=
{
joinType
}
>
<
Radio
value=
{
'ALL'
}
>
<
div
className=
"radio-item"
>
<
div
className=
"text mr16"
>
允许任何学员通过视频课链接加入学习
</
div
>
<
div
className=
"sub-text"
>
加入后,在读学员可通过家长端和视频课链接观看,非在读学员仅可通过视频课链接观看
</
div
>
</
div
>
</
Radio
>
<
Radio
value=
{
'NORMAL'
}
>
<
div
className=
"radio-item"
>
<
div
className=
"text mr16"
>
仅在读学员可通过视频课链接加入学习
</
div
>
<
div
className=
"sub-text"
>
加入后,在读学员可通过家长端和视频课链接观看
</
div
>
</
div
>
</
Radio
>
<
Radio
value=
{
'ASSIGN'
}
>
<
div
className=
"radio-item mb0"
>
<
div
className=
"text mr16"
>
仅指定学员可通过视频课链接加入学习
</
div
>
<
div
className=
"sub-text"
>
加入后,在读学员可通过家长端和视频课链接观看,非在读学员仅可通过视频课链接观看
</
div
>
</
div
>
</
Radio
>
</
Radio
.
Group
>
{
// 当观看模式为指定学员时,显示选择学员的入口
joinType
===
'ASSIGN'
&&
<
div
className=
"select-student flex"
>
<
Button
onClick=
{
this
.
handleShowSelectStuModal
}
>
选择学员
</
Button
>
<
div
className=
"has-selected"
>
已选择
<
span
style=
{
{
color
:
"#FF8534"
}
}
>
{
hasSelectedStu
}
</
span
>
名学员
</
div
>
</
div
>
}
</
div
>
<
div
className=
"course-catalog"
>
<
span
className=
"label"
><
span
className=
"require"
>
*
</
span
>
课程分类:
</
span
>
{
pageType
===
'add'
&&
<
Cascader
defaultValue=
{
[
categoryName
]
}
options=
{
courseCatalogList
}
displayRender=
{
label
=>
label
.
join
(
'-'
)
}
fieldNames=
{
fieldNames
}
onChange=
{
this
.
catalogChange
}
style=
{
{
width
:
240
}
}
placeholder=
"请选择课程分类"
/>
}
{
(
pageType
===
'edit'
&&
categoryName
)
&&
<
Cascader
disabled=
{
!
isEdit
?
true
:
false
}
defaultValue=
{
[
categoryName
]
}
options=
{
courseCatalogList
}
displayRender=
{
label
=>
label
.
join
(
'-'
)
}
fieldNames=
{
fieldNames
}
onChange=
{
this
.
catalogChange
}
style=
{
{
width
:
240
}
}
placeholder=
"请选择课程分类"
/>
}
</
div
>
<
div
className=
"intro-info mt16"
>
<
Add
Live
Intro
<
Add
Video
Intro
data=
{
{
liveCourseMediaRequests
:
scheduleMedia
,
shelfState
,
whetherVisitorsJoin
,
label
:
'视频课简介'
}
}
onChange=
{
this
.
handleChangeForm
}
...
...
@@ -535,24 +535,6 @@ class AddVideoCourse extends React.Component {
onClose=
{
()
=>
this
.
setState
({
showCutModal
:
false
})
}
reUpload=
{
()
=>
{
this
.
state
.
currentInputFile
.
click
()
}
}
/>
{
/* {
<SelectStudent
addVideo={'addVideo'}
studentModal={studentModal}
showTabs={true}
type="videoCourse"
onSelect={this.handleSelectStudent}
after={true} //表明是不是上课后的状态
savedList={studentList}
close={() => {
this.setState({
// studentModal: null,
studentModal: false,
});
}}
/>
} */
}
{
this
.
state
.
studentModal
}
{
this
.
state
.
previewCourseModal
}
</
div
>
)
...
...
src/modules/course-manage/video-course/components/AddVideoIntro.jsx
0 → 100644
View file @
3695560d
/*
* @Author: 吴文洁
* @Date: 2020-07-16 11:05:17
* @Last Modified by: mikey.zhaopeng
* @Last Modified time: 2020-11-24 14:29:52
* @Description: 添加直播-简介
*/
import
React
from
'react'
;
import
{
Input
,
message
,
Upload
,
Radio
,
Row
,
Col
,
Button
,
Popover
,
Switch
}
from
'antd'
;
import
Service
from
'@/common/js/service'
;
import
EditorBox
from
'../../components/EditorBox'
;
import
User
from
'@/common/js/user'
;
import
UploadOss
from
'@/core/upload'
;
import
'./AddVideoIntro.less'
;
import
SelectPrepareFileModal
from
'@/modules/prepare-lesson/modal/SelectPrepareFileModal'
;
import
{
DISK_MAP
}
from
'@/common/constants/academic/lessonEnum'
;
import
{
ImgCutModalNew
}
from
'@/components'
;
const
{
TextArea
}
=
Input
;
const
defaultCover
=
'https://xiaomai-image.oss-cn-hangzhou.aliyuncs.com/1599635741526.png'
;
class
AddVideoIntro
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
warmUrl
:
defaultCover
,
showSelectFileModal
:
false
,
diskList
:
[],
selectType
:
null
}
}
// 上传封面图
handleShowImgCutModal
=
(
event
)
=>
{
const
imageFile
=
event
.
target
.
files
[
0
];
if
(
!
imageFile
)
return
;
this
.
setState
({
imageFile
,
showCutModal
:
true
,
});
}
// 选择暖场资源
handleSelectVideo
=
(
file
)
=>
{
const
{
selectType
}
=
this
.
state
;
this
.
setState
({
showSelectFileModal
:
false
})
const
{
ossUrl
,
resourceId
,
folderName
,
folderFormat
,
folderSize
}
=
file
;
if
(
selectType
===
'WARMUP'
){
const
liveCourseWarmMedia
=
{
contentType
:
'WARMUP'
,
mediaType
:
folderFormat
===
'MP4'
?
'VIDEO'
:
'PICTURE'
,
mediaContent
:
resourceId
,
mediaUrl
:
ossUrl
,
mediaName
:
folderName
,
size
:
folderSize
}
this
.
props
.
onChange
(
'liveCourseWarmMedia'
,
liveCourseWarmMedia
);
}
else
{
// 最多添加九图片
const
{
liveCourseMediaRequests
}
=
this
.
props
.
data
;
const
list
=
_
.
filter
(
liveCourseMediaRequests
,
(
item
)
=>
{
return
item
.
mediaType
==
"PICTURE"
;
});
if
(
list
.
length
>
8
)
{
message
.
warning
(
"最多添加9张图片"
);
return
;
}
liveCourseMediaRequests
.
push
({
contentType
:
'INTRO'
,
size
:
folderSize
,
mediaName
:
folderName
,
mediaContent
:
resourceId
,
mediaType
:
'PICTURE'
,
mediaUrl
:
ossUrl
,
});
this
.
props
.
onChange
(
'liveCourseMediaRequests'
,
liveCourseMediaRequests
);
}
}
// 删除简介
handleDeleteIntro
=
(
index
)
=>
{
const
{
liveCourseMediaRequests
}
=
this
.
props
.
data
;
liveCourseMediaRequests
.
splice
(
index
,
1
);
this
.
props
.
onChange
(
'liveCourseMediaRequests'
,
liveCourseMediaRequests
);
}
// 上移简介
handleMoveUpIntro
=
(
index
)
=>
{
const
{
liveCourseMediaRequests
}
=
this
.
props
.
data
;
const
prevItem
=
liveCourseMediaRequests
[
index
];
const
nextItem
=
liveCourseMediaRequests
[
index
+
1
];
liveCourseMediaRequests
.
splice
(
index
,
2
,
nextItem
,
prevItem
);
this
.
props
.
onChange
(
'liveCourseMediaRequests'
,
liveCourseMediaRequests
);
}
// 下移简介
handleMoveDownIntro
=
(
index
)
=>
{
const
{
liveCourseMediaRequests
}
=
this
.
props
.
data
;
const
prevItem
=
liveCourseMediaRequests
[
index
-
1
];
const
nextItem
=
liveCourseMediaRequests
[
index
];
liveCourseMediaRequests
.
splice
(
index
-
1
,
2
,
nextItem
,
prevItem
);
this
.
props
.
onChange
(
'liveCourseMediaRequests'
,
liveCourseMediaRequests
);
}
renderLittleIcon
=
(
index
)
=>
{
const
{
liveCourseMediaRequests
}
=
this
.
props
.
data
;
return
(
<
div
className=
"little-icon"
>
<
span
className=
"icon iconfont close"
onClick=
{
()
=>
{
this
.
handleDeleteIntro
(
index
);
}
}
></
span
>
{
index
>
0
&&
<
span
className=
"icon iconfont"
onClick=
{
()
=>
{
this
.
handleMoveDownIntro
(
index
);
}
}
>

</
span
>
}
{
index
!==
liveCourseMediaRequests
.
length
-
1
&&
<
span
className=
"icon iconfont"
onClick=
{
()
=>
{
this
.
handleMoveUpIntro
(
index
);
}
}
>

</
span
>
}
</
div
>
)
}
handleChangeIntro
=
(
index
,
value
,
length
)
=>
{
const
{
liveCourseMediaRequests
}
=
this
.
props
.
data
;
liveCourseMediaRequests
[
index
].
mediaContent
=
value
;
liveCourseMediaRequests
[
index
].
mediaContentLength
=
length
this
.
props
.
onChange
(
'liveCourseMediaRequests'
,
liveCourseMediaRequests
);
}
handleAddIntroText
=
()
=>
{
const
{
liveCourseMediaRequests
}
=
this
.
props
.
data
;
liveCourseMediaRequests
.
push
({
contentType
:
"INTRO"
,
mediaType
:
'TEXT'
,
mediaContent
:
''
,
key
:
Math
.
random
()
});
this
.
props
.
onChange
(
'liveCourseMediaRequests'
,
liveCourseMediaRequests
);
}
handleUpload
=
(
Blob
)
=>
{
this
.
setState
({
showSelectFileModal
:
true
,
selectType
:
'INTRO'
})
}
whetherVisitorsJoinChange
=
()
=>
{
if
(
this
.
props
.
data
.
whetherVisitorsJoin
===
"NO"
){
this
.
props
.
onChange
(
'whetherVisitorsJoin'
,
'YES'
)
}
else
{
this
.
props
.
onChange
(
'whetherVisitorsJoin'
,
'NO'
)
}
}
shelfStateChange
=
()
=>
{
if
(
this
.
props
.
data
.
shelfState
===
"NO"
){
this
.
props
.
onChange
(
'shelfState'
,
'YES'
)
}
else
{
this
.
props
.
onChange
(
'shelfState'
,
'NO'
)
}
}
componentWillMount
()
{
}
render
()
{
const
{
data
:
{
whetherVisitorsJoin
,
liveCourseMediaRequests
=
[],
shelfState
}
}
=
this
.
props
;
const
{
showSelectFileModal
,
selectType
}
=
this
.
state
return
(
<
div
className=
"add-video__intro-info"
>
<
div
className=
"allow-tourist-join"
>
<
span
className=
"label"
>
允许游客加入:
</
span
>
<
div
className=
"content"
>
<
Row
>
<
Col
span=
{
3
}
>
<
Switch
checked=
{
whetherVisitorsJoin
===
"YES"
?
true
:
false
}
onChange=
{
this
.
whetherVisitorsJoinChange
}
/>
</
Col
>
<
Col
span=
{
21
}
>
<
div
>
开启:用户可直接进入直播间观看直播
</
div
>
<
div
>
关闭:用户需先填写手机号并短信验证,通过后才可进入直播间观看直播
</
div
>
</
Col
>
</
Row
>
</
div
>
</
div
>
<
div
className=
"store-show"
>
<
span
className=
"label"
>
店铺展示:
</
span
>
<
div
className=
"content"
>
<
Row
>
<
Col
span=
{
3
}
>
<
Switch
checked=
{
shelfState
===
"YES"
?
true
:
false
}
onChange=
{
this
.
shelfStateChange
}
/>
</
Col
>
<
Col
span=
{
21
}
>
<
div
>
开启:此视频将在用户店铺的视频列表中出现
</
div
>
<
div
>
关闭:此视频将在用户店铺的视频列表中隐藏
</
div
>
</
Col
>
</
Row
>
</
div
>
</
div
>
<
div
className=
"introduce"
>
<
span
className=
"label"
>
视频课简介:
</
span
>
<
div
className=
"content"
>
<
div
className=
"intro-list"
>
{
liveCourseMediaRequests
.
map
((
item
,
index
)
=>
{
if
(
item
.
mediaType
===
'TEXT'
)
{
return
(
<
div
className=
"intro-list__item"
key=
{
item
.
key
}
>
<
EditorBox
detail=
{
{
content
:
item
.
mediaContent
}
}
onChange=
{
(
val
,
length
)
=>
{
this
.
handleChangeIntro
(
index
,
val
,
length
)
}
}
/>
{
this
.
renderLittleIcon
(
index
)
}
</
div
>
)
}
if
(
item
.
mediaType
===
'PICTURE'
)
{
return
(
<
div
className=
"intro-list__item picture"
key=
{
index
}
>
<
div
className=
"img__wrap"
>
<
img
src=
{
item
.
mediaUrl
}
/>
</
div
>
{
this
.
renderLittleIcon
(
index
)
}
</
div
>
)
}
})
}
</
div
>
<
div
className=
"operate"
>
<
div
className=
"operate__item"
onClick=
{
this
.
handleAddIntroText
}
>
<
span
className=
"icon iconfont"
>

</
span
>
<
span
className=
"text"
>
文字
</
span
>
</
div
>
<
div
className=
"operate__item"
onClick=
{
this
.
handleUpload
}
>
<
span
className=
"icon iconfont"
>

</
span
>
<
span
className=
"text"
>
图片
</
span
>
</
div
>
</
div
>
<
div
className=
"tips"
>
• 图片支持jpeg、jpg、png、gif格式
</
div
>
</
div
>
</
div
>
{
/* 选择暖场图文件弹窗 */
}
<
SelectPrepareFileModal
operateType=
"select"
accept=
{
selectType
===
"INTRO"
?
"image/jpeg,image/png,image/jpg"
:
"video/mp4,image/jpeg,image/png,image/jpg"
}
selectTypeList=
{
selectType
===
"INTRO"
?
[
'JPG'
,
'JPEG'
,
'PNG'
]:
[
'MP4'
,
'JPG'
,
'JPEG'
,
'PNG'
]
}
tooltip=
{
selectType
===
"INTRO"
?
'支持文件类型:jpg、jpeg、png'
:
'支持文件类型:jpg、jpeg、png、mp4'
}
isOpen=
{
showSelectFileModal
}
onClose=
{
()
=>
{
this
.
setState
({
showSelectFileModal
:
false
})
}
}
onSelect=
{
this
.
handleSelectVideo
}
/>
</
div
>
)
}
}
export
default
AddVideoIntro
;
src/modules/course-manage/video-course/components/AddVideoIntro.less
0 → 100644
View file @
3695560d
.add-video__intro-info {
.playback {
margin-bottom: 10px;
.require {
color: #EC4B35;
}
&__text {
color: #999;
}
}
.playback,
.introduce {
display: flex;
flex-direction: row;
}
.allow-tourist-join{
display:flex;
}
.store-show{
display:flex;
}
.radio {
display: block;
height: 30px;
line-height: 30px;
}
.interactive-playback {
display: flex;
margin-bottom: 20px;
}
textarea.ant-input {
min-height: 80px;
}
.intro-list__item {
display: flex;
margin-bottom: 16px;
position: relative;
&.picture {
width: 550px;
padding: 16px;
border: 1px solid #EEE;
border-radius: 4px;
.img__wrap {
width: 299px;
height: 168px;
img {
width: 100%;
height: 100%;
object-fit: contain;
}
}
}
.little-icon {
display: flex;
flex-direction: column;
position: absolute;
top: 0;
right: -20px;
.iconfont {
width: 20px;
height: 20px;
line-height: 20px;
font-size: 20px;
color: #999;
margin-bottom: 4px;
cursor: pointer;
&.close {
margin-top: 8px;
background-image: url('https://image.xiaomaiketang.com/xm/eesMPhNP3e.png');
background-size: 100% 100%;
}
}
}
}
.operate {
display: flex;
align-items: center;
justify-content: center;
width: 550px;
height: 80px;
line-height: 80px;
padding: 16px;
margin-top: 16px;
border: 1px dashed #EBEBEB;
border-radius: 4px;
.ant-upload {
vertical-align: middle;
}
&__item {
display: flex;
flex-direction: column;
cursor: pointer;
&:not(:last-child) {
margin-right: 82px;
}
.iconfont {
font-size: 22px;
line-height: 22px;
color: #BFBFBF;
text-align: center;
}
.text {
color: #999;
line-height: 20px;
margin-top: 4px;
}
}
}
.tips {
color: #999;
margin-top: 16px;
margin-bottom: 8px;
}
.checkExample {
width: 60px;
color: #FF7519;
cursor: pointer;
}
.warmup {
margin-bottom: 17px;
display: flex;
}
.course-cover__wrap {
display: flex;
flex-direction: row;
}
.img-content {
position: relative;
margin-right: 20px;
width: 300px;
height: 170px;
img {
width: 100%;
height: 100%;
object-fit: contain;
}
.img-delete-wrap {
opacity: 0;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
img {
position: absolute;
left: 50%;
top: 50%;
width: 40px;
height: 40px;
transform: translate(-50%, -50%);
}
&:hover {
opacity: 1;
cursor: pointer;
}
}
}
.opt-btns {
.default-btn {
margin-left: 16px;
color: #FF7519;
cursor: pointer;
&.disabled {
color: #CCC;
cursor: not-allowed;
}
}
}
}
.example-wrap {
font-family: PingFangSC-Regular, PingFang SC;
text-align: center;
.title {
margin-bottom: 6px;
font-size: 14px;
color: #333333;
}
.text {
margin-bottom: 16px;
font-size: 12px;
color: #999999;
}
img {
width: 180px;
}
}
.check-record-rule {
width: 120px;
color: #FF7519;
cursor: pointer;
z-index: 2;
}
.record-rule-wrap {
text-align: left;
ul {
margin-top: 10px;
padding-left: 34px;
list-style-type: disc;
li {
color: #999;
}
}
.text {
color: #999;
}
}
.auto-send-class-report {
.label {
width: 57px;
height: 12px;
font-size: 14px;
font-weight: 400;
color: #666666;
line-height: 12px;
}
.open-text, .close-text {
width: 572px;
font-size: 14px;
font-weight: 400;
color: #999999;
line-height: 20px;
margin-left: 100px;
margin-top: 5px;
}
.open-text {
margin-top: 8px;
}
.close-text {
margin-bottom: 16px;
}
}
\ No newline at end of file
src/modules/course-manage/video-course/components/VideoCourseList.jsx
View file @
3695560d
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-08-05 10:12:45
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-2
5 18:27:35
* @LastEditTime: 2020-12-2
6 14:10:44
* @Description: 视频课-列表模块
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -17,7 +17,7 @@ import ShareLiveModal from '@/modules/course-manage/modal/ShareLiveModal';
import
'./VideoCourseList.less'
;
const
ENV
=
process
.
env
.
DEPLOY_ENV
||
'dev
1
'
;
const
ENV
=
process
.
env
.
DEPLOY_ENV
||
'dev'
;
class
VideoCourseList
extends
React
.
Component
{
...
...
src/modules/course-manage/video-course/components/VieoCourseOpt.jsx
View file @
3695560d
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-08-05 10:12:15
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-2
5 15:25:32
* @LastEditTime: 2020-12-2
6 16:07:27
* @Description: 视频课-操作模块
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -23,12 +23,6 @@ export default function VideoCourseOpt() {
}
}
className=
"mr12"
>
新建视频课
</
Button
>
<
a
href=
"https://mp.weixin.qq.com/s/vTfGS8SeRzarrUnF9fkYbA"
className=
"link"
target=
"_blank"
>
什么是视频课?
</
a
>
</
div
>
);
}
src/modules/course-manage/video-course/index.jsx
View file @
3695560d
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-08-05 10:08:06
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-2
5 18:22:20
* @LastEditTime: 2020-12-2
6 15:56:49
* @Description: 云课堂-视频课入口页面
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -13,17 +13,16 @@ import VideoCourseFilter from './components/VideoCourseFilter';
import
VideoCourseOpt
from
'./components/VieoCourseOpt'
;
import
VideoCourseList
from
'./components/VideoCourseList'
;
import
CourseService
from
"@/domains/course-domain/CourseService"
;
import
User
from
'@/common/js/user'
class
VideoCourse
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
const
{
instId
}
=
window
.
currentUserInstInfo
;
this
.
state
=
{
query
:
{
instId
,
size
:
10
,
current
:
1
,
storeId
:
User
.
getStoreId
()
},
dataSource
:
[],
// 视频课列表
totalCount
:
0
,
// 视频课数据总条数
...
...
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