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
94afde72
Commit
94afde72
authored
Jun 26, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 上传图片地址错误修复
parent
82321386
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
list.vue
src/pages/photo/list.vue
+10
-10
No files found.
src/pages/photo/list.vue
View file @
94afde72
...
@@ -162,6 +162,10 @@
...
@@ -162,6 +162,10 @@
let
dataList
=
[]
let
dataList
=
[]
var
flag
=
false
;
var
flag
=
false
;
res
.
data
.
forEach
(
item
=>
{
res
.
data
.
forEach
(
item
=>
{
item
.
key
=
item
.
orderImages
?
item
.
orderImages
.
map
(
v
=>
{
const
key
=
v
.
split
(
'com/'
)
return
key
[
1
]
})
:
[]
if
(
dataList
.
length
===
0
){
if
(
dataList
.
length
===
0
){
var
dataItem
=
{
type
:
''
,
list
:[]}
var
dataItem
=
{
type
:
''
,
list
:[]}
dataItem
.
type
=
item
.
type
dataItem
.
type
=
item
.
type
...
@@ -246,10 +250,9 @@
...
@@ -246,10 +250,9 @@
},
},
async
closeTake
(
img
)
{
async
closeTake
(
img
)
{
if
(
img
!==
undefined
){
if
(
img
!==
undefined
){
// 复制一份 用于保存
if
(
!
this
.
currentItemDate
.
orderImages
)
this
.
currentItemDate
.
orderImages
=
[]
if
(
!
this
.
currentItemDate
.
orderImages
)
this
.
currentItemDate
.
orderImages
=
[]
let
saveList
=
this
.
currentItemDate
.
orderImages
.
slice
(
0
)
// 真实地址key
let
saveList
=
this
.
currentItemDate
.
key
const
files
=
img
.
map
(
v
=>
v
.
path
)
const
files
=
img
.
map
(
v
=>
v
.
path
)
const
value
=
await
this
.
saveToTask
(
files
)
const
value
=
await
this
.
saveToTask
(
files
)
value
.
forEach
(
item
=>
{
value
.
forEach
(
item
=>
{
...
@@ -258,19 +261,16 @@
...
@@ -258,19 +261,16 @@
// step1 添加缓存图片 到显示
// step1 添加缓存图片 到显示
this
.
currentItemDate
.
orderImages
.
push
(
item
.
path
)
this
.
currentItemDate
.
orderImages
.
push
(
item
.
path
)
})
})
// step2 保存图片
//
//
step2 保存图片
var
data
=
{
const
data
=
{
type
:
this
.
currentItemDate
.
type
,
type
:
this
.
currentItemDate
.
type
,
images
:
saveList
,
images
:
saveList
,
fieldsName
:
this
.
currentItemDate
.
fieldName
fieldsName
:
this
.
currentItemDate
.
fieldName
}
}
console
.
log
(
"data"
,
data
)
console
.
log
(
"data"
,
data
)
this
.
$u
.
api
.
saveImage
(
data
,
this
.
orderId
).
then
((
res
)
=>
{
this
.
$u
.
api
.
saveImage
(
data
,
this
.
orderId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
!==
200
)
console
.
log
(
"保存图片异常"
,
res
.
data
.
message
)
}
else
{
})
console
.
log
(
"保存图片异常"
,
res
.
data
.
message
)
}
});
}
}
this
.
takeStatus
=
false
this
.
takeStatus
=
false
},
},
...
...
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