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
e45fad1c
Commit
e45fad1c
authored
May 08, 2023
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 产品配置添加civ_base包
parent
726aab0f
Pipeline
#71938
passed with stages
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
9 deletions
+26
-9
HomeConfigModal.jsx
...es/productCenter/webConfig/components/HomeConfigModal.jsx
+6
-2
siteConfigDrawer.js
...es/productCenter/webConfig/components/siteConfigDrawer.js
+6
-3
AddForm.jsx
src/pages/productCenter/webConfig/menuconfig/AddForm.jsx
+6
-2
editForm.jsx
src/pages/productCenter/webConfig/menuconfig/editForm.jsx
+8
-2
No files found.
src/pages/productCenter/webConfig/components/HomeConfigModal.jsx
View file @
e45fad1c
...
...
@@ -42,13 +42,17 @@ const HomeConfigModal = props => {
let
obj
=
{
homePage
:
form
.
getFieldsValue
().
homePage
,
productType
:
''
};
let
arrUrl
=
obj
.
homePage
.
split
(
'/'
);
// 用const声明常量
const
product
=
allProductList
.
find
(
item
=>
item
.
PackageName
.
includes
(
arrUrl
[
0
]));
let
allProList
=
JSON
.
parse
(
JSON
.
stringify
(
allProductList
));
allProList
.
push
({
PackageName
:
'civ_base'
});
const
product
=
allProList
.
find
(
item
=>
item
.
PackageName
.
includes
(
arrUrl
[
0
]));
if
(
!
product
)
{
// arrUrl.shift();
obj
.
homePage
=
`civweb4/
${
obj
.
homePage
}
`
;
}
obj
.
productType
=
product
?.
PackageName
||
'civweb4'
;
if
(
!
productList
.
some
(
item
=>
item
.
PackageName
===
obj
.
productType
))
{
let
proList
=
JSON
.
parse
(
JSON
.
stringify
(
productList
));
proList
.
push
({
PackageName
:
'civ_base'
});
if
(
!
proList
.
some
(
item
=>
item
.
PackageName
===
obj
.
productType
))
{
message
.
error
(
`
${
obj
.
productType
}
未授权,不能使用该功能当主页`
);
return
;
}
...
...
src/pages/productCenter/webConfig/components/siteConfigDrawer.js
View file @
e45fad1c
...
...
@@ -272,15 +272,18 @@ export default props => {
console
.
log
(
validate
);
if
(
validate
.
homePage
)
{
let
arr
=
validate
.
homePage
.
split
(
'/'
);
// 用const声明常量
const
product
=
allProductList
.
find
(
item
=>
item
.
PackageName
.
includes
(
arr
[
0
]));
let
allProList
=
JSON
.
parse
(
JSON
.
stringify
(
allProductList
));
allProList
.
push
({
PackageName
:
'civ_base'
});
const
product
=
allProList
.
find
(
item
=>
item
.
PackageName
.
includes
(
arr
[
0
]));
if
(
product
)
{
arr
.
shift
();
validate
.
homePage
=
arr
.
join
(
'/'
);
}
console
.
log
(
product
,
'product'
);
validate
.
productType
=
product
?.
PackageName
||
'civweb4'
;
if
(
!
productList
.
some
(
item
=>
item
.
PackageName
===
validate
.
productType
))
{
let
proList
=
JSON
.
parse
(
JSON
.
stringify
(
productList
));
proList
.
push
({
PackageName
:
'civ_base'
});
if
(
!
proList
.
some
(
item
=>
item
.
PackageName
===
validate
.
productType
))
{
message
.
error
(
`
${
validate
.
productType
}
未授权,不能使用该功能当主页`
);
return
;
}
...
...
src/pages/productCenter/webConfig/menuconfig/AddForm.jsx
View file @
e45fad1c
...
...
@@ -34,7 +34,9 @@ const AddForm = props => {
if
(
!
arr
[
0
])
{
arr
.
shift
();
}
const
product
=
allProductList
.
find
(
item
=>
item
.
PackageName
.
includes
(
arr
[
0
]));
let
allProList
=
JSON
.
parse
(
JSON
.
stringify
(
allProductList
));
allProList
.
push
({
PackageName
:
'civ_base'
});
const
product
=
allProList
.
find
(
item
=>
item
.
PackageName
.
includes
(
arr
[
0
]));
if
(
product
)
{
if
(
arr
.
length
>
1
)
{
arr
.
shift
();
...
...
@@ -44,7 +46,9 @@ const AddForm = props => {
}
console
.
log
(
product
,
'product'
);
obj
.
product
=
product
?.
PackageName
||
'civweb4'
;
if
(
!
productList
.
some
(
item
=>
item
.
PackageName
===
obj
.
product
))
{
let
proList
=
JSON
.
parse
(
JSON
.
stringify
(
productList
));
proList
.
push
({
PackageName
:
'civ_base'
});
if
(
!
proList
.
some
(
item
=>
item
.
PackageName
===
obj
.
product
))
{
message
.
error
(
`
${
obj
.
product
}
未授权,不能使用该功能`
);
return
;
}
...
...
src/pages/productCenter/webConfig/menuconfig/editForm.jsx
View file @
e45fad1c
...
...
@@ -156,7 +156,9 @@ const EditForm = props => {
if
(
!
arr
[
0
])
{
arr
.
shift
();
}
const
product
=
allProductList
.
find
(
item
=>
item
.
PackageName
.
includes
(
arr
[
0
]));
let
allProList
=
JSON
.
parse
(
JSON
.
stringify
(
allProductList
));
allProList
.
push
({
PackageName
:
'civ_base'
});
const
product
=
allProList
.
find
(
item
=>
item
.
PackageName
.
includes
(
arr
[
0
]));
console
.
log
(
product
,
'product'
);
if
(
product
)
{
arr
.
shift
();
...
...
@@ -164,7 +166,11 @@ const EditForm = props => {
}
obj
.
product
=
product
?.
PackageName
||
'civweb4'
;
if
(
!
productList
.
some
(
item
=>
item
.
PackageName
===
obj
.
product
))
{
console
.
log
(
productList
,
'productList'
);
let
proList
=
JSON
.
parse
(
JSON
.
stringify
(
productList
));
proList
.
push
({
PackageName
:
'civ_base'
});
if
(
!
proList
.
some
(
item
=>
item
.
PackageName
===
obj
.
product
))
{
message
.
error
(
`
${
obj
.
product
}
未授权,不能使用该功能`
);
return
;
}
...
...
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