Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
new-sing
admin-base
Commits
14570439
Commit
14570439
authored
Aug 31, 2018
by
wangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
编写
parent
edad743b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
index.js
src/service/index.js
+4
-3
No files found.
src/service/index.js
View file @
14570439
...
...
@@ -83,9 +83,10 @@ export function upload(url,json) {
'Content-Type'
:
'multipart/form-data'
},
timeout
:
60000
,
onUploadProgress
:
progressEvent
=>
{
let
progress
=
((
Number
(
progressEvent
.
loaded
)
+
Number
(
y
*
process
.
env
.
MAX_FILESIZE
))
/
Number
(
json
.
file
.
size
)
*
100
|
0
);
console
.
log
((
Number
(
progressEvent
.
loaded
),
Number
(
y
*
process
.
env
.
MAX_FILESIZE
),
progress
));
store
.
dispatch
(
'setProgress'
,{
type
:
'change'
,
id
:
json
.
file
.
uid
,
num
:
progress
});
if
(
store
.
state
.
progressList
.
find
(
i
=>
{
return
i
.
id
===
json
.
file
.
uid
})){
let
progress
=
((
Number
(
progressEvent
.
loaded
)
+
Number
(
y
*
process
.
env
.
MAX_FILESIZE
))
/
Number
(
json
.
file
.
size
)
*
100
|
0
);
store
.
dispatch
(
'setProgress'
,{
type
:
'change'
,
id
:
json
.
file
.
uid
,
num
:
progress
});
}
},})
.
then
(
response
=>
{
if
(
response
.
data
.
code
===
200
){
...
...
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