Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
964fc284
Commit
964fc284
authored
Aug 24, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 兼容安卓环境下图片不存在的情况
parent
ed1505cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
index.js
src/components/upload/index.js
+2
-1
task.js
src/components/upload/task.js
+3
-2
No files found.
src/components/upload/index.js
View file @
964fc284
...
...
@@ -50,6 +50,7 @@ export default {
let
lists
=
files
.
map
(
v
=>
{
const
key
=
randomChar
(
10
)
return
{
time
:
this
.
$u
.
timeFormat
(
new
Date
().
getTime
(),
'yyyy-mm-dd hh:MM:ss'
),
key
:
key
,
path
:
v
,
src
:
key
,
...
...
@@ -61,7 +62,7 @@ export default {
// const row = await this.saveFiles(path)
// lists.push(row)
// }
const
data
=
this
.
uploadTask
const
data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
uploadTask
))
const
saveLists
=
data
.
concat
(
lists
)
this
.
$u
.
vuex
(
'uploadTask'
,
saveLists
)
return
lists
...
...
src/components/upload/task.js
View file @
964fc284
...
...
@@ -32,9 +32,10 @@ export default {
err
.
mobile
=
that
.
vuex_user
.
mobile
if
(
!
err
.
key
)
err
.
files
=
uploadTask
if
(
!
err
.
orderNumber
)
err
.
orderNumber
=
uploadTask
[
0
].
orderNumber
ERROR
(
'upload_photo_error'
,
err
)
if
(
err
.
errMsg
&&
err
.
errMsg
.
indexOf
(
'fail file not found'
)
!==
-
1
)
{
// 在任务中删除不存在的图片
if
(
err
.
errMsg
&&
(
err
.
errMsg
.
indexOf
(
'fail file not found'
)
!==
-
1
||
err
.
errMsg
.
indexOf
(
'file doesn'
)
!==
-
1
)
)
{
// 在任务中删除不存在的图片
const
newTask
=
uploadTask
.
filter
(
v
=>
v
.
key
!==
err
.
key
)
that
.
$u
.
vuex
(
'uploadTask'
,
newTask
)
}
...
...
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