Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
ww_text
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
ww_text
Commits
c6248d13
Commit
c6248d13
authored
Oct 22, 2020
by
liujiangnan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 封面存储失败的问题
parent
446eb146
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
4 deletions
+1
-4
form.component.ts
src/app/form/form.component.ts
+1
-4
No files found.
src/app/form/form.component.ts
View file @
c6248d13
...
@@ -116,14 +116,11 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -116,14 +116,11 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
AnimationType
=
AnimationType
;
AnimationType
=
AnimationType
;
uploadUrl
;
uploadData
;
constructor
(
private
appRef
:
ApplicationRef
,
constructor
(
private
appRef
:
ApplicationRef
,
private
http
:
HttpClient
,
private
http
:
HttpClient
,
private
nzMessageService
:
NzMessageService
,
private
nzMessageService
:
NzMessageService
,
private
changeDetectorRef
:
ChangeDetectorRef
)
{
private
changeDetectorRef
:
ChangeDetectorRef
)
{
this
.
uploadUrl
=
(
<
any
>
window
).
courseware
.
uploadUrl
();
this
.
fontSizeRange
=
[];
this
.
fontSizeRange
=
[];
for
(
let
i
=
this
.
MIN_FONT_SIZE
;
i
<=
this
.
MAX_FONT_SIZE
;
++
i
)
{
for
(
let
i
=
this
.
MIN_FONT_SIZE
;
i
<=
this
.
MAX_FONT_SIZE
;
++
i
)
{
this
.
fontSizeRange
.
push
(
i
);
this
.
fontSizeRange
.
push
(
i
);
...
@@ -291,7 +288,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
...
@@ -291,7 +288,7 @@ export class FormComponent implements OnInit, OnChanges, OnDestroy {
const
ext
=
img
.
type
.
replace
(
'
image/
'
,
''
);
const
ext
=
img
.
type
.
replace
(
'
image/
'
,
''
);
formData
.
append
(
'
file
'
,
img
,
`cover.
${
ext
}
`
);
formData
.
append
(
'
file
'
,
img
,
`cover.
${
ext
}
`
);
this
.
http
.
post
(
this
.
uploadUrl
,
formData
).
subscribe
(
this
.
http
.
post
(
(
<
any
>
window
).
courseware
.
uploadUrl
()
,
formData
).
subscribe
(
(
res
:
any
)
=>
{
(
res
:
any
)
=>
{
(
window
as
any
).
courseware
.
sendEvent
(
"
screenshot
"
,
{
"
url
"
:
res
.
url
},
this
.
saveKey
);
(
window
as
any
).
courseware
.
sendEvent
(
"
screenshot
"
,
{
"
url
"
:
res
.
url
},
this
.
saveKey
);
},
},
...
...
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