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
fd3041ba
Commit
fd3041ba
authored
Jul 07, 2021
by
yuananting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:培训计划文案调整,编辑器文本长度字段修改
parent
81eb1a9c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
24 deletions
+25
-24
src/modules/course-manage/AddLive.jsx
+7
-7
src/modules/course-manage/graphics-course/AddGraphicsCourse.jsx
+3
-3
src/modules/course-manage/offline-course/AddOfflineCourse.jsx
+6
-5
src/modules/course-manage/video-course/AddVideoCourse.jsx
+7
-7
src/modules/plan-manage/AddPlan.jsx
+0
-0
src/modules/plan-manage/components/BasicInfo.jsx
+2
-2
No files found.
src/modules/course-manage/AddLive.jsx
View file @
fd3041ba
...
@@ -114,9 +114,9 @@ class AddLive extends React.Component {
...
@@ -114,9 +114,9 @@ class AddLive extends React.Component {
if
(
type
===
'edit'
)
{
if
(
type
===
'edit'
)
{
this
.
getCourseDetail
();
this
.
getCourseDetail
();
}
}
Bus
.
bind
(
'editorLimit'
,
(
t
extLength
)
=>
{
Bus
.
bind
(
'editorLimit'
,
(
editorT
extLength
)
=>
{
this
.
setState
({
this
.
setState
({
t
extLength
,
editorT
extLength
,
});
});
});
});
}
}
...
@@ -284,7 +284,7 @@ class AddLive extends React.Component {
...
@@ -284,7 +284,7 @@ class AddLive extends React.Component {
});
});
return
;
return
;
}
}
const
{
addLiveBasicInfo
,
addLiveClassInfo
,
addLiveIntroInfo
,
id
,
isEdit
,
type
}
=
this
.
state
;
const
{
addLiveBasicInfo
,
addLiveClassInfo
,
addLiveIntroInfo
,
id
,
isEdit
,
type
,
editorTextLength
}
=
this
.
state
;
const
{
liveDate
,
timeHorizonStart
}
=
addLiveClassInfo
;
const
{
liveDate
,
timeHorizonStart
}
=
addLiveClassInfo
;
const
_liveDate
=
moment
(
liveDate
).
format
(
'YYYY-MM-DD'
);
const
_liveDate
=
moment
(
liveDate
).
format
(
'YYYY-MM-DD'
);
const
_timeHorizonStart
=
moment
(
timeHorizonStart
).
format
(
'HH:mm'
);
const
_timeHorizonStart
=
moment
(
timeHorizonStart
).
format
(
'HH:mm'
);
...
@@ -301,7 +301,7 @@ class AddLive extends React.Component {
...
@@ -301,7 +301,7 @@ class AddLive extends React.Component {
});
});
return
;
return
;
}
}
this
.
handleValidate
(
addLiveBasicInfo
,
addLiveClassInfo
,
addLiveIntroInfo
,
isEdit
).
then
((
res
)
=>
{
this
.
handleValidate
(
addLiveBasicInfo
,
addLiveClassInfo
,
addLiveIntroInfo
,
isEdit
,
editorTextLength
).
then
((
res
)
=>
{
if
(
!
res
)
return
;
if
(
!
res
)
return
;
Upload
.
uploadTextToOSS
(
Upload
.
uploadTextToOSS
(
addLiveIntroInfo
.
introduce
,
addLiveIntroInfo
.
introduce
,
...
@@ -393,9 +393,9 @@ class AddLive extends React.Component {
...
@@ -393,9 +393,9 @@ class AddLive extends React.Component {
}
}
};
};
handleValidate
=
(
addLiveBasicInfo
,
addLiveClassInfo
,
addLiveIntroInfo
,
isEdit
)
=>
{
handleValidate
=
(
addLiveBasicInfo
,
addLiveClassInfo
,
addLiveIntroInfo
,
isEdit
,
editorTextLength
)
=>
{
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
const
{
type
,
textLength
}
=
this
.
state
;
const
{
type
}
=
this
.
state
;
const
{
courseName
,
categoryId
}
=
addLiveBasicInfo
;
const
{
courseName
,
categoryId
}
=
addLiveBasicInfo
;
const
{
liveDate
,
timeHorizonStart
,
timeHorizonEnd
,
teacherId
,
calendarTime
}
=
addLiveClassInfo
;
const
{
liveDate
,
timeHorizonStart
,
timeHorizonEnd
,
teacherId
,
calendarTime
}
=
addLiveClassInfo
;
const
{
liveCourseMediaRequests
}
=
addLiveIntroInfo
;
const
{
liveCourseMediaRequests
}
=
addLiveIntroInfo
;
...
@@ -480,7 +480,7 @@ class AddLive extends React.Component {
...
@@ -480,7 +480,7 @@ class AddLive extends React.Component {
return
;
return
;
}
}
if
(
t
extLength
>
1000
)
{
if
(
editorT
extLength
>
1000
)
{
message
.
warning
(
'课程简介超过字数限定'
);
message
.
warning
(
'课程简介超过字数限定'
);
resolve
(
false
);
resolve
(
false
);
return
;
return
;
...
...
src/modules/course-manage/graphics-course/AddGraphicsCourse.jsx
View file @
fd3041ba
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2020-08-05 10:07:47
* @Date: 2020-08-05 10:07:47
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-07-0
6 18:26:1
4
* @LastEditTime: 2021-07-0
7 14:49:2
4
* @Description: 图文课新增/编辑页
* @Description: 图文课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -73,9 +73,9 @@ class AddGraphicsCourse extends React.Component {
...
@@ -73,9 +73,9 @@ class AddGraphicsCourse extends React.Component {
if
(
pageType
===
'edit'
)
{
if
(
pageType
===
'edit'
)
{
this
.
handleFetchScheudleDetail
(
id
);
this
.
handleFetchScheudleDetail
(
id
);
}
}
Bus
.
bind
(
'editorLimit'
,
(
t
extLength
,
editorType
)
=>
{
Bus
.
bind
(
'editorLimit'
,
(
editorT
extLength
,
editorType
)
=>
{
this
.
setState
({
this
.
setState
({
[
editorType
]:
t
extLength
,
[
editorType
]:
editorT
extLength
,
});
});
});
});
}
}
...
...
src/modules/course-manage/offline-course/AddOfflineCourse.jsx
View file @
fd3041ba
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2020-08-05 10:07:47
* @Date: 2020-08-05 10:07:47
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-07-07 1
0:55
:41
* @LastEditTime: 2021-07-07 1
4:51
:41
* @Description: 线下课新增/编辑页
* @Description: 线下课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -98,9 +98,9 @@ class AddOfflineCourse extends React.Component {
...
@@ -98,9 +98,9 @@ class AddOfflineCourse extends React.Component {
if
(
pageType
===
'edit'
)
{
if
(
pageType
===
'edit'
)
{
this
.
handleFetchScheudleDetail
(
courseId
);
this
.
handleFetchScheudleDetail
(
courseId
);
}
}
Bus
.
bind
(
'editorLimit'
,
(
t
extLength
)
=>
{
Bus
.
bind
(
'editorLimit'
,
(
editorT
extLength
)
=>
{
this
.
setState
({
this
.
setState
({
t
extLength
,
editorT
extLength
,
});
});
});
});
}
}
...
@@ -500,6 +500,7 @@ class AddOfflineCourse extends React.Component {
...
@@ -500,6 +500,7 @@ class AddOfflineCourse extends React.Component {
signOutEndTimeNum
,
signOutEndTimeNum
,
signOutEndTimeUnit
,
signOutEndTimeUnit
,
// isMore,
// isMore,
editorTextLength
,
}
=
this
.
state
;
}
=
this
.
state
;
let
coverObj
=
{
let
coverObj
=
{
...
@@ -532,6 +533,7 @@ class AddOfflineCourse extends React.Component {
...
@@ -532,6 +533,7 @@ class AddOfflineCourse extends React.Component {
startTime
,
startTime
,
endTime
,
endTime
,
calendarTime
,
calendarTime
,
editorTextLength
,
// isMore,
// isMore,
};
};
...
@@ -603,7 +605,6 @@ class AddOfflineCourse extends React.Component {
...
@@ -603,7 +605,6 @@ class AddOfflineCourse extends React.Component {
};
};
handleValidate
=
(
data
)
=>
{
handleValidate
=
(
data
)
=>
{
const
{
textLength
}
=
this
.
state
;
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
if
(
!
data
.
courseName
)
{
if
(
!
data
.
courseName
)
{
message
.
warning
(
'请输入课程名称'
);
message
.
warning
(
'请输入课程名称'
);
...
@@ -647,7 +648,7 @@ class AddOfflineCourse extends React.Component {
...
@@ -647,7 +648,7 @@ class AddOfflineCourse extends React.Component {
}
else
if
(
data
.
whetherSetSignOut
===
'YES'
&&
((
data
.
signOutType
===
'START_LATER'
&&
!
data
.
signOutStartTimeNum
)
||
!
data
.
signOutEndTimeNum
))
{
}
else
if
(
data
.
whetherSetSignOut
===
'YES'
&&
((
data
.
signOutType
===
'START_LATER'
&&
!
data
.
signOutStartTimeNum
)
||
!
data
.
signOutEndTimeNum
))
{
message
.
warning
(
'请输入签退时间'
);
message
.
warning
(
'请输入签退时间'
);
resolve
(
false
);
resolve
(
false
);
}
else
if
(
t
extLength
>
1000
)
{
}
else
if
(
data
.
editorT
extLength
>
1000
)
{
message
.
warning
(
'课程简介超过字数限定'
);
message
.
warning
(
'课程简介超过字数限定'
);
resolve
(
false
);
resolve
(
false
);
}
else
{
}
else
{
...
...
src/modules/course-manage/video-course/AddVideoCourse.jsx
View file @
fd3041ba
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 吴文洁
* @Author: 吴文洁
* @Date: 2020-08-05 10:07:47
* @Date: 2020-08-05 10:07:47
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-07-07 1
2:05:07
* @LastEditTime: 2021-07-07 1
5:01:40
* @Description: 线上课新增/编辑页
* @Description: 线上课新增/编辑页
* @Copyright: 杭州杰竞科技有限公司 版权所有
* @Copyright: 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -94,9 +94,9 @@ class AddVideoCourse extends React.Component {
...
@@ -94,9 +94,9 @@ class AddVideoCourse extends React.Component {
if
(
pageType
===
'edit'
)
{
if
(
pageType
===
'edit'
)
{
this
.
handleFetchScheudleDetail
(
id
)
this
.
handleFetchScheudleDetail
(
id
)
}
}
Bus
.
bind
(
'editorLimit'
,
(
t
extLength
)
=>
{
Bus
.
bind
(
'editorLimit'
,
(
editorT
extLength
)
=>
{
this
.
setState
({
this
.
setState
({
t
extLength
,
editorT
extLength
,
});
});
});
});
}
}
...
@@ -402,7 +402,7 @@ class AddVideoCourse extends React.Component {
...
@@ -402,7 +402,7 @@ class AddVideoCourse extends React.Component {
whetherVisitorsJoin
,
whetherVisitorsJoin
,
introduce
,
introduce
,
courseChapterList
,
courseChapterList
,
t
extLength
,
editorT
extLength
,
}
=
this
.
state
}
=
this
.
state
const
commonParams
=
{
const
commonParams
=
{
...
@@ -420,7 +420,7 @@ class AddVideoCourse extends React.Component {
...
@@ -420,7 +420,7 @@ class AddVideoCourse extends React.Component {
courseChapterList
courseChapterList
}
}
// 校验必填字段:课程名称, 课程视频
// 校验必填字段:课程名称, 课程视频
this
.
handleValidate
(
courseName
,
courseChapterList
,
categoryId
,
scheduleMedia
,
t
extLength
).
then
((
res
)
=>
{
this
.
handleValidate
(
courseName
,
courseChapterList
,
categoryId
,
scheduleMedia
,
editorT
extLength
).
then
((
res
)
=>
{
if
(
!
res
)
return
if
(
!
res
)
return
Upload
.
uploadTextToOSS
(
introduce
,
`
${
randomString
()}
.txt`
,
(
introduceId
)
=>
{
Upload
.
uploadTextToOSS
(
introduce
,
`
${
randomString
()}
.txt`
,
(
introduceId
)
=>
{
this
.
submitRemote
({
id
,
pageType
,
commonParams
:
{
...
commonParams
,
introduceId
}
})
this
.
submitRemote
({
id
,
pageType
,
commonParams
:
{
...
commonParams
,
introduceId
}
})
...
@@ -452,7 +452,7 @@ class AddVideoCourse extends React.Component {
...
@@ -452,7 +452,7 @@ class AddVideoCourse extends React.Component {
}
}
}
}
handleValidate
=
(
courseName
,
courseChapterList
,
categoryId
,
scheduleMedia
,
t
extLength
)
=>
{
handleValidate
=
(
courseName
,
courseChapterList
,
categoryId
,
scheduleMedia
,
editorT
extLength
)
=>
{
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
if
(
!
courseName
)
{
if
(
!
courseName
)
{
message
.
warning
(
'请输入课程名称'
)
message
.
warning
(
'请输入课程名称'
)
...
@@ -469,7 +469,7 @@ class AddVideoCourse extends React.Component {
...
@@ -469,7 +469,7 @@ class AddVideoCourse extends React.Component {
resolve
(
false
)
resolve
(
false
)
return
false
return
false
}
}
if
(
t
extLength
>
1000
)
{
if
(
editorT
extLength
>
1000
)
{
message
.
warning
(
'课程简介超过字数限定'
);
message
.
warning
(
'课程简介超过字数限定'
);
resolve
(
false
);
resolve
(
false
);
return
;
return
;
...
...
src/modules/plan-manage/AddPlan.jsx
View file @
fd3041ba
This diff is collapsed.
Click to expand it.
src/modules/plan-manage/components/BasicInfo.jsx
View file @
fd3041ba
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: yuananting
* @Author: yuananting
* @Date: 2021-07-05 10:48:08
* @Date: 2021-07-05 10:48:08
* @LastEditors: yuananting
* @LastEditors: yuananting
* @LastEditTime: 2021-07-0
6 19:49:14
* @LastEditTime: 2021-07-0
7 15:00:20
* @Description: 描述一下咯
* @Description: 描述一下咯
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
...
@@ -260,7 +260,7 @@ class BasicInfo extends React.Component {
...
@@ -260,7 +260,7 @@ class BasicInfo extends React.Component {
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
'introduction'
>
<
div
className=
'introduction'
>
<
span
className=
'label'
>
课程
简介:
</
span
>
<
span
className=
'label'
>
简介:
</
span
>
{
/* <TextArea
{
/* <TextArea
placeholder='请输入培训计划简介'
placeholder='请输入培训计划简介'
maxLength={200}
maxLength={200}
...
...
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