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
f64ab8f2
Commit
f64ab8f2
authored
Oct 17, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '修复宿主管理网关开启bug'
parent
3a122053
Pipeline
#61870
passed with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
26 deletions
+62
-26
gateWay.jsx
src/pages/platformCenter/hostmanager/gateWay/gateWay.jsx
+58
-22
siteConfigDrawer.js
...es/productCenter/webConfig/components/siteConfigDrawer.js
+3
-3
editConfigFileWrapper.js
...oductCenter/webConfig/menuconfig/editConfigFileWrapper.js
+1
-1
No files found.
src/pages/platformCenter/hostmanager/gateWay/gateWay.jsx
View file @
f64ab8f2
...
@@ -33,6 +33,7 @@ import {
...
@@ -33,6 +33,7 @@ import {
GetReRoutesFirst
,
GetReRoutesFirst
,
DelRoutes
,
DelRoutes
,
}
from
'@/services/hostmanager/hostmanager'
;
}
from
'@/services/hostmanager/hostmanager'
;
import
{
get
,
PUBLISH_SERVICE
}
from
'@/services/index'
;
import
configuration
from
'../../../../assets/images/icons/消息.svg'
;
import
configuration
from
'../../../../assets/images/icons/消息.svg'
;
import
AddModal
from
'./AddModal'
;
import
AddModal
from
'./AddModal'
;
...
@@ -53,42 +54,77 @@ const GateConfig = () => {
...
@@ -53,42 +54,77 @@ const GateConfig = () => {
const
{
Search
}
=
Input
;
const
{
Search
}
=
Input
;
const
OperateNginx
=
checked
=>
{
const
OperateNginx
=
checked
=>
{
localStorage
.
setItem
(
'panda-publish'
,
''
);
console
.
log
(
checked
);
console
.
log
(
checked
);
UpdateGeteWay
({
isUsed
:
checked
}).
then
(
res
=>
{
if
(
checked
)
{
if
(
res
.
code
===
0
)
{
UpdateGeteWay
({
isUsed
:
checked
}).
then
(
res
=>
{
setFlag
(
flag
+
1
);
message
.
success
(
'设置成功'
);
}
else
{
message
.
error
(
'设置失败'
);
}
});
};
useEffect
(()
=>
{
if
(
currentConfig
)
{
localStorage
.
setItem
(
'panda-publish'
,
'getway'
);
GetReRoutes
({
UpstreamPathTemplate
:
''
,
key
:
''
,
}).
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
setTableData
(
res
.
data
);
setFlag
(
flag
+
1
);
message
.
success
(
'设置成功'
);
}
else
{
message
.
error
(
'设置失败'
);
}
}
});
});
setTimeout
(()
=>
{
localStorage
.
setItem
(
'panda-publish'
,
'getway'
);
setLoading
(
true
);
GetReRoutes
({
UpstreamPathTemplate
:
''
,
key
:
''
,
}).
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
setTableData
(
res
.
data
);
}
});
},
0
);
}
else
{
}
else
{
localStorage
.
setItem
(
'panda-publish'
,
''
);
UpdateGeteWay
({
isUsed
:
checked
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setFlag
(
flag
+
1
);
message
.
success
(
'设置成功'
);
}
else
{
message
.
error
(
'设置失败'
);
}
});
}
}
},
[
currentConfig
]);
};
// useEffect(() => {
// if (currentConfig) {
// localStorage.setItem('panda-publish', 'getway');
// GetReRoutes({
// UpstreamPathTemplate: '',
// key: '',
// }).then(res => {
// setLoading(false);
// if (res.code === 0) {
// setTableData(res.data);
// }
// });
// } else {
// console.log(123333);
// localStorage.setItem('panda-publish', '');
// }
// }, [currentConfig]);
useEffect
(()
=>
{
useEffect
(()
=>
{
GetGateWay
().
then
(
res
=>
{
GetGateWay
().
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
setCurrentConfig
(
res
.
data
);
setCurrentConfig
(
res
.
data
);
console
.
log
(
currentConfig
);
console
.
log
(
currentConfig
);
if
(
res
.
data
)
{
GetReRoutes
({
UpstreamPathTemplate
:
''
,
key
:
''
,
}).
then
(
resdata
=>
{
setLoading
(
false
);
if
(
resdata
.
code
===
0
)
{
setTableData
(
resdata
.
data
);
}
});
}
}
}
});
});
setLoading
(
true
);
// .catch(err => {
// .catch(err => {
// setLoading(false);
// setLoading(false);
// GetReRoutes({
// GetReRoutes({
...
...
src/pages/productCenter/webConfig/components/siteConfigDrawer.js
View file @
f64ab8f2
...
@@ -521,10 +521,10 @@ export default props => {
...
@@ -521,10 +521,10 @@ export default props => {
<
Radio
value
=
{
false
}
>
关闭
<
/Radio
>
<
Radio
value
=
{
false
}
>
关闭
<
/Radio
>
<
/Radio.Group
>
<
/Radio.Group
>
<
/Form.Item
>
<
/Form.Item
>
<
Form
.
Item
label
=
"菜单
状态
"
name
=
"menuState"
>
<
Form
.
Item
label
=
"菜单
样式
"
name
=
"menuState"
>
<
Radio
.
Group
>
<
Radio
.
Group
>
<
Radio
value
=
"open"
>
开启
<
/Radio
>
<
Radio
value
=
"open"
>
展开
<
/Radio
>
<
Radio
value
=
"close"
>
关闭
<
/Radio
>
<
Radio
value
=
"close"
>
折叠
<
/Radio
>
<
/Radio.Group
>
<
/Radio.Group
>
<
/Form.Item
>
<
/Form.Item
>
<
/div
>
<
/div
>
...
...
src/pages/productCenter/webConfig/menuconfig/editConfigFileWrapper.js
View file @
f64ab8f2
...
@@ -74,7 +74,7 @@ const ConfigWrapper = props => {
...
@@ -74,7 +74,7 @@ const ConfigWrapper = props => {
onChange
:
handleChange
,
onChange
:
handleChange
,
}),
}),
)}
)}
{
<
Button
onClick
=
{
showModal
}
>
编辑
<
/Button>
}
{
<
Button
onClick
=
{
showModal
}
>
编辑
文件
<
/Button>
}
<
Modal
<
Modal
title
=
"编辑配置"
title
=
"编辑配置"
visible
=
{
visible
}
visible
=
{
visible
}
...
...
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