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
f4a87aac
Commit
f4a87aac
authored
Dec 23, 2020
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理创建课程里的封面图的裁剪
parent
f5198413
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
63 deletions
+20
-63
src/modules/course-manage/AddLive.jsx
+8
-3
src/modules/course-manage/components/AddLiveBasic.jsx
+3
-0
src/modules/course-manage/components/AddLiveClass.jsx
+5
-56
src/modules/course-manage/modal/PreviewCourseModal.jsx
+4
-4
No files found.
src/modules/course-manage/AddLive.jsx
View file @
f4a87aac
...
...
@@ -117,6 +117,7 @@ class AddLive extends React.Component {
}).
then
((
res
)
=>
{
const
{
teacherId
,
teacherName
,
courseName
,
startTime
,
endTime
,
...
...
@@ -169,6 +170,7 @@ class AddLive extends React.Component {
liveDate
,
nickname
,
teacherId
,
teacherName
,
timeHorizonStart
,
timeHorizonEnd
,
startTime
,
...
...
@@ -213,12 +215,14 @@ handleChangeBasicInfo = (field, value) => {
}
// 修改上课信息
handleChangeClassInfo
=
(
field
,
value
)
=>
{
handleChangeClassInfo
=
(
field
,
value
,
teacherName
)
=>
{
const
_value
=
value
?
value
.
valueOf
()
:
null
;
const
{
_teacherName
}
=
this
.
state
.
addLiveClassInfo
;
this
.
setState
({
addLiveClassInfo
:
{
...
this
.
state
.
addLiveClassInfo
,
[
field
]:
_value
,
teacherName
:
teacherName
?
teacherName
:
_teacherName
}
});
// 批量开始时间改变,结束时间自动同步一致
...
...
@@ -470,12 +474,13 @@ handleChangeBasicInfo = (field, value) => {
// 显示预览课程弹窗
handleShowPreviewModal
=
()
=>
{
const
{
addLiveBasicInfo
,
addLiveClassInfo
,
addLiveIntroInfo
}
=
this
.
state
;
const
{
addLiveBasicInfo
,
addLiveClassInfo
,
addLiveIntroInfo
,
type
}
=
this
.
state
;
const
previewLiveCourseModal
=
(
<
PreviewCourseModal
courseBasi
n
Info=
{
addLiveBasicInfo
}
courseBasi
c
Info=
{
addLiveBasicInfo
}
courseClassInfo=
{
addLiveClassInfo
}
courseIntroInfo=
{
addLiveIntroInfo
}
type=
{
type
}
close=
{
()
=>
{
this
.
setState
({
previewLiveCourseModal
:
null
...
...
src/modules/course-manage/components/AddLiveBasic.jsx
View file @
f4a87aac
...
...
@@ -132,6 +132,9 @@ class AddLiveBasic extends React.Component {
},
loadComplete
:(
img
)
=>
{
this
.
refs
.
headPicModal
.
click
();
setTimeout
(()
=>
{
this
.
refs
.
headPicModal
.
click
();
},
100
)
this
.
setState
({
previewUrl
:
img
.
src
})
...
...
src/modules/course-manage/components/AddLiveClass.jsx
View file @
f4a87aac
...
...
@@ -140,57 +140,6 @@ class AddLiveClass extends React.Component {
return
(
<
Spin
spinning=
{
loading
}
>
<
div
className=
"add-live__class-info"
>
{
/* <div className="course">
<div className="day">
<span className="label">
<span className="require">*</span>
上课日期
<Tooltip
overlayStyle={{maxWidth: 300, zIndex: '9999'}}
title={<div style={{width: '266px'}}>支持按上课日期批量创建直播课,创建后按“课程名称_日期”命名,例如:<br/>张三的语文课_9月18日<br/>张三的语文课_9月19日......</div>}>
<InfoCircleFilled className="tip-icon"/>
</Tooltip>:
</span>
<div>
<div className='select-day'>
已选
<span className="mark-day">
{isLongArr(calendarTime)
? calendarTime.length : 0
}
</span> 天
</div>
<MultipleDatePicker
selectDateList={calendarTime}
onSelect={this.selectMultiDate}
canSelectTodayBefore={false}
/>
</div>
</div>
<div className="hour" id="hour">
<span className="label"><span className="require">*</span>上课时间:</span>
<TimePicker
format="HH:mm"
value={startTime ? moment(startTime) : null}
placeholder="开始时间"
style={{ width: 100, minWidth: 100}}
onChange={(time) => {
this.props.onChange('startTime', time);
}}
/> ~
<TimePicker
format="HH:mm"
value={endTime ? moment(endTime) : null}
placeholder="结束时间"
style={{ width: 100, minWidth: 100 }}
onChange={(time) => {
this.props.onChange('endTime', time)
}}
/>
</div>
</div> */
}
{
pageType
===
'add'
&&
<
div
className=
"course"
>
<
div
className=
"day"
>
...
...
@@ -231,9 +180,9 @@ class AddLiveClass extends React.Component {
onChange=
{
(
time
)
=>
{
this
.
props
.
onChange
(
'startTime'
,
time
);
}
}
renderExtraFooter=
{
()
=>
{
return
null
}
}
//
renderExtraFooter=
{()=
>
{
// return <div><button>测试</button></div>
//
}
}
/
>
~
<
TimePicker
...
...
@@ -304,8 +253,8 @@ class AddLiveClass extends React.Component {
value=
{
teacherId
}
filterOption=
{
(
input
,
option
)
=>
option
}
onPopupScroll=
{
this
.
handleScrollTeacherList
}
onChange=
{
(
value
)
=>
{
this
.
props
.
onChange
(
'teacherId'
,
value
)
onChange=
{
(
value
,
option
)
=>
{
this
.
props
.
onChange
(
'teacherId'
,
value
,
option
.
children
)
}
}
onSearch=
{
(
value
)
=>
{
teacherQuery
.
nickName
=
value
...
...
src/modules/course-manage/modal/PreviewCourseModal.jsx
View file @
f4a87aac
...
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Date: 2020-07-23 14:54:16
* @LastEditors: zhangleyuan
* @LastEditTime: 2020-12-23
09:57:25
* @LastEditTime: 2020-12-23
13:41:31
* @Description: 大班直播课预览弹窗
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -48,9 +48,9 @@ class PreviewCourseModal extends React.Component {
render
()
{
const
{
courseBasi
n
Info
,
courseClassInfo
=
{},
courseIntroInfo
,
type
}
=
this
.
props
;
const
{
coverUrl
,
courseName
,
scheduleVideoUrl
}
=
courseBasi
n
Info
;
const
{
liveDate
,
timeHorizonStart
,
timeHorizonEnd
,
teacherName
}
=
courseClassInfo
;
const
{
courseBasi
c
Info
,
courseClassInfo
=
{},
courseIntroInfo
,
type
}
=
this
.
props
;
const
{
coverUrl
,
courseName
,
scheduleVideoUrl
}
=
courseBasi
c
Info
;
const
{
liveDate
,
calendarTime
,
timeHorizonStart
,
timeHorizonEnd
,
teacherName
}
=
courseClassInfo
;
const
{
liveCourseMediaRequests
}
=
courseIntroInfo
;
let
liveDateStr
,
startTimeStr
,
endTimeStr
;
...
...
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