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
86568296
Commit
86568296
authored
Jan 12, 2021
by
wufan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修复创建直播课上传图片限制
parent
c420988c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/modules/course-manage/components/AddLiveBasic.jsx
+6
-2
No files found.
src/modules/course-manage/components/AddLiveBasic.jsx
View file @
86568296
...
@@ -30,7 +30,8 @@ class AddLiveBasic extends React.Component {
...
@@ -30,7 +30,8 @@ class AddLiveBasic extends React.Component {
showCutModal
:
false
,
showCutModal
:
false
,
courseCatalogList
:[],
courseCatalogList
:[],
showSelectFileModal
:
false
,
showSelectFileModal
:
false
,
cutImageBlob
:
null
cutImageBlob
:
null
,
hasImgReady
:
false
// 图片是否上传成功
}
}
}
}
componentWillUnmount
()
{
componentWillUnmount
()
{
...
@@ -142,6 +143,7 @@ class AddLiveBasic extends React.Component {
...
@@ -142,6 +143,7 @@ class AddLiveBasic extends React.Component {
const
_dataUrl
=
this
.
clip
()
const
_dataUrl
=
this
.
clip
()
self
.
setState
({
self
.
setState
({
dataUrl
:
_dataUrl
,
dataUrl
:
_dataUrl
,
hasImgReady
:
false
// 图片是否上传成功
})
})
},
100
)
},
100
)
...
@@ -197,7 +199,8 @@ class AddLiveBasic extends React.Component {
...
@@ -197,7 +199,8 @@ class AddLiveBasic extends React.Component {
}
}
render
()
{
render
()
{
const
{
showCutModal
,
imageFile
,
courseCatalogList
,
showSelectFileModal
,
visible
,
cutImageBlob
}
=
this
.
state
;
const
{
showCutModal
,
imageFile
,
courseCatalogList
,
showSelectFileModal
,
visible
,
cutImageBlob
,
hasImgReady
}
=
this
.
state
;
const
{
data
,
pageType
,
isEdit
}
=
this
.
props
;
const
{
data
,
pageType
,
isEdit
}
=
this
.
props
;
const
{
courseName
,
categoryName
,
coverUrl
}
=
data
;
const
{
courseName
,
categoryName
,
coverUrl
}
=
data
;
const
fileName
=
''
;
const
fileName
=
''
;
...
@@ -311,6 +314,7 @@ class AddLiveBasic extends React.Component {
...
@@ -311,6 +314,7 @@ class AddLiveBasic extends React.Component {
<
Button
<
Button
key=
"submit"
key=
"submit"
type=
"primary"
type=
"primary"
disabled=
{
!
hasImgReady
}
onClick=
{
()
=>
{
onClick=
{
()
=>
{
if
(
!
cutFlag
)
{
if
(
!
cutFlag
)
{
cutFlag
=
true
;
cutFlag
=
true
;
...
...
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