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
6bc3829d
Commit
6bc3829d
authored
Aug 09, 2021
by
maolipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:12121212
parent
62b78dbb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
38 deletions
+52
-38
src/modules/course-manage/components/AddLiveClassInfoWorkWX.jsx
+7
-2
src/modules/course-manage/components/CreateWorkWXCourse.jsx
+7
-4
src/modules/course-manage/modal/PreviewCourseModal.jsx
+38
-32
No files found.
src/modules/course-manage/components/AddLiveClassInfoWorkWX.jsx
View file @
6bc3829d
...
@@ -46,6 +46,11 @@ export default function AddLiveClassInfoWorkWX(props) {
...
@@ -46,6 +46,11 @@ export default function AddLiveClassInfoWorkWX(props) {
setIntroduce
(
intro
)
setIntroduce
(
intro
)
},[
props
.
introduce
])
},[
props
.
introduce
])
useEffect
(()
=>
{
let
query
=
{...
defaultTeacherQuery
,
nickName
:
props
.
data
.
teacherName
}
setTeacherQuery
(
query
)
},[])
function
disabledDate
(
current
)
{
function
disabledDate
(
current
)
{
// Can not select days before today and today
// Can not select days before today and today
return
current
&&
current
<
moment
().
startOf
(
'day'
);
return
current
&&
current
<
moment
().
startOf
(
'day'
);
...
@@ -155,7 +160,7 @@ export default function AddLiveClassInfoWorkWX(props) {
...
@@ -155,7 +160,7 @@ export default function AddLiveClassInfoWorkWX(props) {
function
onTeacherChange
(
value
,
option
)
{
function
onTeacherChange
(
value
,
option
)
{
setTeacherId
(
value
)
setTeacherId
(
value
)
props
.
onChange
(
"teacherId"
,
value
)
props
.
onChange
(
"teacherId"
,
{
teacherId
:
value
,
teacherName
:
option
.
children
}
)
}
}
function
onRemindChange
(
value
,
option
)
{
function
onRemindChange
(
value
,
option
)
{
...
@@ -171,7 +176,7 @@ export default function AddLiveClassInfoWorkWX(props) {
...
@@ -171,7 +176,7 @@ export default function AddLiveClassInfoWorkWX(props) {
}
}
function
getTeacherList
(
current
=
1
)
{
function
getTeacherList
(
current
=
1
)
{
cons
t
_query
=
{
le
t
_query
=
{
...
teacherQuery
...
teacherQuery
};
};
StoreService
.
getStoreUserBasicPage
(
_query
).
then
((
res
)
=>
{
StoreService
.
getStoreUserBasicPage
(
_query
).
then
((
res
)
=>
{
...
...
src/modules/course-manage/components/CreateWorkWXCourse.jsx
View file @
6bc3829d
...
@@ -173,6 +173,7 @@ function CreateWorkWXCourse() {
...
@@ -173,6 +173,7 @@ function CreateWorkWXCourse() {
switch
(
field
)
{
switch
(
field
)
{
case
'intro'
:
case
'intro'
:
setIntroduce
(
value
)
setIntroduce
(
value
)
console
.
log
(
value
.
length
)
break
;
break
;
case
'beginTime'
:
case
'beginTime'
:
console
.
log
(
value
)
console
.
log
(
value
)
...
@@ -188,7 +189,8 @@ function CreateWorkWXCourse() {
...
@@ -188,7 +189,8 @@ function CreateWorkWXCourse() {
setClassInfo
(
classinfo
)
setClassInfo
(
classinfo
)
break
;
break
;
case
'teacherId'
:
case
'teacherId'
:
classinfo
.
teacherId
=
value
classinfo
.
teacherId
=
value
.
teacherId
classInfo
.
teacherName
=
value
.
teacherName
setClassInfo
(
classinfo
)
setClassInfo
(
classinfo
)
break
;
break
;
case
'remindTime'
:
case
'remindTime'
:
...
@@ -307,11 +309,11 @@ function CreateWorkWXCourse() {
...
@@ -307,11 +309,11 @@ function CreateWorkWXCourse() {
return
return
}
}
if
(
_
.
isEmpty
(
classInfo
.
teacherId
))
{
if
(
_
.
isEmpty
(
classInfo
.
teacherId
))
{
message
.
warning
(
"
课程分类未选择
"
)
message
.
warning
(
"
未设置讲师
"
)
resolve
(
false
)
resolve
(
false
)
return
return
}
}
if
(
introduce
.
l
ength
>
1000
)
{
if
(
editorTextL
ength
>
1000
)
{
message
.
warning
(
"直播简介超过1000个字"
)
message
.
warning
(
"直播简介超过1000个字"
)
resolve
(
false
)
resolve
(
false
)
return
return
...
@@ -325,7 +327,8 @@ function CreateWorkWXCourse() {
...
@@ -325,7 +327,8 @@ function CreateWorkWXCourse() {
function
handleShowPreviewModal
()
{
function
handleShowPreviewModal
()
{
// const { addLiveBasicInfo, addLiveClassInfo, addLiveIntroInfo, type, courseState } = this.state;
// const { addLiveBasicInfo, addLiveClassInfo, addLiveIntroInfo, type, courseState } = this.state;
const
previewLiveCourseModal
=
(
const
previewLiveCourseModal
=
(
<
PreviewCourseModal
<
PreviewCourseModal
bizType=
"qiwei"
courseBasicInfo=
{
basicInfo
}
courseBasicInfo=
{
basicInfo
}
courseClassInfo=
{
{...
classInfo
,
endTime
}
}
courseClassInfo=
{
{...
classInfo
,
endTime
}
}
courseIntroInfo=
{
{
introduce
:
introduce
,
categoryName
:
basicInfo
.
courseName
}
}
courseIntroInfo=
{
{
introduce
:
introduce
,
categoryName
:
basicInfo
.
courseName
}
}
...
...
src/modules/course-manage/modal/PreviewCourseModal.jsx
View file @
6bc3829d
...
@@ -113,41 +113,47 @@ class PreviewCourseModal extends React.Component {
...
@@ -113,41 +113,47 @@ class PreviewCourseModal extends React.Component {
let
liveDateStr
,
startTimeStr
,
endTimeStr
;
let
liveDateStr
,
startTimeStr
,
endTimeStr
;
if
(
type
===
"add"
)
{
if
(
this
.
props
.
bizType
===
"qiwei"
)
{
const
_liveDate
=
moment
(
calendarTime
[
0
]).
format
(
"YYYY-MM-DD"
);
startTimeStr
=
moment
(
startTime
===
0
?
moment
().
valueOf
():
startTime
).
format
(
"YYYY-MM-DD HH:mm"
)
console
.
log
(
"_liveDate"
,
_liveDate
);
endTimeStr
=
moment
(
endTime
===
0
?
moment
().
valueOf
():
endTime
).
format
(
"HH:mm"
)
const
_timeHorizonStart
=
moment
(
startTime
).
format
(
"HH:mm"
);
const
_timeHorizonEnd
=
moment
(
endTime
).
format
(
"HH:mm"
);
const
_startTime
=
moment
(
_liveDate
+
" "
+
_timeHorizonStart
).
format
(
"x"
);
const
_endTime
=
moment
(
_liveDate
+
" "
+
_timeHorizonEnd
).
format
(
"x"
);
const
{
liveDateStr
:
_liveDateStr
,
startTimeStr
:
_startTimeStr
,
endTimeStr
:
_endTimeStr
,
}
=
this
.
dealWithTime
(
_startTime
,
_endTime
);
liveDateStr
=
_liveDateStr
;
startTimeStr
=
_startTimeStr
;
endTimeStr
=
_endTimeStr
;
}
else
{
}
else
{
const
_liveDate
=
moment
(
liveDate
).
format
(
"YYYY-MM-DD"
);
if
(
type
===
"add"
)
{
const
_timeHorizonStart
=
moment
(
timeHorizonStart
).
format
(
"HH:mm"
);
const
_liveDate
=
moment
(
calendarTime
[
0
]).
format
(
"YYYY-MM-DD"
);
const
_timeHorizonEnd
=
moment
(
timeHorizonEnd
).
format
(
"HH:mm"
);
console
.
log
(
"_liveDate"
,
_liveDate
);
const
startTime
=
moment
(
_liveDate
+
" "
+
_timeHorizonStart
).
format
(
"x"
);
const
_timeHorizonStart
=
moment
(
startTime
).
format
(
"HH:mm"
);
const
endTime
=
moment
(
_liveDate
+
" "
+
_timeHorizonEnd
).
format
(
"x"
);
const
_timeHorizonEnd
=
moment
(
endTime
).
format
(
"HH:mm"
);
const
{
const
_startTime
=
moment
(
_liveDate
+
" "
+
_timeHorizonStart
).
format
(
liveDateStr
:
_liveDateStr
,
"x"
startTimeStr
:
_startTimeStr
,
);
endTimeStr
:
_endTimeStr
,
const
_endTime
=
moment
(
_liveDate
+
" "
+
_timeHorizonEnd
).
format
(
"x"
);
}
=
this
.
dealWithTime
(
startTime
,
endTime
);
const
{
liveDateStr
:
_liveDateStr
,
liveDateStr
=
_liveDateStr
;
startTimeStr
:
_startTimeStr
,
startTimeStr
=
_startTimeStr
;
endTimeStr
:
_endTimeStr
,
endTimeStr
=
_endTimeStr
;
}
=
this
.
dealWithTime
(
_startTime
,
_endTime
);
liveDateStr
=
_liveDateStr
;
startTimeStr
=
_startTimeStr
;
endTimeStr
=
_endTimeStr
;
}
else
{
const
_liveDate
=
moment
(
liveDate
).
format
(
"YYYY-MM-DD"
);
const
_timeHorizonStart
=
moment
(
timeHorizonStart
).
format
(
"HH:mm"
);
const
_timeHorizonEnd
=
moment
(
timeHorizonEnd
).
format
(
"HH:mm"
);
const
startTime
=
moment
(
_liveDate
+
" "
+
_timeHorizonStart
).
format
(
"x"
);
const
endTime
=
moment
(
_liveDate
+
" "
+
_timeHorizonEnd
).
format
(
"x"
);
const
{
liveDateStr
:
_liveDateStr
,
startTimeStr
:
_startTimeStr
,
endTimeStr
:
_endTimeStr
,
}
=
this
.
dealWithTime
(
startTime
,
endTime
);
liveDateStr
=
_liveDateStr
;
startTimeStr
=
_startTimeStr
;
endTimeStr
=
_endTimeStr
;
}
}
}
return
(
return
(
<
Modal
<
Modal
title=
"预览"
title=
"预览"
...
...
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