Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
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
ReactWeb5
CivManage
Commits
3c09a493
Commit
3c09a493
authored
May 06, 2023
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修复产品配置url有斜杠会报错问题
parent
97204cbb
Pipeline
#71840
passed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
AddForm.jsx
src/pages/productCenter/webConfig/menuconfig/AddForm.jsx
+3
-0
editForm.jsx
src/pages/productCenter/webConfig/menuconfig/editForm.jsx
+4
-1
No files found.
src/pages/productCenter/webConfig/menuconfig/AddForm.jsx
View file @
3c09a493
...
@@ -31,6 +31,9 @@ const AddForm = props => {
...
@@ -31,6 +31,9 @@ const AddForm = props => {
if
(
addType
===
1
)
{
if
(
addType
===
1
)
{
let
obj
=
form
.
getFieldsValue
();
let
obj
=
form
.
getFieldsValue
();
let
arr
=
obj
.
pageUrl
.
split
(
'/'
);
// 用const声明常量
let
arr
=
obj
.
pageUrl
.
split
(
'/'
);
// 用const声明常量
if
(
!
arr
[
0
])
{
arr
.
shift
();
}
const
product
=
allProductList
.
find
(
item
=>
item
.
PackageName
.
includes
(
arr
[
0
]));
const
product
=
allProductList
.
find
(
item
=>
item
.
PackageName
.
includes
(
arr
[
0
]));
if
(
product
)
{
if
(
product
)
{
if
(
arr
.
length
>
1
)
{
if
(
arr
.
length
>
1
)
{
...
...
src/pages/productCenter/webConfig/menuconfig/editForm.jsx
View file @
3c09a493
...
@@ -153,8 +153,11 @@ const EditForm = props => {
...
@@ -153,8 +153,11 @@ const EditForm = props => {
}
}
let
arr
=
obj
.
pageUrl
.
split
(
'/'
);
// 用const声明常量
let
arr
=
obj
.
pageUrl
.
split
(
'/'
);
// 用const声明常量
if
(
!
arr
[
0
])
{
arr
.
shift
();
}
const
product
=
allProductList
.
find
(
item
=>
item
.
PackageName
.
includes
(
arr
[
0
]));
const
product
=
allProductList
.
find
(
item
=>
item
.
PackageName
.
includes
(
arr
[
0
]));
console
.
log
(
product
,
'product'
);
if
(
product
)
{
if
(
product
)
{
arr
.
shift
();
arr
.
shift
();
obj
.
pageUrl
=
arr
.
join
(
'/'
);
obj
.
pageUrl
=
arr
.
join
(
'/'
);
...
...
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