Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cocosTest
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
cocosTest
Commits
3695f7ce
Commit
3695f7ce
authored
May 15, 2020
by
limingzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复上传资源 有时会上传失败问题
parent
7b9a904b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
6 deletions
+31
-6
audio-recorder.component.ts
src/app/common/audio-recorder/audio-recorder.component.ts
+8
-2
upload-image-with-preview.component.ts
...image-with-preview/upload-image-with-preview.component.ts
+11
-2
upload-video.component.ts
src/app/common/upload-video/upload-video.component.ts
+12
-2
No files found.
src/app/common/audio-recorder/audio-recorder.component.ts
View file @
3695f7ce
...
...
@@ -22,8 +22,8 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy {
@
Input
()
withRmBtn
=
false
;
uploadUrl
=
(
window
as
any
).
courseware
.
uploadUrl
()
;
uploadData
=
(
window
as
any
).
courseware
.
uploadData
()
;
uploadUrl
;
uploadData
;
@
Input
()
needRemove
=
false
;
...
...
@@ -55,7 +55,13 @@ export class AudioRecorderComponent implements OnInit, OnChanges, OnDestroy {
constructor
(
private
nzMessageService
:
NzMessageService
)
{
this
.
uploadUrl
=
(
<
any
>
window
).
courseware
.
uploadUrl
();
this
.
uploadData
=
(
<
any
>
window
).
courseware
.
uploadData
();
window
[
'
air
'
].
getUploadCallback
=
(
url
,
data
)
=>
{
this
.
uploadUrl
=
url
;
this
.
uploadData
=
data
;
};
}
init
()
{
...
...
src/app/common/upload-image-with-preview/upload-image-with-preview.component.ts
View file @
3695f7ce
...
...
@@ -29,10 +29,19 @@ export class UploadImageWithPreviewComponent implements OnDestroy, OnChanges {
@
Input
()
disableUpload
=
false
;
uploadUrl
=
(
<
any
>
window
).
courseware
.
uploadUrl
()
;
uploadData
=
(
<
any
>
window
).
courseware
.
uploadData
()
;
uploadUrl
;
uploadData
;
constructor
(
private
nzMessageService
:
NzMessageService
)
{
this
.
uploadUrl
=
(
<
any
>
window
).
courseware
.
uploadUrl
();
this
.
uploadData
=
(
<
any
>
window
).
courseware
.
uploadData
();
window
[
'
air
'
].
getUploadCallback
=
(
url
,
data
)
=>
{
this
.
uploadUrl
=
url
;
this
.
uploadData
=
data
;
};
}
ngOnChanges
()
{
if
(
!
this
.
picItem
)
{
...
...
src/app/common/upload-video/upload-video.component.ts
View file @
3695f7ce
...
...
@@ -47,8 +47,8 @@ export class UploadVideoComponent implements OnChanges, OnDestroy {
item
:
any
;
// videoItem = null;
uploadUrl
=
(
window
as
any
).
courseware
.
uploadUrl
()
;
uploadData
=
(
window
as
any
).
courseware
.
uploadData
()
;
uploadUrl
;
uploadData
;
constructor
(
private
nzMessageService
:
NzMessageService
,
private
sanitization
:
DomSanitizer
...
...
@@ -58,6 +58,16 @@ export class UploadVideoComponent implements OnChanges, OnDestroy {
this
.
uploading
=
false
;
this
.
videoFile
=
null
;
this
.
uploadUrl
=
(
<
any
>
window
).
courseware
.
uploadUrl
();
this
.
uploadData
=
(
<
any
>
window
).
courseware
.
uploadData
();
window
[
'
air
'
].
getUploadCallback
=
(
url
,
data
)
=>
{
this
.
uploadUrl
=
url
;
this
.
uploadData
=
data
;
};
}
ngOnChanges
()
{
// if (!this.videoFile || this.showUploadBtn) {
...
...
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