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
9af7a6ba
Commit
9af7a6ba
authored
Mar 30, 2023
by
陈万宝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 更新添加修改商品
parent
5da7897d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
FormTakeaway.jsx
src/pages/ServiceGoods/components/FormTakeaway.jsx
+6
-6
index.jsx
src/pages/ServiceGoods/index.jsx
+0
-2
utils.js
src/pages/ServiceGoods/utils.js
+4
-1
No files found.
src/pages/ServiceGoods/components/FormTakeaway.jsx
View file @
9af7a6ba
...
...
@@ -279,12 +279,12 @@ const TakeawayGoodsInfo = forwardRef((props, ref) => {
singleDelivery,
specList: +repertoryType === 1 ? singularSpecList : multiSpecList, // 单库存和多库存specList
items: +repertoryType === 1 ? singularSpu : JSON.parse(JSON.stringify(multiSpu)),
categoryId:
(
infoMation?.categoryId &&
infoMation?.categoryId?.slice(infoMation?.categoryId?.length - 1)
)?.toString() ||
(Array.isArray(categoryId) && categoryId?.slice(categoryId?.length - 1)?.toString()),
//
categoryId:
//
(
//
infoMation?.categoryId &&
//
infoMation?.categoryId?.slice(infoMation?.categoryId?.length - 1)
//
)?.toString() ||
//
(Array.isArray(categoryId) && categoryId?.slice(categoryId?.length - 1)?.toString()),
};
setIntactData(intactDataTemp);
...
...
src/pages/ServiceGoods/index.jsx
View file @
9af7a6ba
...
...
@@ -207,8 +207,6 @@ const ServiceGoods = options => {
setPageLoading
(
true
);
const
sendAsyncHttpRequest
=
isEdit
?
merchantProductEdit
:
merchantProductAdd
;
const
addResponse
=
await
sendAsyncHttpRequest
(
sendData
);
debugger
;
if
(
addResponse
.
data
)
{
message
.
success
(
`
${
isEdit
?
'
修改
'
:
'
添加
'
}
成功!`
);
localStorage
.
remove
(
localAutoSaveKey
);
...
...
src/pages/ServiceGoods/utils.js
View file @
9af7a6ba
...
...
@@ -111,9 +111,12 @@ const filterItems = (type, props) => {
export
const
filterSendData
=
(
type
,
params
)
=>
{
// takeawayItem 外卖商品
const
{
infoMation
,
infoImageData
,
attributeApplyList
,
takeawayItem
}
=
params
;
console
.
log
(
'
infoMation
'
,
infoMation
,
takeawayItem
);
const
temp
=
Object
.
assign
({},
takeawayItem
?.
intactData
,
infoMation
)
temp
.
categoryId
=
(
Array
.
isArray
(
temp
.
categoryId
)
&&
temp
.
categoryId
?.
slice
(
temp
.
categoryId
?.
length
-
1
)?.
toString
())
// 外卖商品
if
(
type
===
5
)
{
return
t
akeawayItem
?.
intactData
;
return
t
emp
;
}
const
items
=
filterItems
(
type
,
params
);
const
commonImageList
=
type
===
4
?
[]
:
infoImageData
.
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