Commit 04847268 authored by 皮倩雯's avatar 皮倩雯

fix: '网关配置'

parent fedbacf1
Pipeline #54977 passed with stages
......@@ -66,6 +66,16 @@ const GateConfig = () => {
useEffect(() => {
if (currentConfig) {
localStorage.setItem('panda-publish', 'getway');
GetReRoutes({
UpstreamPathTemplate: '',
key: '',
}).then(res => {
setLoading(false);
if (res.code === 0) {
console.log(res.data);
setTableData(res.data);
}
});
} else {
localStorage.setItem('panda-publish', '');
}
......@@ -79,32 +89,22 @@ const GateConfig = () => {
}
});
setLoading(true);
GetReRoutesFirst({
UpstreamPathTemplate: '',
key: '',
})
.then(res => {
setLoading(false);
if (res.code === 0) {
console.log(res.data);
setTableData(res.data);
}
})
.catch(err => {
setLoading(false);
GetReRoutes({
UpstreamPathTemplate: '',
key: '',
}).then(resdata => {
setLoading(false);
if (resdata.code === 0) {
console.log(resdata.data);
setTableData(resdata.data);
} else {
console.log(123);
}
});
});
// .catch(err => {
// setLoading(false);
// GetReRoutes({
// UpstreamPathTemplate: '',
// key: '',
// }).then(resdata => {
// setLoading(false);
// if (resdata.code === 0) {
// console.log(resdata.data);
// setTableData(resdata.data);
// } else {
// console.log(123);
// }
// });
// });
}, [flag]);
const columns = [
......
......@@ -2,7 +2,7 @@
* @Description:
* @Author: leizhe
* @Date: 2022-01-13 17:26:14
* @LastEditTime: 2022-07-08 16:37:26
* @LastEditTime: 2022-07-08 17:45:40
* @LastEditors: leizhe
*/
import { get, post, PUBLISH_SERVICE, CITY_SERVICE, PandaCore } from '@/services/index';
......@@ -40,7 +40,7 @@ export const ReloadNginx = param => get(`${PUBLISH_SERVICE}/HostManager/ReloadNg
export const GetGateWay = param => get(`${PUBLISH_SERVICE}/HostManager/GetGateWay`, param);
export const UpdateGeteWay = param => get(`${PUBLISH_SERVICE}/HostManager/UpdateGeteWay`, param);
// 网关配置
export const GetReRoutesFirst = param => get(`${PandaCore}/OcelotSettings/GetReRoutes`, param);
// export const GetReRoutesFirst = param => get(`/OcelotSettings/GetReRoutes`, param);
export const GetReRoutes = param => get(`/OcelotSettings/GetReRoutes`, param);
export const SaveRoutes = param => post(`/OcelotSettings/SaveRoutes`, param);
export const DelRoutes = param => get(`/OcelotSettings/DelRoutes`, param);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment