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
204a333f
Commit
204a333f
authored
Apr 12, 2023
by
陈万宝
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修复保存草稿数据问题
parent
c11440e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
index.jsx
src/pages/ServiceGoods/index.jsx
+11
-8
No files found.
src/pages/ServiceGoods/index.jsx
View file @
204a333f
...
...
@@ -451,7 +451,7 @@ const ServiceGoods = options => {
!
info
.
infoMation
||
!
info
.
infoMation
.
name
||
!
info
.
infoMation
.
categoryId
//
(info.infoMation.categoryId.length !== 3 && info.type !== 5)
//
info.infoMation.categoryId.length !== 3 // 不能限制长度必须为3
)
{
message
.
warning
(
'
请添加商品类目和名称
'
);
return
;
...
...
@@ -463,20 +463,23 @@ const ServiceGoods = options => {
info
.
type
=
productType
;
let
arr
=
newCategoryList
[
info
.
type
];
const
first
=
arr
.
find
(
item
=>
item
.
id
===
info
.
infoMation
.
categoryId
[
0
]);
arr
=
first
.
children
;
const
second
=
arr
.
find
(
item
=>
item
.
id
===
info
.
infoMation
.
categoryId
[
1
]);
arr
=
second
.
children
;
const
third
=
arr
.
find
(
item
=>
item
.
id
===
info
.
infoMation
.
categoryId
[
2
]);
let
second
=
''
;
let
third
=
''
;
if
(
arr
.
length
)
{
arr
=
first
?.
children
;
second
=
arr
?.
find
(
item
=>
item
.
id
===
info
.
infoMation
.
categoryId
[
1
])
||
''
;
arr
=
second
?.
children
;
third
=
arr
?.
find
(
item
=>
item
.
id
===
info
.
infoMation
.
categoryId
[
2
])
||
''
;
}
const
params
=
{
productName
:
info
.
infoMation
.
name
,
productType
:
info
.
type
,
firstCategoryId
:
info
.
infoMation
.
categoryId
[
0
],
firstCategoryName
:
first
.
name
,
secondCategoryId
:
info
.
infoMation
.
categoryId
[
1
],
secondCategoryName
:
second
.
name
,
secondCategoryName
:
second
?.
name
||
''
,
thirdCategoryId
:
info
.
infoMation
.
categoryId
[
2
],
thirdCategoryName
:
third
?.
name
,
thirdCategoryName
:
third
?.
name
||
''
,
content
:
JSON
.
stringify
(
info
),
};
console
.
log
(
'
params :>>
'
,
params
);
...
...
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