Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
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
ui
merchant-manage-ui
Commits
cbcb7f83
Commit
cbcb7f83
authored
Aug 08, 2022
by
beisir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 提交图片保存字段
parent
cf4e1b32
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
staticdata.js
src/pages/GoodsManage/staticdata.js
+10
-3
utils.js
src/pages/ServiceGoods/utils.js
+3
-2
No files found.
src/pages/GoodsManage/staticdata.js
View file @
cbcb7f83
...
@@ -296,6 +296,13 @@ export const ProcessEditData = (data, row) => {
...
@@ -296,6 +296,13 @@ export const ProcessEditData = (data, row) => {
return
origin
;
return
origin
;
},
{});
},
{});
let
commonImageList
=
data
.
commonImageList
||
[];
let
cardImageList
=
[];
if
(
data
.
productType
===
4
)
{
const
[
firstImg
,
...
towAfterImgList
]
=
oneItem
.
imageList
||
[];
cardImageList
=
towAfterImgList
||
[];
commonImageList
=
[
firstImg
];
}
const
SourceData
=
{
const
SourceData
=
{
state
:
row
.
state
,
state
:
row
.
state
,
id
:
data
.
id
,
id
:
data
.
id
,
...
@@ -321,14 +328,14 @@ export const ProcessEditData = (data, row) => {
...
@@ -321,14 +328,14 @@ export const ProcessEditData = (data, row) => {
},
},
infoImageData
:
{
infoImageData
:
{
imageList
,
imageList
,
cardImageList
:
oneItem
.
imageList
||
[]
,
cardImageList
,
commonImageList
:
data
.
commonImageList
,
commonImageList
,
detailImageList
:
data
.
detailImageList
,
detailImageList
:
data
.
detailImageList
,
},
},
skuList
:
data
.
skuList
,
skuList
:
data
.
skuList
,
...
servesItemParams
,
...
servesItemParams
,
};
};
console
.
log
(
'
SourceData===============>
'
,
SourceData
);
return
SourceData
;
return
SourceData
;
};
};
...
...
src/pages/ServiceGoods/utils.js
View file @
cbcb7f83
...
@@ -81,7 +81,7 @@ const filterItems = (type, props) => {
...
@@ -81,7 +81,7 @@ const filterItems = (type, props) => {
return
infoSpecData
.
items
.
map
(
item
=>
{
return
infoSpecData
.
items
.
map
(
item
=>
{
if
(
type
===
4
)
{
if
(
type
===
4
)
{
// 如果为服务类商品,默认取cardImageList,cardImageList为必选项目
// 如果为服务类商品,默认取cardImageList,cardImageList为必选项目
item
.
imageList
=
cardImageList
;
item
.
imageList
=
[...
commonImageList
,
...
cardImageList
]
;
}
else
{
}
else
{
// 如果为虚拟或实体商品,默认取自己{}中对应的的,没有则取公共图
// 如果为虚拟或实体商品,默认取自己{}中对应的的,没有则取公共图
const
imgList
=
imageList
[
item
.
firstSpecValue
]
||
[];
const
imgList
=
imageList
[
item
.
firstSpecValue
]
||
[];
...
@@ -104,6 +104,7 @@ export const filterSendData = (type, params) => {
...
@@ -104,6 +104,7 @@ export const filterSendData = (type, params) => {
console
.
log
(
'
===============>生成数据
'
,
params
);
console
.
log
(
'
===============>生成数据
'
,
params
);
const
{
infoMation
,
infoImageData
}
=
params
;
const
{
infoMation
,
infoImageData
}
=
params
;
const
items
=
filterItems
(
type
,
params
);
const
items
=
filterItems
(
type
,
params
);
const
commonImageList
=
type
===
4
?
[]
:
infoImageData
.
commonImageList
;
return
{
return
{
type
,
type
,
items
,
items
,
...
@@ -115,7 +116,7 @@ export const filterSendData = (type, params) => {
...
@@ -115,7 +116,7 @@ export const filterSendData = (type, params) => {
categoryId
:
infoMation
.
categoryId
[
2
],
categoryId
:
infoMation
.
categoryId
[
2
],
afterAddressId
:
infoMation
.
afterAddressId
,
afterAddressId
:
infoMation
.
afterAddressId
,
detailImageList
:
infoImageData
.
detailImageList
,
detailImageList
:
infoImageData
.
detailImageList
,
commonImageList
:
infoImageData
.
commonImageList
,
commonImageList
,
};
};
};
};
...
...
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