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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
545 additions
and
18 deletions
+545
-18
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
+0
-0
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
This diff is collapsed.
Click to expand it.
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