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
a75bd985
Commit
a75bd985
authored
Aug 09, 2021
by
maolipeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:很多bug
parent
8d4f36aa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
8 deletions
+23
-8
src/modules/course-manage/components/AddLiveBasic.jsx
+4
-3
src/modules/course-manage/components/AddLiveClassInfoWorkWX.jsx
+12
-3
src/modules/course-manage/components/CreateWorkWXCourse.jsx
+7
-2
No files found.
src/modules/course-manage/components/AddLiveBasic.jsx
View file @
a75bd985
...
...
@@ -32,7 +32,8 @@ class AddLiveBasic extends React.Component {
showSelectFileModal
:
false
,
cutImageBlob
:
null
,
hasImgReady
:
false
,
// 图片是否上传成功
cropperInstace
:
null
cropperInstace
:
null
,
courseNameLimit
:
props
.
courseNameLimit
?
props
.
courseNameLimit
:
40
}
}
componentWillUnmount
()
{}
...
...
@@ -125,8 +126,8 @@ class AddLiveBasic extends React.Component {
</
span
>
<
Input
value=
{
courseName
}
placeholder=
'请输入直播名称(40字以内)'
maxLength=
{
40
}
placeholder=
{
`请输入直播名称(${this.state.courseNameLimit}字以内)`
}
maxLength=
{
this
.
state
.
courseNameLimit
}
style=
{
{
width
:
240
}
}
onChange=
{
(
e
)
=>
{
this
.
props
.
onChange
(
'courseName'
,
e
.
target
.
value
);
...
...
src/modules/course-manage/components/AddLiveClassInfoWorkWX.jsx
View file @
a75bd985
...
...
@@ -68,6 +68,7 @@ export default function AddLiveClassInfoWorkWX(props) {
}
}
else
{
setBeginDate
(
0
)
setBeginTime
(
0
)
}
}
...
...
@@ -197,18 +198,22 @@ export default function AddLiveClassInfoWorkWX(props) {
<
div
className=
"AddLiveClassInfoWorkWX"
>
<
div
className=
"begin-time item"
>
<
span
className=
"label"
><
span
className=
"require"
>
*
</
span
>
开始时间:
</
span
>
<
DatePicker
<
DatePicker
placeholder=
"请选择开始日期"
value=
{
beginDate
===
0
?
undefined
:
moment
(
beginDate
)
}
onChange=
{
onBeginDateChange
}
onOk=
{
onBeginDateOK
}
disabledDate=
{
disabledDate
}
style=
{
{
width
:
"180px"
}
}
/>
<
TimePicker
value=
{
beginTime
===
0
?
undefined
:
moment
(
beginTime
)
}
onChange=
{
onBeginTimeChange
}
onOk=
{
onBeginTimeOK
}
allowClear=
{
false
}
format=
"HH:mm"
/>
format=
"HH:mm"
style=
{
{
width
:
"120px"
}
}
/>
</
div
>
<
div
className=
"duration-time item"
>
{
...
...
@@ -216,19 +221,23 @@ export default function AddLiveClassInfoWorkWX(props) {
<>
<
span
className=
"label"
><
span
className=
"require"
>
*
</
span
>
结束时间:
</
span
>
<
DatePicker
placeholder=
"请选择结束日期"
value=
{
endDate
===
0
?
undefined
:
moment
(
endDate
)
}
onChange=
{
onEndDateChange
}
onOk=
{
onEndDateOK
}
disabledDate=
{
(
current
)
=>
{
return
current
&&
current
<
beginDate
}
}
style=
{
{
width
:
"180px"
}
}
/>
<
TimePicker
value=
{
endTime
===
0
?
undefined
:
moment
(
endTime
)
}
onChange=
{
onEndTimeChange
}
onOk=
{
onEndTimeOK
}
allowClear=
{
false
}
format=
"HH:mm"
/>
format=
"HH:mm"
style=
{
{
width
:
"120px"
}
}
/>
</>
)
:
(
<>
...
...
src/modules/course-manage/components/CreateWorkWXCourse.jsx
View file @
a75bd985
...
...
@@ -309,6 +309,11 @@ function CreateWorkWXCourse() {
resolve
(
false
)
return
}
if
(
introduce
.
length
>
1000
)
{
message
.
warning
(
"直播简介超过1000个字"
)
resolve
(
false
)
return
}
resolve
(
true
)
});
};
...
...
@@ -337,7 +342,7 @@ function CreateWorkWXCourse() {
function
handleGoBack
()
{
// 比较state的addLiveBasicInfo, addLiveClassInfo, addLiveIntroInfo和默认数据是否相等
// const { addLiveBasicInfo, addLiveClassInfo, addLiveIntroInfo } = this.state;
if
(
!
_
.
isEqual
(
basicInfo
,
defaultBasicInfo
)
||
!
_
.
isEqual
(
classInfo
,
defaultClassInfo
))
{
if
(
!
_
.
isEqual
(
basicInfo
,
defaultBasicInfo
)
||
!
_
.
isEqual
(
classInfo
,
defaultClassInfo
)
||
introduce
.
length
>
0
)
{
console
.
log
(
'ghjklkjh'
)
window
.
RCHistory
.
push
({
pathname
:
`/live-course`
,
...
...
@@ -362,7 +367,7 @@ function CreateWorkWXCourse() {
<
div
className=
'add-live-page__form'
>
<
div
className=
'basic-info__wrap'
>
<
div
className=
'title'
>
基本信息
<
span
style=
{
{
marginLeft
:
"24px"
,
color
:
"#2966FF"
,
fontSize
:
"14px"
}
}
>
温馨提示:在直播间可控制回放录制功能。
</
span
></
div
>
<
AddLiveBasic
isEdit=
{
isEdit
}
pageType=
{
type
}
data=
{
basicInfo
}
onChange=
{
handleChangeBasicInfo
}
/>
<
AddLiveBasic
isEdit=
{
isEdit
}
pageType=
{
type
}
data=
{
basicInfo
}
onChange=
{
handleChangeBasicInfo
}
courseNameLimit=
{
20
}
/>
</
div
>
<
div
className=
'class-info__wrap'
>
...
...
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